[Rose-commits] r129 - in branches/testonly: . config docs/Rose docs/Rose/Tutorial projects projects/AstEquivalence projects/AstEquivalence/gui projects/BinQ projects/BinaryCloneDetection/gui projects/OpenMP_Translator projects/arrayOptimization projects/arrayOptimization/test projects/autoParallelization projects/autoParallelization/tests projects/binCompass projects/binaryVisualization projects/compass/extensions/checkers projects/compass/extensions/checkers/binPrintAsmFunctions projects/compass/extensions/checkers/binPrintAsmInstruction projects/compass/extensions/checkers/binaryBufferOverflow projects/compass/extensions/checkers/binaryInterruptAnalysis projects/compass/extensions/checkers/nameConsistency projects/compass/extensions/checkers/pointerComparison projects/compass/extensions/prerequisites projects/compass/src/compassSupport projects/compass/src/compass_scripts/compass_template_generator projects/compass/src/util/MPIAbstraction/alt-mpi-headers projects/compass/tools/compass projects/compass/tools/compass/doc projects/palette projects/runtimeErrorCheck src src/3rdPartyLibraries src/ROSETTA src/ROSETTA/Grammar src/ROSETTA/src src/backend/asmUnparser src/backend/unparser src/backend/unparser/CxxCodeGeneration src/backend/unparser/FortranCodeGeneration src/backend/unparser/languageIndependenceSupport src/frontend/BinaryDisassembly src/frontend/CxxFrontend src/frontend/Disassemblers src/frontend/ExecFormats src/frontend/OpenFortranParser_SAGE_Connection src/frontend/SageIII src/frontend/SageIII/astMerge src/frontend/SageIII/astPostProcessing src/frontend/SageIII/astTokenStream src/frontend/SageIII/astVisualization src/frontend/SageIII/sageInterface src/frontend/SageIII/virtualCFG src/midend/abstractHandle src/midend/astDiagnostics src/midend/astInlining src/midend/astProcessing src/midend/astRewriteMechanism src/midend/astUtil/annotation src/midend/astUtil/astInterface src/midend/astUtil/astSupport src/midend/astUtil/symbolicVal src/midend/binaryAnalyses src/midend/binaryAnalyses/graph src/midend/loopP! rocessin

liaoch at osp5.lbl.gov liaoch at osp5.lbl.gov
Mon Nov 17 22:54:08 PST 2008


Author: liaoch
Date: 2008-11-17 22:54:05 -0800 (Mon, 17 Nov 2008)
New Revision: 129

Added:
   branches/testonly/config/cleanConfigGuessOutput
   branches/testonly/config/support-dwarf.m4
   branches/testonly/config/ylwrap
   branches/testonly/docs/Rose/ROSE_DeveloperInstructions.tex.in
   branches/testonly/docs/Rose/asm_code_samples_gcc.pdf
   branches/testonly/projects/AstEquivalence/createTextFiles.C
   branches/testonly/projects/BinQ/AlignFunctions.C
   branches/testonly/projects/BinQ/AlignFunctions.h
   branches/testonly/projects/BinQ/BinAnalyses.h
   branches/testonly/projects/BinQ/BinCallGraph.C
   branches/testonly/projects/BinQ/BinCallGraph.h
   branches/testonly/projects/BinQ/BinControlFlowAnalysis.C
   branches/testonly/projects/BinQ/BinControlFlowAnalysis.h
   branches/testonly/projects/BinQ/BinDataFlowAnalysis.C
   branches/testonly/projects/BinQ/BinDataFlowAnalysis.h
   branches/testonly/projects/BinQ/BufferOverflow.C
   branches/testonly/projects/BinQ/BufferOverflow.h
   branches/testonly/projects/BinQ/Clone.C
   branches/testonly/projects/BinQ/Clone.h
   branches/testonly/projects/BinQ/FunctionDiff.C
   branches/testonly/projects/BinQ/InterruptAnalysis.C
   branches/testonly/projects/BinQ/InterruptAnalysis.h
   branches/testonly/projects/BinQ/Item.h
   branches/testonly/projects/BinQ/LCS.C
   branches/testonly/projects/BinQ/LCS.h
   branches/testonly/projects/BinQ/slide.C
   branches/testonly/projects/BinQ/slide.h
   branches/testonly/projects/autoParallelization/
   branches/testonly/projects/autoParallelization/Makefile.am
   branches/testonly/projects/autoParallelization/README
   branches/testonly/projects/autoParallelization/autoPar.C
   branches/testonly/projects/autoParallelization/makefile.external
   branches/testonly/projects/autoParallelization/tests/
   branches/testonly/projects/autoParallelization/tests/Index.annot
   branches/testonly/projects/autoParallelization/tests/Makefile.am
   branches/testonly/projects/autoParallelization/tests/anti_dep.c
   branches/testonly/projects/autoParallelization/tests/doall.c
   branches/testonly/projects/autoParallelization/tests/doall_2.c
   branches/testonly/projects/autoParallelization/tests/doall_vector.C
   branches/testonly/projects/autoParallelization/tests/firstprivate.c
   branches/testonly/projects/autoParallelization/tests/floatArray.annot
   branches/testonly/projects/autoParallelization/tests/funcs.annot
   branches/testonly/projects/autoParallelization/tests/inner_only.c
   branches/testonly/projects/autoParallelization/tests/interp1_elem.C
   branches/testonly/projects/autoParallelization/tests/jacobi_seq.c
   branches/testonly/projects/autoParallelization/tests/lastprivate.c
   branches/testonly/projects/autoParallelization/tests/matrixmultiply.c
   branches/testonly/projects/autoParallelization/tests/output_dep.c
   branches/testonly/projects/autoParallelization/tests/output_dep2.c
   branches/testonly/projects/autoParallelization/tests/output_dep3.c
   branches/testonly/projects/autoParallelization/tests/pointer.c
   branches/testonly/projects/autoParallelization/tests/private.c
   branches/testonly/projects/autoParallelization/tests/reduction.c
   branches/testonly/projects/autoParallelization/tests/scalar_privatization.c
   branches/testonly/projects/autoParallelization/tests/shared.c
   branches/testonly/projects/autoParallelization/tests/simpleA++.h
   branches/testonly/projects/autoParallelization/tests/true_dep.c
   branches/testonly/projects/autoParallelization/tests/true_dep_2.c
   branches/testonly/projects/autoParallelization/tests/true_l2.c
   branches/testonly/projects/autoParallelization/tests/vector_1.C
   branches/testonly/projects/autoParallelization/tests/vector_2.C
   branches/testonly/projects/autoParallelization/tests/vectorize_1.c
   branches/testonly/projects/compass/extensions/checkers/pointerComparison/
   branches/testonly/projects/compass/extensions/checkers/pointerComparison/compass_parameters
   branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.C
   branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.compass.external.makefile
   branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.inc
   branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonDocs.tex
   branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonMain.C
   branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonTest1.C
   branches/testonly/projects/compass/tools/compass/doc/compass_categories.tex
   branches/testonly/src/ROSETTA/Grammar/grammarProcessDataMemberReferenceToPointers.macro
   branches/testonly/src/backend/unparser/FortranCodeGeneration/unparseFortran_modfile.C
   branches/testonly/src/backend/unparser/FortranCodeGeneration/unparseFortran_modfile.h
   branches/testonly/src/frontend/CxxFrontend/roseBinaryEDG-i686-apple-darwin-e2d193c41f56aafc2094b8f411f9d94e.tar.gz
   branches/testonly/src/frontend/CxxFrontend/roseBinaryEDG-i686-pc-linux-gnu-e2d193c41f56aafc2094b8f411f9d94e.tar.gz
   branches/testonly/src/frontend/CxxFrontend/roseBinaryEDG-x86_64-pc-linux-gnu-e2d193c41f56aafc2094b8f411f9d94e.tar.gz
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranModuleInfo.C
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranModuleInfo.h
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranParserState.C
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranParserState.h
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/jserver.C
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/jserver.h
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/ofp.C
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/ofp.h
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.ll
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.ll
   branches/testonly/src/frontend/SageIII/OmpAttribute.C
   branches/testonly/src/frontend/SageIII/OmpAttribute.h
   branches/testonly/src/frontend/SageIII/dwarfSupport.C
   branches/testonly/src/frontend/SageIII/dwarfSupport.h
   branches/testonly/src/frontend/SageIII/omp.h
   branches/testonly/src/frontend/SageIII/preproc.ll
   branches/testonly/src/frontend/SageIII/sageInterface/integerOps.h
   branches/testonly/src/frontend/SageIII/sageInterface/sageInterface_asm.C
   branches/testonly/src/midend/loopProcessing/outsideInterface/
   branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayAnnot.C
   branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayAnnot.h
   branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayInterface.C
   branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayInterface.h
   branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayRewrite.C
   branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayRewrite.h
   branches/testonly/src/midend/loopProcessing/outsideInterface/Makefile.am
   branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysisAbstract.cpp
   branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysisAbstract.h
   branches/testonly/src/midend/programAnalysis/defUseAnalysis/LivenessAnalysis.cpp
   branches/testonly/src/midend/programAnalysis/defUseAnalysis/LivenessAnalysis.h
   branches/testonly/src/roseIndependentSupport/dot2gml/parseDot.ll
   branches/testonly/src/roseIndependentSupport/dot2gml/parseDotGrammar.h
   branches/testonly/src/roseIndependentSupport/dot2gml/parseDotGrammar.yy
   branches/testonly/tests/CompileTests/Fortran_tests/module_A_file.f90
   branches/testonly/tests/CompileTests/Fortran_tests/module_B_file.f90
   branches/testonly/tests/CompileTests/OpenMP_tests/
   branches/testonly/tests/CompileTests/OpenMP_tests/3loops.c
   branches/testonly/tests/CompileTests/OpenMP_tests/Makefile.am
   branches/testonly/tests/CompileTests/OpenMP_tests/README
   branches/testonly/tests/CompileTests/OpenMP_tests/atomic.c
   branches/testonly/tests/CompileTests/OpenMP_tests/collapse.c
   branches/testonly/tests/CompileTests/OpenMP_tests/copyin.c
   branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate.c
   branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate2.c
   branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate3.c
   branches/testonly/tests/CompileTests/OpenMP_tests/critical.c
   branches/testonly/tests/CompileTests/OpenMP_tests/critical_dead.c
   branches/testonly/tests/CompileTests/OpenMP_tests/critical_orphaned.c
   branches/testonly/tests/CompileTests/OpenMP_tests/dynamicChunk.c
   branches/testonly/tests/CompileTests/OpenMP_tests/empty.c
   branches/testonly/tests/CompileTests/OpenMP_tests/expressions.c
   branches/testonly/tests/CompileTests/OpenMP_tests/falsesharing.c
   branches/testonly/tests/CompileTests/OpenMP_tests/firstlastprivate.c
   branches/testonly/tests/CompileTests/OpenMP_tests/flush.c
   branches/testonly/tests/CompileTests/OpenMP_tests/get_max_threads.c
   branches/testonly/tests/CompileTests/OpenMP_tests/hello-ordered.c
   branches/testonly/tests/CompileTests/OpenMP_tests/hello.c
   branches/testonly/tests/CompileTests/OpenMP_tests/lastprivate.c
   branches/testonly/tests/CompileTests/OpenMP_tests/lastprivate0.c
   branches/testonly/tests/CompileTests/OpenMP_tests/limits_threads.c
   branches/testonly/tests/CompileTests/OpenMP_tests/lockarray.c
   branches/testonly/tests/CompileTests/OpenMP_tests/lu_factorization.c
   branches/testonly/tests/CompileTests/OpenMP_tests/masterSingle.c
   branches/testonly/tests/CompileTests/OpenMP_tests/matrix_vector.c
   branches/testonly/tests/CompileTests/OpenMP_tests/nestedpar.c
   branches/testonly/tests/CompileTests/OpenMP_tests/nestedpar1.c
   branches/testonly/tests/CompileTests/OpenMP_tests/omp1.c
   branches/testonly/tests/CompileTests/OpenMP_tests/ompfor.c
   branches/testonly/tests/CompileTests/OpenMP_tests/ordered.c
   branches/testonly/tests/CompileTests/OpenMP_tests/ordered2.c
   branches/testonly/tests/CompileTests/OpenMP_tests/orphaned-directives.c
   branches/testonly/tests/CompileTests/OpenMP_tests/parallel.c
   branches/testonly/tests/CompileTests/OpenMP_tests/parallelfor.c
   branches/testonly/tests/CompileTests/OpenMP_tests/parseOmp.C
   branches/testonly/tests/CompileTests/OpenMP_tests/private.c
   branches/testonly/tests/CompileTests/OpenMP_tests/privatej.c
   branches/testonly/tests/CompileTests/OpenMP_tests/recursive.c
   branches/testonly/tests/CompileTests/OpenMP_tests/reduction.c
   branches/testonly/tests/CompileTests/OpenMP_tests/reduction2.c
   branches/testonly/tests/CompileTests/OpenMP_tests/section.c
   branches/testonly/tests/CompileTests/OpenMP_tests/set_num_threads.c
   branches/testonly/tests/CompileTests/OpenMP_tests/single_copyprivate.c
   branches/testonly/tests/CompileTests/OpenMP_tests/spmd1.c
   branches/testonly/tests/CompileTests/OpenMP_tests/staticChunk.c
   branches/testonly/tests/CompileTests/OpenMP_tests/subteam.c
   branches/testonly/tests/CompileTests/OpenMP_tests/subteam2.c
   branches/testonly/tests/CompileTests/OpenMP_tests/task_largenumber.c
   branches/testonly/tests/CompileTests/OpenMP_tests/task_link.cpp
   branches/testonly/tests/CompileTests/OpenMP_tests/task_orphaned.c
   branches/testonly/tests/CompileTests/OpenMP_tests/task_tree.cpp
   branches/testonly/tests/CompileTests/OpenMP_tests/task_underIf.c
   branches/testonly/tests/CompileTests/OpenMP_tests/task_untied.c
   branches/testonly/tests/CompileTests/OpenMP_tests/task_wait.c
   branches/testonly/tests/CompileTests/OpenMP_tests/threadProcessor.c
   branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate.c
   branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate2.c
   branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate3.c
   branches/testonly/tests/CompileTests/OpenMP_tests/variables.c
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/Makefile.am
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/runTest.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/test1.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/mpi.c
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.output
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test10.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test11.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test12.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test13.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test14.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test15.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test16.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test17.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test18.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test19.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.output
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test20.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test21.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test22.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test23.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.output
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.output
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test5.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test6.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test7.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test8.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test9.C
   branches/testonly/tutorial/dwarfAnalysis.C
   branches/testonly/tutorial/dwarfInstructionAddressToSourceLineAnalysis.C
   branches/testonly/tutorial/inputCode_dwarfAnalysis.C
Removed:
   branches/testonly/projects/OpenMP_Parser/
   branches/testonly/projects/arrayOptimization/ArrayAnnot.C
   branches/testonly/projects/arrayOptimization/ArrayAnnot.h
   branches/testonly/projects/arrayOptimization/ArrayInterface.C
   branches/testonly/projects/arrayOptimization/ArrayInterface.h
   branches/testonly/projects/arrayOptimization/ArrayRewrite.C
   branches/testonly/projects/arrayOptimization/ArrayRewrite.h
   branches/testonly/projects/autoParallelization/Makefile.am
   branches/testonly/projects/autoParallelization/README
   branches/testonly/projects/autoParallelization/autoPar.C
   branches/testonly/projects/autoParallelization/makefile.external
   branches/testonly/projects/autoParallelization/tests/
   branches/testonly/projects/autoParallelization/tests/Index.annot
   branches/testonly/projects/autoParallelization/tests/Makefile.am
   branches/testonly/projects/autoParallelization/tests/anti_dep.c
   branches/testonly/projects/autoParallelization/tests/doall.c
   branches/testonly/projects/autoParallelization/tests/doall_2.c
   branches/testonly/projects/autoParallelization/tests/doall_vector.C
   branches/testonly/projects/autoParallelization/tests/firstprivate.c
   branches/testonly/projects/autoParallelization/tests/floatArray.annot
   branches/testonly/projects/autoParallelization/tests/funcs.annot
   branches/testonly/projects/autoParallelization/tests/inner_only.c
   branches/testonly/projects/autoParallelization/tests/interp1_elem.C
   branches/testonly/projects/autoParallelization/tests/jacobi_seq.c
   branches/testonly/projects/autoParallelization/tests/lastprivate.c
   branches/testonly/projects/autoParallelization/tests/matrixmultiply.c
   branches/testonly/projects/autoParallelization/tests/output_dep.c
   branches/testonly/projects/autoParallelization/tests/output_dep2.c
   branches/testonly/projects/autoParallelization/tests/output_dep3.c
   branches/testonly/projects/autoParallelization/tests/pointer.c
   branches/testonly/projects/autoParallelization/tests/private.c
   branches/testonly/projects/autoParallelization/tests/reduction.c
   branches/testonly/projects/autoParallelization/tests/scalar_privatization.c
   branches/testonly/projects/autoParallelization/tests/shared.c
   branches/testonly/projects/autoParallelization/tests/simpleA++.h
   branches/testonly/projects/autoParallelization/tests/true_dep.c
   branches/testonly/projects/autoParallelization/tests/true_dep_2.c
   branches/testonly/projects/autoParallelization/tests/true_l2.c
   branches/testonly/projects/autoParallelization/tests/vector_1.C
   branches/testonly/projects/autoParallelization/tests/vector_2.C
   branches/testonly/projects/autoParallelization/tests/vectorize_1.c
   branches/testonly/projects/compass/extensions/checkers/pointerComparison/compass_parameters
   branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.C
   branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.compass.external.makefile
   branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.inc
   branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonDocs.tex
   branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonMain.C
   branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonTest1.C
   branches/testonly/src/3rdPartyLibraries/libltdl/
   branches/testonly/src/ROSETTA/Grammar/grammarReturnDataMemberReferenceToPointers.macro
   branches/testonly/src/frontend/CxxFrontend/roseBinaryEDG-i686-apple-darwin9.5.0-646e04576d4266880b4066826540b2ae.tar.gz
   branches/testonly/src/frontend/CxxFrontend/roseBinaryEDG-i686-pc-linux-gnu-646e04576d4266880b4066826540b2ae.tar.gz
   branches/testonly/src/frontend/CxxFrontend/roseBinaryEDG-x86_64-pc-linux-gnu-646e04576d4266880b4066826540b2ae.tar.gz
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.C
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.C
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex
   branches/testonly/src/frontend/SageIII/preproc.C
   branches/testonly/src/frontend/SageIII/preproc.lex
   branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayAnnot.C
   branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayAnnot.h
   branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayInterface.C
   branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayInterface.h
   branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayRewrite.C
   branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayRewrite.h
   branches/testonly/src/midend/loopProcessing/outsideInterface/Makefile.am
   branches/testonly/src/midend/programAnalysis/defUseAnalysis/filteredCFG.h
   branches/testonly/src/midend/programAnalysis/defUseAnalysis/filteredCFGImpl.h
   branches/testonly/src/roseIndependentSupport/dot2gml/parseDot.lex
   branches/testonly/src/roseIndependentSupport/dot2gml/parseDot.y
   branches/testonly/tests/CompileTests/OpenMP_tests/3loops.c
   branches/testonly/tests/CompileTests/OpenMP_tests/Makefile.am
   branches/testonly/tests/CompileTests/OpenMP_tests/README
   branches/testonly/tests/CompileTests/OpenMP_tests/atomic.c
   branches/testonly/tests/CompileTests/OpenMP_tests/collapse.c
   branches/testonly/tests/CompileTests/OpenMP_tests/copyin.c
   branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate.c
   branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate2.c
   branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate3.c
   branches/testonly/tests/CompileTests/OpenMP_tests/critical.c
   branches/testonly/tests/CompileTests/OpenMP_tests/critical_dead.c
   branches/testonly/tests/CompileTests/OpenMP_tests/critical_orphaned.c
   branches/testonly/tests/CompileTests/OpenMP_tests/dynamicChunk.c
   branches/testonly/tests/CompileTests/OpenMP_tests/empty.c
   branches/testonly/tests/CompileTests/OpenMP_tests/expressions.c
   branches/testonly/tests/CompileTests/OpenMP_tests/falsesharing.c
   branches/testonly/tests/CompileTests/OpenMP_tests/firstlastprivate.c
   branches/testonly/tests/CompileTests/OpenMP_tests/flush.c
   branches/testonly/tests/CompileTests/OpenMP_tests/get_max_threads.c
   branches/testonly/tests/CompileTests/OpenMP_tests/hello-ordered.c
   branches/testonly/tests/CompileTests/OpenMP_tests/hello.c
   branches/testonly/tests/CompileTests/OpenMP_tests/lastprivate.c
   branches/testonly/tests/CompileTests/OpenMP_tests/lastprivate0.c
   branches/testonly/tests/CompileTests/OpenMP_tests/limits_threads.c
   branches/testonly/tests/CompileTests/OpenMP_tests/lockarray.c
   branches/testonly/tests/CompileTests/OpenMP_tests/lu_factorization.c
   branches/testonly/tests/CompileTests/OpenMP_tests/masterSingle.c
   branches/testonly/tests/CompileTests/OpenMP_tests/matrix_vector.c
   branches/testonly/tests/CompileTests/OpenMP_tests/nestedpar.c
   branches/testonly/tests/CompileTests/OpenMP_tests/nestedpar1.c
   branches/testonly/tests/CompileTests/OpenMP_tests/omp1.c
   branches/testonly/tests/CompileTests/OpenMP_tests/ompfor.c
   branches/testonly/tests/CompileTests/OpenMP_tests/ordered.c
   branches/testonly/tests/CompileTests/OpenMP_tests/ordered2.c
   branches/testonly/tests/CompileTests/OpenMP_tests/orphaned-directives.c
   branches/testonly/tests/CompileTests/OpenMP_tests/parallel.c
   branches/testonly/tests/CompileTests/OpenMP_tests/parallelfor.c
   branches/testonly/tests/CompileTests/OpenMP_tests/parseOmp.C
   branches/testonly/tests/CompileTests/OpenMP_tests/private.c
   branches/testonly/tests/CompileTests/OpenMP_tests/privatej.c
   branches/testonly/tests/CompileTests/OpenMP_tests/recursive.c
   branches/testonly/tests/CompileTests/OpenMP_tests/reduction.c
   branches/testonly/tests/CompileTests/OpenMP_tests/reduction2.c
   branches/testonly/tests/CompileTests/OpenMP_tests/section.c
   branches/testonly/tests/CompileTests/OpenMP_tests/set_num_threads.c
   branches/testonly/tests/CompileTests/OpenMP_tests/single_copyprivate.c
   branches/testonly/tests/CompileTests/OpenMP_tests/spmd1.c
   branches/testonly/tests/CompileTests/OpenMP_tests/staticChunk.c
   branches/testonly/tests/CompileTests/OpenMP_tests/subteam.c
   branches/testonly/tests/CompileTests/OpenMP_tests/subteam2.c
   branches/testonly/tests/CompileTests/OpenMP_tests/task_largenumber.c
   branches/testonly/tests/CompileTests/OpenMP_tests/task_link.cpp
   branches/testonly/tests/CompileTests/OpenMP_tests/task_orphaned.c
   branches/testonly/tests/CompileTests/OpenMP_tests/task_tree.cpp
   branches/testonly/tests/CompileTests/OpenMP_tests/task_underIf.c
   branches/testonly/tests/CompileTests/OpenMP_tests/task_untied.c
   branches/testonly/tests/CompileTests/OpenMP_tests/task_wait.c
   branches/testonly/tests/CompileTests/OpenMP_tests/threadProcessor.c
   branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate.c
   branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate2.c
   branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate3.c
   branches/testonly/tests/CompileTests/OpenMP_tests/variables.c
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/Makefile.am
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/runTest.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/test1.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/mpi.c
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.output
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test10.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test11.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test12.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test13.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test14.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test15.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test16.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test17.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test18.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test19.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.output
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test20.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test21.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test22.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test23.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.output
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.output
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test5.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test6.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test7.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test8.C
   branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test9.C
Modified:
   branches/testonly/Makefile.am
   branches/testonly/build
   branches/testonly/config/Makefile.am
   branches/testonly/config/Makefile.for.ROSE.includes.and.libs
   branches/testonly/configure.in
   branches/testonly/docs/Rose/Makefile.am
   branches/testonly/docs/Rose/Tutorial/abstractHandle.tex
   branches/testonly/docs/Rose/Tutorial/binaryAnalysis.tex
   branches/testonly/docs/Rose/Tutorial/loopOptimization.tex
   branches/testonly/docs/Rose/Tutorial/tutorial.tex.in
   branches/testonly/docs/Rose/developersAppendix.tex
   branches/testonly/docs/Rose/installRose.tex
   branches/testonly/docs/Rose/leftmenu.html.in
   branches/testonly/docs/Rose/manual.tex.in
   branches/testonly/docs/Rose/rose.cfg.in
   branches/testonly/docs/Rose/roseHelpOutput.txt
   branches/testonly/projects/AstEquivalence/Makefile.am
   branches/testonly/projects/AstEquivalence/astEquivalenceGui.C
   branches/testonly/projects/AstEquivalence/astEquivalenceMainGui.C
   branches/testonly/projects/AstEquivalence/evaluateAllBinaries.C
   branches/testonly/projects/AstEquivalence/gui/compilerFlagsGui.C
   branches/testonly/projects/AstEquivalence/gui/compilerFlagsMainGui.C
   branches/testonly/projects/AstEquivalence/runIDA.C
   branches/testonly/projects/BinQ/BinQGui.C
   branches/testonly/projects/BinQ/BinQGui.h
   branches/testonly/projects/BinQ/BinQMain.C
   branches/testonly/projects/BinQ/BinQSupport.C
   branches/testonly/projects/BinQ/BinQSupport.h
   branches/testonly/projects/BinQ/Makefile.am
   branches/testonly/projects/BinaryCloneDetection/gui/binaryCloneGui.C
   branches/testonly/projects/Makefile.am
   branches/testonly/projects/OpenMP_Translator/ompTranslator.C
   branches/testonly/projects/arrayOptimization/ArrayProcessor.C
   branches/testonly/projects/arrayOptimization/Makefile.am
   branches/testonly/projects/arrayOptimization/test/Makefile.am
   branches/testonly/projects/arrayOptimization/test/TestDriver
   branches/testonly/projects/arrayOptimization/test/floatArray.annot
   branches/testonly/projects/arrayOptimization/test/simpleA++.h
   branches/testonly/projects/binCompass/Makefile.am
   branches/testonly/projects/binCompass/binCompassMain.cpp
   branches/testonly/projects/binaryVisualization/Makefile.am
   branches/testonly/projects/binaryVisualization/vizzBinary.C
   branches/testonly/projects/compass/extensions/checkers/binPrintAsmFunctions/binPrintAsmFunctionsDocs.tex
   branches/testonly/projects/compass/extensions/checkers/binPrintAsmInstruction/binPrintAsmInstructionDocs.tex
   branches/testonly/projects/compass/extensions/checkers/binaryBufferOverflow/binaryBufferOverflowDocs.tex
   branches/testonly/projects/compass/extensions/checkers/binaryInterruptAnalysis/binaryInterruptAnalysisDocs.tex
   branches/testonly/projects/compass/extensions/checkers/nameConsistency/checkNameImpl.C
   branches/testonly/projects/compass/extensions/prerequisites/BinDataFlowPrerequisite.h
   branches/testonly/projects/compass/src/compassSupport/compass.C
   branches/testonly/projects/compass/src/compass_scripts/compass_template_generator/compass.C
   branches/testonly/projects/compass/src/util/MPIAbstraction/alt-mpi-headers/gen-headers.py
   branches/testonly/projects/compass/tools/compass/CHECKER_LIST
   branches/testonly/projects/compass/tools/compass/RULE_SELECTION.in
   branches/testonly/projects/compass/tools/compass/buildCheckers.C
   branches/testonly/projects/compass/tools/compass/checkers.h
   branches/testonly/projects/compass/tools/compass/doc/Makefile.am
   branches/testonly/projects/compass/tools/compass/doc/compass.tex.in
   branches/testonly/projects/compass/tools/compass/doc/usingCompass.tex
   branches/testonly/projects/palette/Makefile.am
   branches/testonly/projects/palette/rose.P
   branches/testonly/projects/runtimeErrorCheck/Makefile.am
   branches/testonly/projects/runtimeErrorCheck/runtimeCheck.cpp
   branches/testonly/rose.docs.in
   branches/testonly/src/3rdPartyLibraries/Makefile.am
   branches/testonly/src/Makefile.am
   branches/testonly/src/ROSETTA/Grammar/BinaryInstruction.code
   branches/testonly/src/ROSETTA/Grammar/Common.code
   branches/testonly/src/ROSETTA/Grammar/Cxx_GlobalDeclarations.macro
   branches/testonly/src/ROSETTA/Grammar/Node.code
   branches/testonly/src/ROSETTA/Grammar/Support.code
   branches/testonly/src/ROSETTA/astNodeList
   branches/testonly/src/ROSETTA/src/Makefile.am
   branches/testonly/src/ROSETTA/src/binaryInstruction.C
   branches/testonly/src/ROSETTA/src/buildStorageClasses.C
   branches/testonly/src/ROSETTA/src/grammar.C
   branches/testonly/src/ROSETTA/src/grammar.h
   branches/testonly/src/ROSETTA/src/statement.C
   branches/testonly/src/ROSETTA/src/support.C
   branches/testonly/src/ROSETTA/src/terminal.C
   branches/testonly/src/ROSETTA/src/terminal.h
   branches/testonly/src/backend/asmUnparser/unparseArmAsm.C
   branches/testonly/src/backend/asmUnparser/unparseAsm.h
   branches/testonly/src/backend/asmUnparser/unparsePowerpcAsm.C
   branches/testonly/src/backend/asmUnparser/unparseX86Asm.C
   branches/testonly/src/backend/unparser/CxxCodeGeneration/unparseCxx_types.C
   branches/testonly/src/backend/unparser/FortranCodeGeneration/Makefile.am
   branches/testonly/src/backend/unparser/FortranCodeGeneration/unparseFortran_statements.C
   branches/testonly/src/backend/unparser/languageIndependenceSupport/unparseLanugageIndependentConstructs.C
   branches/testonly/src/backend/unparser/unparser.C
   branches/testonly/src/frontend/BinaryDisassembly/Makefile.am
   branches/testonly/src/frontend/BinaryDisassembly/RoseBin.cpp
   branches/testonly/src/frontend/BinaryDisassembly/RoseBin_DB.cpp
   branches/testonly/src/frontend/BinaryDisassembly/RoseBin_DB.h
   branches/testonly/src/frontend/BinaryDisassembly/RoseBin_DB_IDAPRO.cpp
   branches/testonly/src/frontend/BinaryDisassembly/RoseBin_DB_IDAPRO.h
   branches/testonly/src/frontend/BinaryDisassembly/RoseBin_instruction_table_x86
   branches/testonly/src/frontend/BinaryDisassembly/RoseBin_support.h
   branches/testonly/src/frontend/BinaryDisassembly/instructionDispatch.cpp
   branches/testonly/src/frontend/BinaryDisassembly/make-decision-tree.tcl
   branches/testonly/src/frontend/BinaryDisassembly/powerpcInstructionEnum.h
   branches/testonly/src/frontend/BinaryDisassembly/powerpcInstructionEnumPrinter.C
   branches/testonly/src/frontend/BinaryDisassembly/powerpcInstructionProperties.C
   branches/testonly/src/frontend/BinaryDisassembly/readTicl.C
   branches/testonly/src/frontend/BinaryDisassembly/x86InstructionProperties.C
   branches/testonly/src/frontend/CxxFrontend/Makefile.am
   branches/testonly/src/frontend/Disassemblers/disassemblerCommon.C
   branches/testonly/src/frontend/Disassemblers/disassemblers.h
   branches/testonly/src/frontend/Disassemblers/powerpcDisassembler.C
   branches/testonly/src/frontend/Disassemblers/x86Disassembler.C
   branches/testonly/src/frontend/ExecFormats/ROSE_ExecDOS.C
   branches/testonly/src/frontend/ExecFormats/ROSE_ExecELF.C
   branches/testonly/src/frontend/ExecFormats/ROSE_ExecGeneric.C
   branches/testonly/src/frontend/ExecFormats/ROSE_ExecLE.C
   branches/testonly/src/frontend/ExecFormats/ROSE_ExecNE.C
   branches/testonly/src/frontend/ExecFormats/ROSE_ExecPE.C
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranParserActionROSE.C
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/Makefile.am
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/fortran_support.C
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/fortran_support.h
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/openFortranParser_main.C
   branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/token.c
   branches/testonly/src/frontend/SageIII/Makefile.am
   branches/testonly/src/frontend/SageIII/astMerge/fixupTraversal.C
   branches/testonly/src/frontend/SageIII/astMerge/merge.C
   branches/testonly/src/frontend/SageIII/astMerge/nullifyAST.C
   branches/testonly/src/frontend/SageIII/astPostProcessing/fixupDefiningAndNondefiningDeclarations.C
   branches/testonly/src/frontend/SageIII/astTokenStream/linearizeAST.C
   branches/testonly/src/frontend/SageIII/astTokenStream/linearizeAST.h
   branches/testonly/src/frontend/SageIII/astVisualization/wholeAST.C
   branches/testonly/src/frontend/SageIII/attachPreprocessingInfo.C
   branches/testonly/src/frontend/SageIII/rtiHelpers.h
   branches/testonly/src/frontend/SageIII/sage3.h
   branches/testonly/src/frontend/SageIII/sageInterface/Makefile.am
   branches/testonly/src/frontend/SageIII/sageInterface/sageBuilder.C
   branches/testonly/src/frontend/SageIII/sageInterface/sageInterface.C
   branches/testonly/src/frontend/SageIII/sageInterface/sageInterface.h
   branches/testonly/src/frontend/SageIII/sageSupport.C
   branches/testonly/src/frontend/SageIII/virtualCFG/filteredCFGImpl.h
   branches/testonly/src/frontend/SageIII/virtualCFG/virtualCFG.C
   branches/testonly/src/frontend/SageIII/virtualCFG/virtualCFG.h
   branches/testonly/src/midend/abstractHandle/loopAdapter.cpp
   branches/testonly/src/midend/abstractHandle/loopAdapter.h
   branches/testonly/src/midend/abstractHandle/makefile-myloop
   branches/testonly/src/midend/abstractHandle/myloop.h
   branches/testonly/src/midend/abstractHandle/testMyLoop.cpp
   branches/testonly/src/midend/astDiagnostics/AstConsistencyTests.C
   branches/testonly/src/midend/astInlining/inlinerSupport.C
   branches/testonly/src/midend/astProcessing/AstDOTGeneration.C
   branches/testonly/src/midend/astProcessing/AstProcessing.C
   branches/testonly/src/midend/astRewriteMechanism/rewriteMidLevelInterfaceTemplatesImpl.h
   branches/testonly/src/midend/astUtil/annotation/AnnotCollect.h
   branches/testonly/src/midend/astUtil/annotation/AnnotDescriptors.C
   branches/testonly/src/midend/astUtil/annotation/AnnotDescriptors.h
   branches/testonly/src/midend/astUtil/annotation/AnnotExpr.C
   branches/testonly/src/midend/astUtil/annotation/AnnotExpr.h
   branches/testonly/src/midend/astUtil/annotation/CPPAnnotation.h
   branches/testonly/src/midend/astUtil/annotation/OperatorAnnotation.h
   branches/testonly/src/midend/astUtil/annotation/TypeAnnotation.h
   branches/testonly/src/midend/astUtil/astInterface/AstInterface.C
   branches/testonly/src/midend/astUtil/astInterface/AstInterface.h
   branches/testonly/src/midend/astUtil/astInterface/CPPAstInterface.C
   branches/testonly/src/midend/astUtil/astInterface/CPPAstInterface.h
   branches/testonly/src/midend/astUtil/astSupport/AnalysisInterface.h
   branches/testonly/src/midend/astUtil/astSupport/ProcessAstTree.C
   branches/testonly/src/midend/astUtil/astSupport/ProcessAstTree.h
   branches/testonly/src/midend/astUtil/astSupport/StmtInfoCollect.C
   branches/testonly/src/midend/astUtil/astSupport/StmtInfoCollect.h
   branches/testonly/src/midend/astUtil/symbolicVal/SymbolicBound.C
   branches/testonly/src/midend/astUtil/symbolicVal/SymbolicBound.h
   branches/testonly/src/midend/astUtil/symbolicVal/SymbolicVal.h
   branches/testonly/src/midend/binaryAnalyses/RoseBin_FlowAnalysis.cpp
   branches/testonly/src/midend/binaryAnalyses/RoseBin_FlowAnalysis.h
   branches/testonly/src/midend/binaryAnalyses/graph/RoseBin_DotGraph.cpp
   branches/testonly/src/midend/loopProcessing/Makefile.am
   branches/testonly/src/midend/loopProcessing/depGraph/DepGraphBuild.C
   branches/testonly/src/midend/loopProcessing/depGraph/DepGraphBuild.h
   branches/testonly/src/midend/loopProcessing/depInfo/DepEDD.h
   branches/testonly/src/midend/loopProcessing/depInfo/DepInfo.C
   branches/testonly/src/midend/loopProcessing/depInfo/DepInfo.h
   branches/testonly/src/midend/loopProcessing/depInfo/DepInfoAnal.C
   branches/testonly/src/midend/loopProcessing/depInfo/DepInfoAnal.h
   branches/testonly/src/midend/loopProcessing/depInfo/DomainInfo.h
   branches/testonly/src/midend/loopProcessing/driver/LoopTransformInterface.C
   branches/testonly/src/midend/loopProcessing/driver/LoopTransformInterface.h
   branches/testonly/src/midend/loopProcessing/driver/LoopTransformOptions.C
   branches/testonly/src/midend/loopProcessing/driver/LoopTransformOptions.h
   branches/testonly/src/midend/programAnalysis/CFG/CFG.h
   branches/testonly/src/midend/programAnalysis/CFG/CFGImpl.h
   branches/testonly/src/midend/programAnalysis/dataflowAnalysis/DataFlowAnalysis.C
   branches/testonly/src/midend/programAnalysis/dataflowAnalysis/DataFlowAnalysis.h
   branches/testonly/src/midend/programAnalysis/dataflowAnalysis/DefUseChain.h
   branches/testonly/src/midend/programAnalysis/dataflowAnalysis/ReachingDefinition.C
   branches/testonly/src/midend/programAnalysis/dataflowAnalysis/ReachingDefinition.h
   branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysis.cpp
   branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysis_perFunction.cpp
   branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysis_perFunction.h
   branches/testonly/src/midend/programAnalysis/defUseAnalysis/Makefile.am
   branches/testonly/src/midend/programAnalysis/defUseAnalysis/dfaToDot.cpp
   branches/testonly/src/midend/programAnalysis/defUseAnalysis/dfaToDot.h
   branches/testonly/src/midend/programAnalysis/dominanceAnalysis/Makefile.am
   branches/testonly/src/midend/programAnalysis/valuePropagation/ValueAnnot.C
   branches/testonly/src/midend/programAnalysis/valuePropagation/ValueAnnot.h
   branches/testonly/src/rose.h
   branches/testonly/src/roseIndependentSupport/dot2gml/Makefile.am
   branches/testonly/src/roseInternal.h
   branches/testonly/src/util/commandlineProcessing/commandline_processing.C
   branches/testonly/src/util/commandlineProcessing/commandline_processing.h
   branches/testonly/src/util/graphs/BaseGraphCreate.h
   branches/testonly/src/util/graphs/DGBaseGraphImpl.h
   branches/testonly/src/util/graphs/GraphAccess.h
   branches/testonly/src/util/graphs/MultiGraphCreate.h
   branches/testonly/src/util/graphs/VirtualGraphCreate.h
   branches/testonly/src/util/stringSupport/string_functions.C
   branches/testonly/src/util/stringSupport/string_functions.h
   branches/testonly/src/util/support/BitVectorRepr.h
   branches/testonly/src/util/support/CommandOptions.h
   branches/testonly/src/util/support/CountRefHandle.h
   branches/testonly/src/util/support/DirectedGraph.h
   branches/testonly/src/util/support/FunctionObject.h
   branches/testonly/src/util/support/SinglyLinkedList.h
   branches/testonly/src/util/support/union_find.h
   branches/testonly/tests/CompileTests/Fortran_tests/Makefile.am
   branches/testonly/tests/CompileTests/Fortran_tests/test2007_176.f03
   branches/testonly/tests/CompileTests/Fortran_tests/test2007_236.f90
   branches/testonly/tests/CompileTests/Fortran_tests/test2007_250.f90
   branches/testonly/tests/CompileTests/Fortran_tests/test2007_258.f
   branches/testonly/tests/CompileTests/Fortran_tests/test2007_33.f90
   branches/testonly/tests/CompileTests/Fortran_tests/test2007_37.f03
   branches/testonly/tests/CompileTests/Fortran_tests/test2007_40.f90
   branches/testonly/tests/CompileTests/Fortran_tests/test2007_41.f03
   branches/testonly/tests/CompileTests/Makefile.am
   branches/testonly/tests/CompileTests/virtualCFG_tests/testVirtualCFG.C
   branches/testonly/tests/CompilerOptionsTests/testFileNamesAndExtensions/Makefile.am
   branches/testonly/tests/roseTests/astOutliningTests/fortranTests/Makefile.am
   branches/testonly/tests/roseTests/programAnalysisTests/Makefile.am
   branches/testonly/tests/roseTests/programAnalysisTests/defUseAnalysisTests/Makefile.am
   branches/testonly/tests/roseTests/programAnalysisTests/defUseAnalysisTests/runTest.C
   branches/testonly/tests/roseTests/programTransformationTests/finiteDifferencingDemo.C
   branches/testonly/tutorial/Makefile.am
   branches/testonly/tutorial/abstractHandle2.cpp
   branches/testonly/tutorial/binaryAnalysis_symbolTable.C
Log:
svn merge -r 102:128 https://outreach.scidac.gov/svn/rose/trunk


Modified: branches/testonly/Makefile.am
===================================================================
--- branches/testonly/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -13,9 +13,9 @@
 # they generate data that is subsequently used in the generated 
 # ROSE documentation (examples, input codes, and generated output).
 # SUBDIRS = config src projects tests tutorial exampleTranslators docs developersScratchSpace tools proposals scripts
-SUBDIRS = config src projects tests tutorial exampleTranslators docs tools scripts $(DEVELOPER_DISTRIBUTION_DIRECTORY)
+SUBDIRS = libltdl config src projects tests tutorial exampleTranslators docs tools scripts $(DEVELOPER_DISTRIBUTION_DIRECTORY)
 
-ACLOCAL_AMFLAGS = -I ./config -I ./acmacros -I ./src/3rdPartyLibraries/libltdl -I /usr/share/aclocal
+ACLOCAL_AMFLAGS = -I ./config -I ./acmacros -I ./libltdl -I /usr/share/aclocal
 
 # Force rose.docs to be make by default 
 # (if rose.docs.in is modified)

Modified: branches/testonly/build
===================================================================
--- branches/testonly/build	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/build	2008-11-18 06:54:05 UTC (rev 129)
@@ -26,15 +26,16 @@
 # JJW (10/5/2008): force glibtoolize on Mac, even for external releases where
 # it wouldn't otherwise be needed (the files are there, they just don't work
 # when linking in Java)
-if test -x /usr/bin/glibtoolize; then
-  /usr/bin/glibtoolize --force
-elif test -f ./config/ltmain.sh; then
-  :
-else
-  libtoolize
+# JJW (11/8/2008): force libtoolize everywhere, and prefer libtoolize to
+# glibtoolize if it is present (libltdl is missing on ninjai, so I need to use
+# my own libtool installation)
+if which libtoolize > /dev/null; then
+  libtoolize --force --copy --ltdl --automake
+elif which glibtoolize > /dev/null; then
+  glibtoolize --force --copy --ltdl --automake
 fi
 
-aclocal -I ./config -I ./acmacros -I ./src/3rdPartyLibraries/libltdl -I /usr/share/aclocal || : exit 1
+aclocal -I ./config -I ./acmacros -I /usr/share/aclocal || : exit 1
 
 # autoheader --warnings=obsolete,all || : exit 1
 autoheader || : exit 1
@@ -53,14 +54,14 @@
 touch stamp-h1.in || : exit 1
 
 # Do the same steps in libltdl
-(cd src/3rdPartyLibraries/libltdl && aclocal && automake --add-missing && autoconf)
+# (cd libltdl && aclocal && automake --add-missing && autoconf)
 # We can't reconfigure their code yet (autoconf too old)
 # (cd src/3rdPartyLibraries/libharu-2.1.0 && autoreconf)
 
 # Rewrite a couple of makefile rules to be less verbose so (1) we can actually see the warning messages
 # and (2) XEmacs doesn't get regexp stack overflows when parsing compiler output.
 if [ "$do_quiet" = "yes" ]; then
-    find . -name Makefile.in | grep -v libharu | xargs sed -i~ \
+    find . -name Makefile.in | grep -v libharu | grep -v libltdl | xargs sed -i~ \
 	-e 's/^\(LT\)\{0,1\}\(CXX\)\{0,1\}COMPILE =/& @echo "  COMPILE $@";/' \
 	-e 's/^\(CXX\)\{0,1\}LINK =/& @echo "  LINK    $@";/'       \
 	-e 's/@LIBTOOL@/& --quiet/g'

Modified: branches/testonly/config/Makefile.am
===================================================================
--- branches/testonly/config/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/config/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -22,9 +22,9 @@
      install-sh \
      dirincludes \
      create_system_headers \
-     macro_names_to_remove
+     macro_names_to_remove \
+     cleanConfigGuessOutput
 
-
 # DQ (9/3/2006): I think that if we have config.guess, depend, install-sh, and dirincludes; then we don't need "missing"
 # missing
 

Modified: branches/testonly/config/Makefile.for.ROSE.includes.and.libs
===================================================================
--- branches/testonly/config/Makefile.for.ROSE.includes.and.libs	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/config/Makefile.for.ROSE.includes.and.libs	2008-11-18 06:54:05 UTC (rev 129)
@@ -114,6 +114,14 @@
 # ROSE_YICES_LIB_FILE = libyices.a
 endif
 
+# ROSE-DWARF libdwarf
+if ROSE_USE_DWARF
+  ROSE_DWARF_INCLUDES = -I$(dwarf_path)
+  ROSE_DWARF_LIBS = -ldwarf
+  ROSE_DWARF_LIBS_WITH_PATH = $(dwarf_path)/libdwarf.a -lelf
+# ROSE_DWARF_LIB_FILE = libdwarf.a
+endif
+
 # ROSE-WINE Package (Wine is a package to permit execution of Windows binaries under Linux)
 if ROSE_USE_WINDOWS_ANALYSIS_SUPPORT
   ROSE_WINE_INCLUDES = -I$(wine_path)/include
@@ -182,6 +190,10 @@
      -I$(top_srcdir)/src/midend/programAnalysis/pointerAnal \
      -I$(top_srcdir)/src/midend/programAnalysis/valuePropagation \
      -I$(top_srcdir)/src/midend/loopProcessing/driver \
+     -I$(top_srcdir)/src/midend/loopProcessing/computation \
+     -I$(top_srcdir)/src/midend/loopProcessing/outsideInterface \
+     -I$(top_srcdir)/src/midend/loopProcessing/depGraph \
+     -I$(top_srcdir)/src/midend/loopProcessing/depInfo \
       $(ROSE_SIDEEFFECTS_INCLUDE) \
       $(ROSE_DATABASE_INCLUDE) \
       $(ROSE_GUI_INCLUDE) \
@@ -198,7 +210,6 @@
      -I$(top_srcdir)/src/roseSupport \
      -I$(top_srcdir)/src/3rdPartyLibraries/MSTL \
 \
-     -I$(top_srcdir)/src/3rdPartyLibraries/libltdl \
      -I$(top_srcdir)/src/3rdPartyLibraries/libharu-2.1.0/include \
      -I$(top_builddir)/src/3rdPartyLibraries/libharu-2.1.0/include \
      -I$(top_srcdir)/src/3rdPartyLibraries/qrose/Framework \
@@ -206,11 +217,17 @@
      -I$(top_srcdir)/projects/dataBase \
      -I$(top_srcdir)/src/util/graphs \
      -I$(top_srcdir)/src/midend/astUtil/astInterface \
+     -I$(top_srcdir)/libltdl \
      $(ROSE_PHP_INCLUDES) \
+     $(ROSE_YICES_INCLUDES) \
+     $(ROSE_DWARF_INCLUDES) \
+     $(ROSE_WINE_INCLUDES) \
      $(VALGRIND_CFLAGS) \
      $(BOOST_CPPFLAGS) $(SQLITE3_CFLAGS) -DBOOST_REGEX_MATCH_EXTRA
 
-# DQ: Not used currently
+# DQ (10/28/2008): I think these should be included, I don't know why they 
+# were removed (used with Microsoft Windows tests, and Yices tests).
+# DQ: Not used currently 
 #     $(ROSE_YICES_INCLUDES)
 #     $(ROSE_WINE_INCLUDES)
 
@@ -237,7 +254,7 @@
   $(BOOST_THREAD_LIB) $(BOOST_FILESYSTEM_LIB) $(BOOST_PROGRAM_OPTIONS_LIB) \
   $(BOOST_REGEX_LIB)  $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB)  \
   $(BOOST_WAVE_LIB) $(SQLITE3_LDFLAGS)  $(JAVA_JVM_LINK) $(RT_LIBS) \
-  $(ROSE_YICES_LIBS_WITH_PATH) $(ROSE_PHP_LIBS_WITH_PATH) \
+  $(ROSE_YICES_LIBS_WITH_PATH) $(ROSE_DWARF_LIBS_WITH_PATH) $(ROSE_PHP_LIBS_WITH_PATH) \
   $(ROSE_GUI_LIBS_WITH_PATH) $(ROSE_QT_LIBS_WITH_PATH)
 
 # This ROSE_SEPARATE_LIBS is used for the linking of preprocessor.C used within

Copied: branches/testonly/config/cleanConfigGuessOutput (from rev 128, trunk/config/cleanConfigGuessOutput)
===================================================================
--- branches/testonly/config/cleanConfigGuessOutput	                        (rev 0)
+++ branches/testonly/config/cleanConfigGuessOutput	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,3 @@
+#!/bin/sh
+# echo "cleanConfigGuessOutput \'$1\'" >&2
+echo "$1" | sed 's/-unknown-/-pc-/' | sed 's/-redhat-/-pc-/' | sed 's/-darwin[^-]*$/-darwin/' | sed 's/^i386-apple-/i686-apple-/'

Copied: branches/testonly/config/support-dwarf.m4 (from rev 128, trunk/config/support-dwarf.m4)
===================================================================
--- branches/testonly/config/support-dwarf.m4	                        (rev 0)
+++ branches/testonly/config/support-dwarf.m4	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,31 @@
+AC_DEFUN([ROSE_SUPPORT_DWARF],
+[
+# Begin macro ROSE_SUPPORT_DWARF.
+
+# Inclusion of test for DWARF libdwarf library and it's location.
+
+AC_MSG_CHECKING(for dwarf)
+AC_ARG_WITH(dwarf,
+[  --with-dwarf=PATH	Specify the path where libdwarf is installed],
+,
+if test ! "$with_dwarf" ; then
+   with_dwarf=no
+fi
+)
+
+echo "In ROSE SUPPORT MACRO: with_dwarf $with_dwarf"
+
+if test "$with_dwarf" = no; then
+   # If dwarf is not specified, then don't use it.
+   echo "Skipping use of Dwarf (libdwarf) support!"
+else
+   dwarf_path=$with_dwarf
+   echo "Setup Dwarf support in ROSE! path = $dwarf_path"
+   AC_DEFINE([USE_ROSE_DWARF_SUPPORT],1,[Controls use of ROSE support for Dwarf (libdwarf) library.])
+fi
+
+AC_SUBST(dwarf_path)
+
+# End macro ROSE_SUPPORT_DWARF.
+]
+)

Copied: branches/testonly/config/ylwrap (from rev 128, trunk/config/ylwrap)
===================================================================
--- branches/testonly/config/ylwrap	                        (rev 0)
+++ branches/testonly/config/ylwrap	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,223 @@
+#! /bin/sh
+# ylwrap - wrapper for lex/yacc invocations.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005
+#   Free Software Foundation, Inc.
+#
+# Written by Tom Tromey <tromey at cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+case "$1" in
+  '')
+    echo "$0: No files given.  Try \`$0 --help' for more information." 1>&2
+    exit 1
+    ;;
+  --basedir)
+    basedir=$2
+    shift 2
+    ;;
+  -h|--h*)
+    cat <<\EOF
+Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
+
+Wrapper for lex/yacc invocations, renaming files as desired.
+
+  INPUT is the input file
+  OUTPUT is one file PROG generates
+  DESIRED is the file we actually want instead of OUTPUT
+  PROGRAM is program to run
+  ARGS are passed to PROG
+
+Any number of OUTPUT,DESIRED pairs may be used.
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v|--v*)
+    echo "ylwrap $scriptversion"
+    exit $?
+    ;;
+esac
+
+
+# The input.
+input="$1"
+shift
+case "$input" in
+  [\\/]* | ?:[\\/]*)
+    # Absolute path; do nothing.
+    ;;
+  *)
+    # Relative path.  Make it absolute.
+    input="`pwd`/$input"
+    ;;
+esac
+
+pairlist=
+while test "$#" -ne 0; do
+  if test "$1" = "--"; then
+    shift
+    break
+  fi
+  pairlist="$pairlist $1"
+  shift
+done
+
+# The program to run.
+prog="$1"
+shift
+# Make any relative path in $prog absolute.
+case "$prog" in
+  [\\/]* | ?:[\\/]*) ;;
+  *[\\/]*) prog="`pwd`/$prog" ;;
+esac
+
+# FIXME: add hostname here for parallel makes that run commands on
+# other machines.  But that might take us over the 14-char limit.
+dirname=ylwrap$$
+trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
+mkdir $dirname || exit 1
+
+cd $dirname
+
+case $# in
+  0) $prog "$input" ;;
+  *) $prog "$@" "$input" ;;
+esac
+ret=$?
+
+if test $ret -eq 0; then
+  set X $pairlist
+  shift
+  first=yes
+  # Since DOS filename conventions don't allow two dots,
+  # the DOS version of Bison writes out y_tab.c instead of y.tab.c
+  # and y_tab.h instead of y.tab.h. Test to see if this is the case.
+  y_tab_nodot="no"
+  if test -f y_tab.c || test -f y_tab.h; then
+    y_tab_nodot="yes"
+  fi
+
+  # The directory holding the input.
+  input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
+  # Quote $INPUT_DIR so we can use it in a regexp.
+  # FIXME: really we should care about more than `.' and `\'.
+  input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
+
+  while test "$#" -ne 0; do
+    from="$1"
+    # Handle y_tab.c and y_tab.h output by DOS
+    if test $y_tab_nodot = "yes"; then
+      if test $from = "y.tab.c"; then
+    	from="y_tab.c"
+      else
+    	if test $from = "y.tab.h"; then
+    	  from="y_tab.h"
+    	fi
+      fi
+    fi
+    if test -f "$from"; then
+      # If $2 is an absolute path name, then just use that,
+      # otherwise prepend `../'.
+      case "$2" in
+    	[\\/]* | ?:[\\/]*) target="$2";;
+    	*) target="../$2";;
+      esac
+
+      # We do not want to overwrite a header file if it hasn't
+      # changed.  This avoid useless recompilations.  However the
+      # parser itself (the first file) should always be updated,
+      # because it is the destination of the .y.c rule in the
+      # Makefile.  Divert the output of all other files to a temporary
+      # file so we can compare them to existing versions.
+      if test $first = no; then
+	realtarget="$target"
+	target="tmp-`echo $target | sed s/.*[\\/]//g`"
+      fi
+      # Edit out `#line' or `#' directives.
+      #
+      # We don't want the resulting debug information to point at
+      # an absolute srcdir; it is better for it to just mention the
+      # .y file with no path.
+      #
+      # We want to use the real output file name, not yy.lex.c for
+      # instance.
+      #
+      # We want the include guards to be adjusted too.
+      FROM=`echo "$from" | sed \
+            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+      TARGET=`echo "$2" | sed \
+            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+
+      sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \
+          -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$?
+
+      # Check whether header files must be updated.
+      if test $first = no; then
+	if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
+	  echo "$2" is unchanged
+	  rm -f "$target"
+	else
+          echo updating "$2"
+          mv -f "$target" "$realtarget"
+        fi
+      fi
+    else
+      # A missing file is only an error for the first file.  This
+      # is a blatant hack to let us support using "yacc -d".  If -d
+      # is not specified, we don't want an error when the header
+      # file is "missing".
+      if test $first = yes; then
+        ret=1
+      fi
+    fi
+    shift
+    shift
+    first=no
+  done
+else
+  ret=$?
+fi
+
+# Remove the directory.
+cd ..
+rm -rf $dirname
+
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:

Modified: branches/testonly/configure.in
===================================================================
--- branches/testonly/configure.in	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/configure.in	2008-11-18 06:54:05 UTC (rev 129)
@@ -211,6 +211,12 @@
 AC_ARG_WITH(valgrind, [  --with-valgrind ... Run uninitialized field tests that use Valgrind],
             [AC_DEFINE([ROSE_USE_VALGRIND], 1, [Use Valgrind calls in ROSE])
              if test "x$withval" = "xyes"; then VALGRIND_BINARY="`which valgrind`"; else VALGRIND_BINARY="$withval"; fi])
+
+AC_ARG_WITH(wave-default, [  --with-wave-default ... Use Wave as the default preprocessor],
+            [AC_DEFINE([ROSE_WAVE_DEFAULT], true, [Use Wave as default in ROSE])],
+            [AC_DEFINE([ROSE_WAVE_DEFAULT], false, [Simple preprocessor as default in ROSE])]
+            )
+
 # Don't set VALGRIND here because that turns on actually running valgrind in
 # many tests, as opposed to just having the path available for
 # uninitializedField_tests
@@ -261,9 +267,15 @@
 # Call supporting macro to Yices Satisfiability Modulo Theories (SMT) Solver
 ROSE_SUPPORT_YICES
 
-# Setup Automake conditional in Projects/programModeling/Makefile.am
+# Setup Automake conditional in --- (not yet distributed)
 AM_CONDITIONAL(ROSE_USE_YICES,test ! "$with_yices" = no)
 
+# Call supporting macro to DWARF (libdwarf)
+ROSE_SUPPORT_DWARF
+
+# Setup Automake conditional in --- (not yet distributed)
+AM_CONDITIONAL(ROSE_USE_DWARF,test ! "$with_dwarf" = no)
+
 ROSE_SUPPORT_PHP
 
 AM_CONDITIONAL(ROSE_USE_PHP,test ! "$with_php" = no)
@@ -432,13 +444,18 @@
 
 # echo "In configure.in (before libtool setup): libtool test for 64 bit libs = `/usr/bin/file conftest.o`"
 LT_AC_PROG_SED dnl This seems to not be called, even though it is needed in the other macros
-AC_LIBLTDL_INSTALLABLE([src/3rdPartyLibraries/libltdl])
+m4_pattern_allow([LT_LIBEXT])dnl From http://www.mail-archive.com/libtool-commit@gnu.org/msg01369.html
+AC_PROG_LIBTOOL
+AC_LIBLTDL_CONVENIENCE dnl We need to use our version because libtool can't handle when we use libtool v2 but the v1 libltdl is installed on a system
 AC_SUBST(LTDLINCL)
 AC_SUBST(LIBLTDL)
 AC_LIBTOOL_DLOPEN
-AC_LIB_LTDL
-AC_PROG_LIBTOOL
-AC_LTDL_SHLIBPATH dnl Get the environment variable like LD_LIBRARY_PATH for the Fortran support to use
+AC_LIB_LTDL(recursive)
+dnl AC_LT DL_SHLIBPATH dnl Get the environment variable like LD_LIBRARY_PATH for the Fortran support to use
+dnl This seems to be an internal variable, set by different macros in different
+dnl Libtool versions, but with the same name
+AC_DEFINE_UNQUOTED(ROSE_SHLIBPATH_VAR, ["$shlibpath_var"], [Variable like LD_LIBRARY_PATH])
+
 echo 'int i;' > conftest.$ac_ext
 AC_TRY_EVAL(ac_compile);
 # echo "In configure.in (after libtool setup): libtool test for 64 bit libs = `/usr/bin/file conftest.o`"
@@ -724,8 +741,8 @@
 
 AM_CONDITIONAL(BINARY_EDG_TARBALL_ENABLED, [test "x$binary_edg_tarball_enabled" = "xyes"])
 
-release_binary_compatibility_signature="646e04576d4266880b4066826540b2ae" # This variable will be substituted in binary-EDG release copies of configure.in
-build_triplet_without_redhat=`echo $build | sed s/-redhat-/-pc-/ | sed s/-unknown-/-pc-/`
+release_binary_compatibility_signature="e2d193c41f56aafc2094b8f411f9d94e" # This variable will be substituted in binary-EDG release copies of configure.in
+build_triplet_without_redhat=`${srcdir}/config/cleanConfigGuessOutput "$build"`
 expected_binary_edg_dirname="roseBinaryEDG-${build_triplet_without_redhat}-${release_binary_compatibility_signature}"
 expected_binary_edg_tarball="${expected_binary_edg_dirname}.tar.gz"
 full_expected_binary_edg_tarball="${srcdir}/src/frontend/CxxFrontend/${expected_binary_edg_tarball}"
@@ -828,7 +845,8 @@
 AC_ARG_ENABLE(assembly-semantics, AS_HELP_STRING([--enable-assembly-semantics], [Enable semantics-based analysis of assembly code]))
 AM_CONDITIONAL(ROSE_USE_ASSEMBLY_SEMANTICS, [test "x$enable_assembly_semantics" = xyes])
 
-AC_CONFIG_SUBDIRS([src/3rdPartyLibraries/libltdl src/3rdPartyLibraries/libharu-2.1.0])
+echo "subdirs $subdirs"
+AC_CONFIG_SUBDIRS([libltdl src/3rdPartyLibraries/libharu-2.1.0])
 
 # RV 9/14/2005: Removed src/3rdPartyLibraries/PDFLibrary/Makefile
 # JJW 1/30/2008: Removed rose_paths.h as it is now built by a separate Makefile included from $(top_srcdir)/Makefile.am
@@ -911,6 +929,7 @@
 src/midend/loopProcessing/depGraph/Makefile
 src/midend/loopProcessing/computation/Makefile
 src/midend/loopProcessing/slicing/Makefile
+src/midend/loopProcessing/outsideInterface/Makefile
 src/midend/loopProcessing/driver/Makefile
 src/backend/Makefile
 src/backend/unparser/Makefile
@@ -952,6 +971,8 @@
 projects/Makefile
 projects/AstEquivalence/Makefile
 projects/AstEquivalence/gui/Makefile
+projects/autoParallelization/Makefile
+projects/autoParallelization/tests/Makefile
 projects/BinQ/Makefile
 projects/compass/Makefile
 projects/compass/src/Makefile
@@ -1012,8 +1033,6 @@
 projects/OpenMP_Translator/tests/npb2.3-omp-c/LU/Makefile
 projects/OpenMP_Translator/tests/npb2.3-omp-c/MG/Makefile
 projects/OpenMP_Translator/tests/npb2.3-omp-c/SP/Makefile
-projects/OpenMP_Parser/Makefile
-projects/OpenMP_Parser/tests/Makefile
 projects/MPICodeMotion/Makefile
 projects/javaport/Makefile
 projects/palette/Makefile
@@ -1055,6 +1074,7 @@
 tests/CompileTests/ExpressionTemplateExample_tests/Makefile
 tests/CompileTests/PythonExample_tests/Makefile
 tests/CompileTests/UPC_tests/Makefile
+tests/CompileTests/OpenMP_tests/Makefile
 tests/CompileTests/copyAST_tests/Makefile
 tests/CompileTests/colorAST_tests/Makefile
 tests/CompileTests/mergeAST_tests/Makefile
@@ -1076,6 +1096,7 @@
 tests/roseTests/loopProcessingTests/Makefile
 tests/roseTests/programAnalysisTests/Makefile
 tests/roseTests/programAnalysisTests/defUseAnalysisTests/Makefile
+tests/roseTests/programAnalysisTests/variableLivenessTests/Makefile
 tests/roseTests/programAnalysisTests/staticInterproceduralSlicingTests/Makefile
 tests/roseTests/programAnalysisTests/testCallGraphAnalysis/Makefile
 tests/roseTests/programAnalysisTests/sideEffectAnalysisTests/Makefile
@@ -1122,6 +1143,7 @@
 docs/Rose/Makefile
 docs/Rose/manual.tex
 docs/Rose/ROSE_InstallationInstructions.tex
+docs/Rose/ROSE_DeveloperInstructions.tex
 docs/Rose/gettingStarted.tex
 docs/Rose/rose.cfg
 docs/Rose/sage.cfg

Modified: branches/testonly/docs/Rose/Makefile.am
===================================================================
--- branches/testonly/docs/Rose/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/docs/Rose/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -70,7 +70,7 @@
 	cd $(top_builddir); $(MAKE) rose.docs
 
 # A more complex dependence is defined that requires the sage.tag file
-$(RoseDoxygenDocumentation): $(RoseDocsDependencies) $(ROSE_MAINPAGE_DOCUMENTATION)
+$(RoseDoxygenDocumentation): $(RoseDocsDependencies) $(ROSE_MAINPAGE_DOCUMENTATION) rose.cfg
 	cd $(top_builddir)/src/frontend/SageIII; $(MAKE) sage.docs
 	doxygen rose.cfg
 
@@ -82,7 +82,7 @@
              tridvpk.tex appendix.tex glossary.tex bibliography.tex \
              rose-processing-phases.pdf testing.tex \
              writingYourFirstTranslator.tex overviewOfRose.tex \
-             developersAppendix.tex astMerge.tex installRose.tex binaryAnalysis.tex
+             developersAppendix.tex astMerge.tex installRose.tex binaryAnalysis.tex 
 
 roseDirectoryMap.pdf: Makefile
 	$(top_srcdir)/scripts/lsdot $(top_srcdir) --format=ps --exclude='CVS\|\.svn\|autom4te.cache\|developersScratchSpace\|testDoxygen\|ckpt\|compass' --basename -o=roseDirectoryMap.ps;
@@ -145,7 +145,7 @@
 $(COMPASS_MANUAL):
 	cd $(compass_build_tooldir)/compass && $(MAKE) docs
 
-make-web-pages: $(RoseDoxygenDocumentation) $(PACKAGE_NAME)-$(PACKAGE_VERSION)-UserManual.pdf ROSE_InstallationInstructions.pdf footer.html leftmenu.html $(COMPASS_MANUAL)
+make-web-pages: $(RoseDoxygenDocumentation) $(PACKAGE_NAME)-$(PACKAGE_VERSION)-UserManual.pdf ROSE_InstallationInstructions.pdf ROSE_DeveloperInstructions.pdf footer.html leftmenu.html $(COMPASS_MANUAL)
 	cd Tutorial; $(MAKE) make-web-pages
 	mkdir -p ROSE_WebPages
 	mkdir -p ROSE_WebPages/ROSE_HTML_Reference;
@@ -161,6 +161,7 @@
 #	cp -r $(top_srcdir)/ROSE_ResearchPapers ROSE_WebPages/ROSE_ResearchPapers
 	cp -fr $(top_srcdir)/ROSE_ResearchPapers ROSE_WebPages/
 	cp -f ROSE_InstallationInstructions.pdf ROSE_WebPages/ROSE_InstallationInstructions.pdf
+	cp -f ROSE_DeveloperInstructions.pdf ROSE_WebPages/ROSE_DeveloperInstructions.pdf
 	mkdir -p ROSE_WebPages/ROSE_UserManual
 	cp -f $(srcdir)/WEB_DOCS_README ROSE_WebPages
 	cp -f $(PACKAGE_NAME)-$(PACKAGE_VERSION)-UserManual.pdf ROSE_WebPages/ROSE_UserManual/$(PACKAGE_NAME)-$(PACKAGE_VERSION)-UserManual.pdf
@@ -183,13 +184,19 @@
 # Simpler rule
 latex-docs: pdf
 
-pdf-local: $(PACKAGE_NAME)-$(PACKAGE_VERSION)-UserManual.pdf ROSE_InstallationInstructions.pdf
+pdf-local: $(PACKAGE_NAME)-$(PACKAGE_VERSION)-UserManual.pdf ROSE_InstallationInstructions.pdf ROSE_DeveloperInstructions.pdf
 
 ROSE_InstallationInstructions.pdf: $(latexFiles) $(latexDependences) ROSE_InstallationInstructions.tex
 	$(PDFLATEX) ROSE_InstallationInstructions.tex && \
 	$(PDFLATEX) ROSE_InstallationInstructions.tex && \
 	$(PDFLATEX) ROSE_InstallationInstructions.tex
 
+ROSE_DeveloperInstructions.pdf: $(latexFiles) $(latexDependences) ROSE_DeveloperInstructions.tex
+	$(PDFLATEX) ROSE_DeveloperInstructions.tex && \
+	$(PDFLATEX) ROSE_DeveloperInstructions.tex && \
+	$(PDFLATEX) ROSE_DeveloperInstructions.tex
+
+
 # DQ (7/25/2004): Need to include manual.tex and reference.tex since they are build from 
 # manual.tex.in and reference.tex.in
 $(PACKAGE_NAME)-$(PACKAGE_VERSION)-UserManual.pdf: manual.tex gettingStarted.tex $(latexFiles) $(latexDependences)
@@ -212,7 +219,7 @@
    developersAppendix.tex designOfRose.tex  FAQ.tex glossary.tex introduction.tex lu.tex preface.tex \
    requirements.tex rose-processing-phases.pdf compass_rose.gif SageIII.tex QueryLibrary.tex \
    AstRewrite.tex ProgramAnalysis.tex AstProcessing.tex testing.tex astMerge.tex installRose.tex \
-   roseExecutionOutput.txt roseHelpOutput.txt 
+   roseExecutionOutput.txt roseHelpOutput.txt asm_code_samples_gcc.pdf
 
 clean-web-pages:
 	test ! -d ROSE_WebPages || (test -d ROSE_WebPages && ( chmod +w -R ROSE_WebPages ))

Copied: branches/testonly/docs/Rose/ROSE_DeveloperInstructions.tex.in (from rev 128, trunk/docs/Rose/ROSE_DeveloperInstructions.tex.in)
===================================================================
--- branches/testonly/docs/Rose/ROSE_DeveloperInstructions.tex.in	                        (rev 0)
+++ branches/testonly/docs/Rose/ROSE_DeveloperInstructions.tex.in	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,141 @@
+\documentclass[10pt]{book}
+% \usepackage{epsfig}
+% \usepackage{psfig}
+% \usepackage{pdftex}
+% \usepackage{graphicx}
+% \usepackage{amsmath}
+%\usepackage{html,color,makeidx}
+
+%\usepackage{amsmath}
+\usepackage{verbatim}
+%\usepackage{moreverb}
+%\usepackage{graphics}    
+% \usepackage{epsfig}    
+%\usepackage{multicol}
+%\usepackage{color}
+%\usepackage{subfigure}
+
+%\usepackage{multirow}
+
+% Fixme margin note package (turn on draft mode)
+% \usepackage[final]{fixme}
+
+\usepackage[draft]{fixme}
+
+\usepackage{listings}
+% \lstloadlanguages{APP}
+
+\usepackage{html}
+\usepackage{color}
+
+\usepackage{multicol}
+\usepackage{multirow}
+
+% \usepackage{psfig}
+\usepackage{graphicx}
+
+% \psfigdriver{dvips}
+
+\newcommand{\mySmallFontSize}{\scriptsize}
+\newcommand{\mySmallestFontSize}{\tiny}
+
+% New commands to represent the location of example files (used in latex documentation)
+\newcommand{\TranslatorExampleDirectory}{@top_srcdir@/exampleTranslators/documentedExamples/simpleTranslatorExamples}
+\newcommand{\TranslatorExampleCompileTreeDirectory}{@top_pwd@/exampleTranslators/documentedExamples/simpleTranslatorExamples}
+\newcommand{\AstRewriteExampleDirectory}{@top_srcdir@/exampleTranslators/documentedExamples/AstRewriteExamples}
+\newcommand{\TutorialExampleDirectory}{@top_srcdir@/tutorial}
+\newcommand{\TutorialExampleBuildDirectory}{@top_builddir@/tutorial}
+
+\newcommand{\DatabaseExampleDirectory}{@top_srcdir@/exampleTranslators/documentedExamples/dataBaseExamples}
+
+% Software version number
+\newcommand{\VersionNumber}{@VERSION@}
+
+
+% Latex trick to allow us to comment out large sections of documentation
+\newcommand{\commentout}[1]{}
+
+% change the title of the Fixme List
+\renewcommand{\listfixmename}{Things to Fix in Documentation of ROSE}
+
+\newcommand{\comm}[2]{\bigskip
+                      \begin{tabular}{|p{11cm}|}\hline
+                      \multicolumn{1}{|c|}{{\bf Comment by #1}}\\ \hline
+                      #2\\ \hline
+                      \end{tabular}
+                      \bigskip
+                     }
+
+\def\verbatimfile#1{\begingroup
+                    \@verbatim \frenchspacing \@vobeyspaces
+                    \input#1 \endgroup
+}
+
+
+
+\newcounter{lineno}
+
+% Taken from verbatimfiles.sty on web
+\makeatletter %JCL
+
+\def\verbatimlisting#1{\setcounter{lineno}{0}%
+    \begingroup \@verbatim \frenchspacing \@vobeyspaces \parindent=20pt
+    \everypar{\stepcounter{lineno}\llap{\thelineno\ \ }}\input#1
+    \endgroup
+}
+
+\makeatother %JCL
+
+% \endinput
+
+
+\addtolength{\oddsidemargin}{-1.0in}
+\addtolength{\evensidemargin}{-1.0in}
+\addtolength{\textwidth}{2.0in}
+\sloppy
+
+%---------------------------------------------------------------------
+% Begin Document
+%---------------------------------------------------------------------
+
+\begin{document}
+%\bibliographystyle{plain}
+%
+
+% This draft mode eliminates the figures (leaves boxes for where they would be)
+%\psdraft
+
+\title{ {\bf \textcolor{red}{         ROSE Developer's Guide:  
+}}}
+
+\author{ }
+
+% This doesn't seem to work.  References to this label are not resolved.
+
+\begin{htmlonly}
+   \centering \includegraphics[width=3in]{../compass_rose.gif}
+\end{htmlonly}
+
+\maketitle
+
+\begin{htmlonly}
+   \centering \includegraphics[width=5in]{../compass_rose.gif}
+\end{htmlonly}
+
+\begin{center}
+\today
+\end{center}
+
+
+%\input{workingRoseSvn}
+\input{developersAppendix}
+
+
+% }
+
+\end{document}
+
+
+
+
+

Modified: branches/testonly/docs/Rose/Tutorial/abstractHandle.tex
===================================================================
--- branches/testonly/docs/Rose/Tutorial/abstractHandle.tex	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/docs/Rose/Tutorial/abstractHandle.tex	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,38 +1,66 @@
 \chapter{Abstract Handles to Language Constructs}
-This chapter describes a reference design and its corresponding implementation for supporting abstract handles to language constructs in source code and optimization phases. 
-It can be used to facilitate the interoperability between compilers and tools. 
+This chapter describes a reference design and its corresponding implementation for
+supporting abstract handles to language constructs in source code and optimization
+phases. It can be used to facilitate the interoperability between compilers and tools.
+We define an abstract handle as a representation for a unique language construct in a
+specific program.  Interoperability between tools is achieved by writing out the abstract handles as
+strings and reading them within other tools to build the equivalent abstract handle.
+\footnote{Abstract Handles are not appropriate for program analysis
+since they are not intended to be used to capture the full structure of a program. Instead, 
+Abstract Handles represent references to language constructs in a program, capturing only
+a program's local structure; intended to support interoperability between source based
+tools (including compilers).  We don't advise the use of abstract handles in an
+aggressive way to construct an alternative intermediate representation (IR) for a full
+program.}
 
-The idea is to define unique identifiers for statements, loops, functions, 
-and other language constructs in source code. Given the diverse user
-requirements, an ideal specification should include multiple forms to specify a language construct. 
-Current, we are interested in the following forms for specifying language constructs:
+The idea is to define identifiers for unique statements, loops, functions, 
+and other language constructs in source code. Given the diverse user requirements, an
+ideal specification should include multiple forms to specify a language construct.
+
+Currently, we are interested in the following forms for specifying language constructs:
 \begin{itemize}
-\item Source file position information including path, filename, line and column number etc. 
-GNU standard source position from
-\url{http://www.gnu.org/prep/standards/html\_node/Errors.html} presents
-some examples.  
-\item Global or local numbering of specified language construct in source file
-  (e.g. 2nd "do" loop in a global scope).  The file is itself specified using an abstract
-          handle (typically generated from the file name). 
-\item Global or local names of constructs. Some language constructs, such
-as files, function definitions and namespace, have names which can be
-used as their handle within a context.
-\item Language-specific label mechanisms. They include named constructs in Fortran, numbered labels in Fortran, and statement labels in C and C++ and so on. 
+   \item Source file position information including path, filename, line and column number etc. 
+      GNU standard source position from 
+      \url{http://www.gnu.org/prep/standards/html\_node/Errors.html} presents
+      some examples.  
+   \item Global or local numbering of specified language construct in source file
+      (e.g. 2nd "do" loop in a global scope).  The file is itself specified using an
+       abstract handle (typically generated from the file name). 
+   \item Global or local names of constructs. Some language constructs, such
+      as files, function definitions and namespace, have names which can be
+      used as their handle within a context.
+   \item Language-specific label mechanisms. These include named constructs in Fortran,
+      numbered labels in Fortran, and statement labels in C and C++, etc. 
 \end{itemize}
 In addition to human-readable forms, compilers and tools can generate
 internal IDs for language constructs. It is up to compiler/tool developers
 to provide a way to convert their internal representations into human-readable formats. 
 
-We define an abstract handle as a unique representation for a language construct. It can have any of the human-readable or machine-generated forms. 
-A handle can be used alone or combined with other handles to specify a language construct. 
-A handle can also be converted from one form to another.
+% We define an abstract handle as a unique representation for a language construct. It can
+Abstract Handles can
+have any of the human-readable or machine-generated forms. A handle can be used alone or
+combined with other handles to specify a language construct. A handle can also be
+converted from one form to another (e.g. from a compiler specific form to an human
+readable form relative to the source position; filename, line number, etc.).
 Abstract handles can have different lifetimes depending on their use and implementation. 
-An abstract handle might be required to be persistent if it is used to reference a language construct that would be optimized over  multiple executions of one or more different tools. 
-Where as an abstract-handle might be internally generated only for purposes of
-           optimizations used in a single execution (e.g. optimization within a compiler). 
+An abstract handle might be required to be persistent if it is used to reference a
+language construct that would be optimized over multiple executions of one or more
+different tools. Where as an abstract-handle might be internally generated only for
+purposes of optimizations used in a single execution (e.g. optimization within a compiler).
 
+\section{Use Case}
+   A typical use can for Abstract Handles might be for a performance tool to 
+identify a collection of loops in functions that are computationally intensive
+and to construct Abstract Handles that refer to this specific loops.  Then
+pass the Abstract Handles to a second tool that might analyze the source code
+and/or the binary executable to evaluate if the computational costs are reasonable 
+or if optimizations might be possible.  The specific goal of the Abstract Handles
+is to support these sorts of uses within autotuning using diverse tools used
+and/or developed as part of autotuning research within the DOE SciDAC PERI project.
+
 \section{Syntax}
-A possible specification of language handles can have the following syntax:
+%  A possible specification of language handles can have the following syntax:
+   A possible grammar for abstract handles could be:
 
 \begin{verbatim}
 /* a handle is a single handle item or a link of them separated by ::, or
@@ -86,7 +114,7 @@
 
 \section{Examples}
 We give some examples of language handles using the syntax mentioned above. 
-ROSE AST's node type names are used as the construct type names. 
+Canonical AST's node type names are used as the construct type names. 
 Other implementations can use their own construct type names.
 
 \begin{itemize}
@@ -122,32 +150,44 @@
 SourceFile<name,"/home/PERI/test222.c">::FunctionDeclaration<name,"main">::
 ForStatement<numbering,2>
 \end{verbatim}
+\item A nested loop using numbering information (The first loop inside the second loop in function
+main()): 
+\begin{verbatim}
+SourceFile<name,"/home/PERI/test222.c">::FunctionDeclaration<name,"main">::
+ForStatement<numbering,2>::ForStatement<numbering,1>
+\end{verbatim}
+
 \end{itemize}
 
 \section{Reference Implementation}
-We provide a reference implementation of the abstract handle concept. 
-The source files are located in \textit{src/midend/abstractHandle}.
+Abstract Handles are fundamentally compiler and tool independent, however to
+clarify the concepts, provide meaningful examples, a working reference 
+implementation we have provided a reference implementation in ROSE.
+% Within ROSE we provide a reference implementation of the abstract handle concept. 
+The source files are located in \textit{src/midend/abstractHandle} in the ROSE distribution.
 A generic interface (abstract\_handle.h and abstract\_handle.cpp) provides
-data structures and operations for manipulating abstract handles using source file positions, numbering, or names. 
-Any compilers and tools can have their own implementations using the same interface.  
+data structures and operations for manipulating abstract handles using source file
+positions, numbering, or names. Any compilers and tools can have their own implementations
+using the same interface.
+
 \subsection{Connecting to ROSE}
 A ROSE adapter (roseAdapter.h and roseAdapter.cpp) using the interface is
 provided as a concrete implementation for the maximum capability of the
-implementation.
-
-Figure~\ref{Tutorial:abstractHandle1} shows the code to generate abstract
+implementation (within a source-to-source compiler).
+Figure~\ref{Tutorial:abstractHandle1} shows the code (using ROSE) to generate abstract
 handles for loops in an input source file (as in
 Figure~\ref{Tutorial:abstractHandle1input}). 
-Abstract handle constructors generate handles from abstract nodes, which are implemented using ROSE AST nodes. 
-Source position is used by default to generate a handle item. 
+Abstract handle constructors generate handles from abstract nodes, which are implemented
+using ROSE AST nodes. Source position is used by default to generate a handle item. 
 Names or numbering are used instead when source position information is not available. 
-The Constructor can also be used to generate a handle item using a
-specified handle type (numbering handles in the example).
-Figure~\ref{Tutorial:abstractHandle1out} is the output showing the generated handles for the loops.
+The Constructor can also be used to generate a handle item using a specified handle type
+(numbering handles in the example). Figure~\ref{Tutorial:abstractHandle1out} is the output
+showing the generated handles for the loops.
+
 %---------------------example 1. ----------------------
 \begin{figure}[!h]
 {\indent
-{\mySmallestFontSize
+{\mySmallFontSize
 % Do this when processing latex to generate non-html (not using latex2html)
 \begin{latexonly}
   \lstinputlisting{\TutorialExampleDirectory/abstractHandle1.cpp}
@@ -162,13 +202,13 @@
 }
 % End of scope in indentation
 }
-\caption{Generated handles for loops: using constructors with or without a specified handle type}
+\caption{Example 1: Generated handles for loops: using constructors with or without a specified handle type.}
 \label{Tutorial:abstractHandle1}
 \end{figure}
 %------------------ input------------------------------
 \begin{figure}[!h]
 {\indent
-{\mySmallestFontSize
+{\mySmallFontSize
 % Do this when processing latex to generate non-html (not using latex2html)
 \begin{latexonly}
   \lstinputlisting{\TutorialExampleDirectory/inputCode_AbstractHandle1.cpp}
@@ -183,7 +223,7 @@
 }
 % End of scope in indentation
 }
-\caption{Source code with some loops}
+\caption{Example 1: Example source code with some loops, used as input.}
 \label{Tutorial:abstractHandle1input}
 \end{figure}
 
@@ -191,7 +231,7 @@
 %---------------------example 1's output ----------------------
 \begin{figure}[!h]
 {\indent
-{\mySmallestFontSize
+{\mySmallFontSize
 % Do this when processing latex to generate non-html (not using latex2html)
 \begin{latexonly}
   \lstinputlisting{\TutorialExampleBuildDirectory/abstractHandle1.outx}
@@ -206,11 +246,12 @@
 }
 % End of scope in indentation
 }
-\caption{Handles generated for loops}
+\caption{Example 1: Abstract handles generated for loops.}
 \label{Tutorial:abstractHandle1out}
 \end{figure}
 
-Another example (shown in Figure~\ref{Tutorial:abstractHandle2})
+\clearpage
+A second example (shown in Figure~\ref{Tutorial:abstractHandle2})
 demonstrates how to create handles using user-specified strings
 representing handle items for language constructs within a source file
 (shown in Figure~\ref{Tutorial:abstractHandle2input}). 
@@ -220,7 +261,7 @@
 %---------------------example 2. ----------------------
 \begin{figure}[!h]
 {\indent
-{\mySmallestFontSize
+{\mySmallFontSize
 % Do this when processing latex to generate non-html (not using latex2html)
 \begin{latexonly}
   \lstinputlisting{\TutorialExampleDirectory/abstractHandle2.cpp}
@@ -235,14 +276,14 @@
 }
 % End of scope in indentation
 }
-\caption{Generated handles from strings representing handle items}
+\caption{Example 2: Generated handles from strings representing handle items.}
 \label{Tutorial:abstractHandle2}
 \end{figure}
 
 %------------------ input------------------------------
 \begin{figure}[!h]
 {\indent
-{\mySmallestFontSize
+{\mySmallFontSize
 % Do this when processing latex to generate non-html (not using latex2html)
 \begin{latexonly}
   \lstinputlisting{\TutorialExampleDirectory/inputCode_AbstractHandle2.cpp}
@@ -257,7 +298,7 @@
 }
 % End of scope in indentation
 }
-\caption{Source code with some language constructs}
+\caption{Example 2: Source code with some language constructs.}
 \label{Tutorial:abstractHandle2input}
 \end{figure}
 
@@ -265,7 +306,7 @@
 %---------------------example 2's output ----------------------
 \begin{figure}[!h]
 {\indent
-{\mySmallestFontSize
+{\mySmallFontSize
 % Do this when processing latex to generate non-html (not using latex2html)
 \begin{latexonly}
   \lstinputlisting{\TutorialExampleBuildDirectory/abstractHandle2.outx}
@@ -280,21 +321,25 @@
 }
 % End of scope in indentation
 }
-\caption{Handles generated from string and their language constructs}
+\caption{Example 2: Handles generated from string and their language constructs.}
 \label{Tutorial:abstractHandle2out}
 \end{figure}
 
+\clearpage
 \subsection{Connecting to External Tools}
-We give yet another example to demonstrate how to use the abstract interface
-with any other tools, which may have less features in terms of
-supported language constructs and their correlations compared to a compiler. 
-Assume a tool operating on some simple non-nesting for-loops
-within a source file. The data structure representing such loops is given
-in Figure~\ref{Tutorial:myloop}.
-
+   A third example is provided to demonstrate how to use the abstract interface
+with any other tools, which may have less features in terms of supported language
+constructs and their correlations compared to a compiler. 
+Assume a tool operating on some simple for-loops within an arbitrary source file (the
+input file is not shown in this example). Such a tool might
+have an internal data structure representing loops; such as that in given in 
+Figure~\ref{Tutorial:myloop}.  We will show how the tool specific data structure
+for loops can be used to generate abstract handles and output as strings that can
+be used by other tools which use abstract handles (which would generate the
+abstract handles by reading the strings).
 \begin{figure}[!h]
 {\indent
-{\mySmallestFontSize
+{\mySmallFontSize
 % Do this when processing latex to generate non-html (not using latex2html)
 \begin{latexonly}
   \lstinputlisting{\TutorialExampleDirectory/../src/midend/abstractHandle/myloop.h}
@@ -309,24 +354,25 @@
 }
 % End of scope in indentation
 }
-\caption{A simple data structure representing a loop}
+\caption{Example 3: A simple data structure used to represent a loop in an arbitrary tool.}
 \label{Tutorial:myloop}
 \end{figure}
 
-
 An adapter (loopAdapter.h and loopAdapter.cpp) using the proposed abstract
 handle interface is given in \textit{src/midend/abstractHandle}.
 It provides a concrete implementation for the interface for the simple loops and adds a
-node to support file nodes (Compared to the full-featured ROSE IR, this
-additional file node is an additional work when using tools without internal nodes
-supporting files). 
+node to support file nodes (Compared to a full-featured IR for a compiler, the
+file node is an additional detail for tools without data structures to support files).
 The test program is given in Figure ~\ref{Tutorial:testMyLoop}.
-Again, it creates a top level file handle first. Then a loop handle is
-created within the file handle. Another loop handle is created from its 
-string format. 
+Again, it creates a top level file handle first. Then a loop handle
+({\em loop\_handle1}) is created within the file handle using its relative numbering information. 
+The {\em loop\_handle2} is created from from its string format using file position
+information (using GNU standard file position syntax). The {\em loop\_handle3} uses its
+relative numbering information within {\em loop\_handle1}.
+
 \begin{figure}[!h]
 {\indent
-{\mySmallestFontSize
+{\mySmallFontSize
 % Do this when processing latex to generate non-html (not using latex2html)
 \begin{latexonly}
   \lstinputlisting{\TutorialExampleDirectory/../src/midend/abstractHandle/testMyLoop.cpp}
@@ -341,35 +387,53 @@
 }
 % End of scope in indentation
 }
-\caption{A test program for simple loops' abstract handles}
+\caption{Example 3: A test program for simple loops' abstract handles.}
 \label{Tutorial:testMyLoop}
 \end{figure}
 
 
-The output of the program is shown in Figure~\ref{Tutorial:testMyLoopOutput}
+The output of the program is shown in Figure~\ref{Tutorial:testMyLoopOutput}.  It
+demonstrates the generated strings to represent the abstract handles in the 
+arbitrary code operated upon by the tool.  Interoperability is achieved by 
+another tool reading in the generated string representation to generate an
+abstract handle to the same source code language construct.
 %\begin{verbatim}
 \begin{figure}[!h]
 {\indent
-{\mySmallestFontSize
+{\mySmallFontSize
 \begin{latexonly}
 \begin{lstlisting} 
-bash-3.00$ ./testMyLoop
+bash-3.00: ./testMyLoop
 Created a file handle:
 SourceFile<name,file1.c>
 Created a loop handle:
-SourceFile<name,file1.c>::ForStatement<position,7>
+SourceFile<name,file1.c>::ForStatement<numbering,1>
 Created a loop handle:
 SourceFile<name,file1.c>::ForStatement<position,12>
+Created a loop handle:
+SourceFile<name,file1.c>::ForStatement<numbering,1>::ForStatement<numbering,1>
 \end{lstlisting}
 \end{latexonly}
 % end of scope in font size
 }
 % End of scope in indentation
 }
-\caption{Output of the test program for simple loops' abstract handles}
+\caption{Example 3: Output of the test program for simple loops' abstract handles (as strings).}
 \label{Tutorial:testMyLoopOutput}
 \end{figure}
 
+\clearpage
+\section{Summary}
 
+   Abstract handles are low level mechanisms to support multiple tools
+to exchange references to source code.  Several examples are used to
+present the different features of abstract handles.  Importantly, the 
+specification of abstract handles is tool independent.  A reference
+implementation is provided and is publically available within the
+ROSE compiler framework.  We encourage debate on the pros and cons
+of this concept to support interoperability of tools which must
+pass references to source code between them.  This work is expected
+to a small piece of the infrastructure to suport autotuning research.
+
 %\end{verbatim}
 

Modified: branches/testonly/docs/Rose/Tutorial/binaryAnalysis.tex
===================================================================
--- branches/testonly/docs/Rose/Tutorial/binaryAnalysis.tex	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/docs/Rose/Tutorial/binaryAnalysis.tex	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,15 +1,15 @@
 \chapter{Binary Analysis}
 
-This chapter discusses the capabilities of ROSE to read and analyze software binaries.
+This chapter discusses the capabilities of ROSE to read, analyze and transform 
+(transformations to the binary file format) binary executables.
 
-In the following we use a small example that demonstrates various features of Binary-Rose.
-The source code of our binary example is:
+In the following sections we use a small example that demonstrates various 
+features of Binary-Rose. The source code of our binary example is:
 
 \begin{figure}[!h]
 {\indent
 {\mySmallFontSize
 
-
 % Do this when processing latex to generate non-html (not using latex2html)
 \begin{latexonly}
    \lstinputlisting{\TutorialExampleDirectory/bin_example.C}
@@ -28,13 +28,23 @@
 \label{Tutorial:examplesourcecode}
 \end{figure}
 
+Much larger binaries can be analized, but such larger binary executables are more
+difficult to present (in this tutorial).
 
+
 \section{Loading binaries}
 
-Binary-ROSE is currently based on two front-ends: \emph{objdump} and \emph{IdaPro-mysql}.
+Binary support in ROSE is currently based on two front-ends: 
+% \emph{objdump} and \emph{IdaPro-mysql}.
+\begin{enumerate}
+   \item A custom build \emph{ROSE Disassembler} (for ARM, x86, and PowerPC), and
+   \item \emph{IdaPro-mysql}
+\end{enumerate}
 
-\subsection{objdump}
 
+% \subsection{objdump}
+\subsection{ROSE Disassembler}
+
 The following code reads in a binary and creates a binary ROSE AST:
 
 {\mySmallFontSize

Modified: branches/testonly/docs/Rose/Tutorial/loopOptimization.tex
===================================================================
--- branches/testonly/docs/Rose/Tutorial/loopOptimization.tex	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/docs/Rose/Tutorial/loopOptimization.tex	2008-11-18 06:54:05 UTC (rev 129)
@@ -62,7 +62,7 @@
 \label{Tutorial:exampleLoopOptimization}
 \end{figure}
 
-% \clearpage
+\clearpage
 \section{Matrix Multiply Example}
 
    Using the matrix multiply example code shown in 
@@ -118,7 +118,7 @@
 \end{figure}
 
 
-% \clearpage
+\clearpage
 \section{Loop Fusion Example}
 
    Using the loop fusion example code shown in 
@@ -229,7 +229,7 @@
 \label{Tutorial:exampleLoopProcessor2}
 \end{figure}
 
-% \clearpage
+\clearpage
 \section{Matrix Multiplication Example (mm.C)}
 
    Using the matrix multiplication example code shown in 
@@ -285,7 +285,7 @@
 \end{figure}
 
 
-% \clearpage
+ \clearpage
 \section{Matrix Multiplication Example Using Linearized Matrices (dgemm.C)}
 
    Using the matrix multiplication example code shown in 
@@ -342,7 +342,7 @@
 
 
 
-% \clearpage
+ \clearpage
 \section{LU Factorization Example (lufac.C)}
 
    Using the LU factorization example code shown in 
@@ -398,7 +398,7 @@
 \end{figure}
 
 
-% \clearpage
+ \clearpage
 \section{Loop Fusion Example (tridvpk.C)}
 
    Using the loop fusion example code shown in 

Modified: branches/testonly/docs/Rose/Tutorial/tutorial.tex.in
===================================================================
--- branches/testonly/docs/Rose/Tutorial/tutorial.tex.in	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/docs/Rose/Tutorial/tutorial.tex.in	2008-11-18 06:54:05 UTC (rev 129)
@@ -305,6 +305,8 @@
 
 \input{binaryAnalysis}
 
+\input{dwarfDebugSupport}
+
 \input{buildCG}
 
 \input{classHierarchyGraph}

Copied: branches/testonly/docs/Rose/asm_code_samples_gcc.pdf (from rev 128, trunk/docs/Rose/asm_code_samples_gcc.pdf)
===================================================================
(Binary files differ)

Modified: branches/testonly/docs/Rose/developersAppendix.tex
===================================================================
--- branches/testonly/docs/Rose/developersAppendix.tex	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/docs/Rose/developersAppendix.tex	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,6 +1,36 @@
 \chapter{ Developer's Appendix }
-
 \label{developersAppendix:developersAppendix}
+
+\section{Adding Contributions to ROSE}
+
+   We will be happy to work with you if you want to add new features to ROSE.
+We can setup a special SVN branch for you so that you can checkin your work and
+also update with our constant work on ROSE (on you schedule).  We can syncronize with 
+you to decide when we can review your work and merge your branch into the main trunk.
+
+{\bf The number one most important aspect about any contribution you make is that it
+should include test codes that demonstrate the feature and test it within our 
+automate test mechanism (the {\em make check} makefile rules).}. Depending upon the 
+feature this can include an additional demonstrative example of how it works, such
+examples go into the ROSE Tutorial (often as a separate chapter).  Most new work
+starts in the {\em Experimental} part of the ROSE Tutorial and is moved forward
+in the document over time.
+
+The purpose of the test codes in our automated tests are:
+\begin{itemize}
+   \item Make sure that future great ideas in ROSE gon't break your feature.
+   \item Allow us to easily detect maintaince problems as early as possible.
+   \item Help us sleep at night knowing that ROSE is really working.
+   \item Give everyone else using ROSE confidence in future releases.
+\end{itemize}
+
+We take this subject very seriously, since it can be a significant problem.
+In the future we will likely not accept contributions that are not accompanied 
+by sufficent test codes that demontrate that they work and will be part of the
+automated tests ({\em make check} makefile rule).  If you want to add a new 
+feature to ROSE, show us your tests.
+
+
 %Added by Liao 10/17/2008
 \section{Working with the ROSE SVN repositories}
 \label{gettingStarted::svn}
@@ -8,6 +38,23 @@
 an external one at SciDAC Outreach Center (using a vendor drop scheme). 
 Some tips for using them are gathered in this section. 
 \subsection{The External Repository}
+If you are our external (non-LLNL) users who make contributions to ROSE,
+we highly recommend you to work on a dedicated branch of the external repository. 
+We can create the branch for you on request. And you need to apply an account of
+the SciDAC Outreach Center to have write access to your branch. 
+
+Here are the steps to have an account with write access to ROSE's branches:
+Please follow the link on
+\htmladdnormallink{https://outreach.scidac.gov/account/register.php}{https://outreach.scidac.gov/account/register.php}
+to fill out a registration form (Project name: ROSE, PI: Daniel Quinlan)
+and fax a signed use policies form as instructed on the registration page.
+After getting your account, you need to log into the website and go to page
+\htmladdnormallink{https://outreach.scidac.gov/projects/rose/}{https://outreach.scidac.gov/projects/rose/}.
+Click "Request to join" on the top-right screen to request to join the ROSE
+project and we will grant you the write access to your branch. 
+
+Some frequently used commands for ROSE external developers are listed
+below:
 \begin{itemize}
 \item Install your svn client ($>=$1.5.1 is recommended ) with
 \textit{libsvn\_ra\_dav} support
@@ -40,8 +87,8 @@
         \textit{svn merge -r 56:69
         https://outreach.scidac.gov/svn/rose/trunk} 
    \item Solve conflicts as needed.     
-   \item svn commit: please record the start and end revision numbers of
-   the main trunk being merged into the log to keep track of merging.   
+   \item svn commit: {\bf Note:please record the start and end revision numbers of
+   the main trunk being merged into the commit log to keep track of merging.}
 \end{itemize}                
 \item You can check the archive of email notifications of the svn commits
 from \htmladdnormallink{https://osp5.lbl.gov/pipermail/rose-commits}{https://osp5.lbl.gov/pipermail/rose-commits} 
@@ -49,6 +96,8 @@
 
 
 \subsection{The Internal Repository}
+The tips here only apply to internal users who have access to LLNL
+machines.
 Again, make sure you are using subversion $>$ 1.4.x, 1.5.1 and up is recommended.
 \begin{itemize}
 \item Set local subversion configuration to ignore certain files and
@@ -114,170 +163,6 @@
 \end{itemize}
 
 
-
-\section{Building ROSE from the Source Code Repository Checkout {\em (for developers only)}}
-\label{gettingStarted:DeveloperInstructions}
-
-     The instructions for building ROSE from SVN are a little more complex.
-A few GNU software build tools are required (not required for the user
-{\em ROSE Distribution, e.g. ROSE-\VersionNumber.tar.gz}.  Required 
-tools ({\bf ** Note current dependencies}):
-\begin{itemize}
-     \item autoconf \\
-          Autoconf version 2.53 or higher is required. % Autoconf can be problematic, some
-          Newer versions of Autoconf introduce experimental features that could also be problematic.  The
-          Autoconf development has not been particularly good at verifying compatibility
-          with previous releases of their work.  Some users have reported having to
-          install version 2.53 specifically to use ROSE. 
-          {\em Check the ROSE/ChangeLog for current version numbers to be used with ROSE.}
-     \item automake \\
-          Automake version 1.9 or higher is required. Most software projects appear to be
-          less sensitive to the specific version of automake.
-          {\em Check the ROSE/ChangeLog for current version numbers to be used with ROSE.}
-\end{itemize}
-
-%   Several optional tools are also useful to have for ROSE development (required to build
-% documentation) these are:
-% \begin{itemize}
-%     \item LaTeX
-%     \item Doxygen
-%     \item DOT
-% \end{itemize}
-
-The {\tt ROSE/ChangeLog} details the changes between versions of ROSE and lists the
-specific version numbers of all software upon which ROSE depends. Comments of this type
-appear in the {\tt ChangeLog} as:
-\fixme{This needs to be updated.}
-{\footnotesize
-\begin{verbatim}
-********* TESTED with **************
-(*)  automake (GNU automake) 1.6.3
-(*)  autoconf (GNU Autoconf) 2.57
-(*)  GNU Make version 3.79.1
-(**) g++ (GCC) 3.3.6
-(**) gcc (GCC) 3.3.6
-(*)  doxygen 1.3.8
-(*)  dot version 1.12 (Sun Aug 15 02:43:07 UTC 2004)
-(*)  TeX (Web2C 7.3.1) 3.14159
-(*)  Original LaTeX2HTML Version 2002 (1.62)
-(*)  sqlite (requires g++ 3.3.2) 3.2.1
-
-(*)  Optional for use of ROSE (by users), but required for internal ROSE development (by ROSE project team)
-(**) Required for use of ROSE (and for all internal development)
-\end{verbatim}
-}
-
-The build process for a {\em Developer Version} is:
-\begin{enumerate}
-     \item Checkout a NEW version from SVN: \\
-     The newest work on ROSE (as of March 2008) is using SVN, instead of CVS.
-     This switch to SVN means the directions for how developers use ROSE have
-     changed.  This effects developers of ROSE only (or anyone with access to 
-     the newer SVN repository).
-     {\bf Please learn about SVN on another project before using it on ours.}
-
-     To checkout ROSE (assumes access to repository at LLNL), type: \\
-     {\tt svn checkout file:///usr/casc/overture/ROSE/svn/ROSE/trunk/ROSE svn-rose} \\
-     This will checkout a copy of the source code for ROSE from the svn repository.
-     Any directory name can be used for {\tt svn-rose} in the example commandline.
-
-     \item  Update an {\em existing} version from SVN: \\
-     Run {\tt svn update} from inside the ROSE directory (at the top level) to update
-     an existing version of ROSE with the new changes in the SVN repository.
-%    \fixme{What are the SVN rules for pruning directories?}
-%    Note that the ROSE team uses a common {\tt .cvsrc} file so that reasonable options
-%    to prune empty directories are used uniformly within project development.
-
-     \item After being checked out (or updated) from SVN: \\
-     Run the {\tt build} script in the top level ROSE directory to build all configure scripts
-     and {\tt Makefile.in} files (using {\bf automake}).  This is the difference between the development
-     environment and the distribution. This script will call the different {\bf autoconf}
-     tools required to setup ROSE and also checkout other work common to multiple projects
-     within CASC.
-
-%%     \item {\bf CVS} checkout \\
-%%           Type {\tt cvs -d/usr/casc/overture/ROSE/ROSE2_Repository checkout ROSE} to
-%%           checkout a new version of ROSE into a new directory.  {\em The ROSE directory
-%%           should not exist in the current directory.}  Checking out a new version of ROSE
-%%           on top of an existing version can lead to undefined results.
-%     \item Checkout a NEW version from CVS: \\
-%     In your {\tt .cshrc} file set the variable {\tt CVSROOT} to 
-%     {\tt /usr/casc/overture/ROSE/ROSE2\_Repository}
-%     ({\tt setenv CVSROOT /usr/casc/overture/ROSE/ROSE2\_Repository})
-%     and ({\tt setenv CVS\_RSH ssh}).
-%     The later is to permit checkout of the {\bf acmacros} project from its separate 
-%     CVS repository.  Note that this will only work from a machine on the LLNL domain.
-%     Other machines will have to get the separate tarball for this project (it should
-%     also be in the {\bf CVS} repository and is checked out with ROSE into the top 
-%     level ROSE directory).
-
-%     Then run {\tt source ~/.cshrc} to have this environment variable set properly.
-%     Now you can run {\tt cvs} to checkout the current version from ROSE. Type
-%     {\tt cvs co ROSE} or {\tt cvs checkout ROSE} to do this.
-
-%     \item  Update an {\em existing} version from CVS: \\
-%     Run {\tt cvs update} from inside the ROSE directory (at the top level) to update
-%     an existing version of ROSE with the new changes in the CVS repository.
-%     Note that the ROSE team uses a common {\tt .cvsrc} file so that reasonable options
-%     to prune empty directories are used uniformly within project development.
-
-%     \item After being checked out (or updated) from CVS: \\
-%     Run the {\tt build} script in the top level ROSE directory to build all configure scripts
-%     and {\tt Makefile.in} files (using {\bf automake}).  This is the difference between the development
-%     environment and the distribution. This script will call the different {\bf autoconf}
-%     tools required to setup ROSE and also checkout other work common to multiple projects
-%     within CASC.
-
-     \item Build a compile directory (for the compile tree): \\
-     Make a separate directory to be the root of the compile tree. There can be many compile 
-     trees if you want.
-
-     {\em Note: Before the next step be sure you are using the correct compiler ({\bf g++}
-     C++ compiler
-     [see ChangLog file for current version used for development, generally any 3.x
-     version]) and that you are using the correct version of {\bf autoconf} and 
-     {\bf automake}.}
-
-     \item Running configure: \\
-     Type {\tt <pathToSourceTree>/configure --help} to see the different configuration options.
-     {\tt <pathToSourceTree>} is meant to be the absolute or relative path to the source tree
-     where the {\bf SVN} version was checked out.  After options have been selected, type
-     {\tt <pathToSourceTree>/configure <selected-options>} to run the configure script.
-     Running the configure script with no options is sufficient (uses default values which
-     are either already set or which the configure script will figure out on your machine).
-     For more on ROSE configure options, see \ref{gettingStarted:configureOptions}.
-
-     \item Running Make after running configure: \\
-     After configuration (after the configure script is finished) run {\tt make} or {\tt gmake}.
-     If you have a development version then you can also make distributions by running
-     {\tt make dist}.  If you want to build a new distribution {\em AND} test it, 
-     run {\tt make distcheck} (make or gmake may be used interchangeably). 
-     See details of running make in parallel \ref{gettingStarted:parallelMake}.
-
-     \item Testing your new version of ROSE: \\
-     Automated tests are available within the distribution of ROSE. To run these tests,
-     type {\tt make check}.  Tests on a modern Intel/Linux machine currently take about 
-     15 minutes to run.
-   % if you have configured ROSE to reference a version of the A++/P++ library (since they include
-   % tests of A++/P++ within ROSE).  Tests on a more modern Linux machine are much faster.
-
-     \item Installing ROSE: \\
-     From this point you can generate ROSE the way a user would see it (as if you had
-     started with a {\em ROSE Distribution}).  Type {\tt make install} to install ROSE.
-     See details of installing ROSE \ref{gettingStarted:installation}.
-
-     \item Testing the installed version of ROSE: \\
-     To test the installed version of ROSE type {\tt make installcheck}.  To test
-     compilation, this forces one
-     or more of the Example translators to be built using only the header files from
-     the {\tt \{install\_dir\}/include} directory for their compilation.  To test linking
-     ROSE translators forces the previously compiled example translator to only use the libraries
-     installed in {\tt \{install\_dir\}/lib}.  This is sufficient to test the installation
-     the way that users are expected to use ROSE (only from an installed version).
-     A sample {\tt makefile} is generated, see \ref{gettingStarted:compilingTranslator}.
-
-\end{enumerate}
-
 % DQ (6/5/2008): This is the resulting lesson from the erasure
 % of my ROSE directory as the result of a bad cron script.
 \section{How to recover from a file-system disaster at LLNL}
@@ -785,17 +670,17 @@
 
 
 
-\section{Things That May Happen to Your Code After You Leave}
+\section{Things That May Happen to Your Code}
 
     No one likes to have their code touched, and we would like to
 avoid having to do so. We would like to have your contribution to ROSE
 always work and never have to be touched.  We don't wish to pass
 critical judgment on style since we want to allow many people to 
 contribute to ROSE.  However, if we have to debug your code, be prepared 
-that we will do a number of things to it that might offend you:
+that we may do a number of things to it that might offend you:
 \begin{enumerate}
    \item We will add documentation where we think it is appropriate.
-   \item We will add assertion tests (using ROSE\_ASSERT() macros)
+   \item We will add assertion tests (using {\tt ROSE\_ASSERT()} macros)
          wherever we think it is appropriate.
    \item We will reformat your code if we have to understand it and the 
          formatting is a problem.  This may offend
@@ -806,8 +691,26 @@
 \end{enumerate}
 
 
-\section{Maintaining the ROSE Email List (casc-rose at llnl.gov)}
+\section{ROSE Email Lists}
+\label{rose_email_list_info}
+% DQ (10/28/2008): These email addresses have been copied to the installRose.tex as well.
+   We have three mailing lists for core developers (those who have write access to
+the internal repository), all developers (anyone who has write access to the
+internal or external repository) and all
+users of ROSE. They are:
+\begin{itemize}
+\item rose-core at nersc.gov, web interface: 
+\htmladdnormallink{https://mailman.nersc.gov/mailman/listinfo/rose-core}{https://mailman.nersc.gov/mailman/listinfo/rose-core}.
+\item rose-developer at nersc.gov, web interface: 
+\htmladdnormallink{https://mailman.nersc.gov/mailman/listinfo/rose-developer}{https://mailman.nersc.gov/mailman/listinfo/rose-developer}.
+\item rose-public at nersc.gov, web interface:
+\htmladdnormallink{https://mailman.nersc.gov/mailman/listinfo/rose-public}{https://mailman.nersc.gov/mailman/listinfo/rose-public}.
+\end{itemize}
 
+
+We are phasing out the casc-rose at llnl.gov mail list. 
+
+\commentout{
    There is an open email list for ROSE which can be subscribed to
 automatically.  The list name is: {\bf casc-rose}.
 
@@ -879,9 +782,13 @@
 %   \item Password is required (Tom Leher and Hichhicker's Guide).
 \end{enumerate}
 
+% commented out
+}
 
 \section{How To Build a Binary Distribution}
 
+\fixme{I think this is out of date now.}
+
    The construction of a binary distribution is done as part of making
 ROSE available externally on the web to users who do not have an EDG
 licence.  We make only the EDG part of ROSE available as a binary (library) 
@@ -1090,9 +997,12 @@
 
 \section{Binary Analysis}
 
+\fixme{Move this binary analysis documentation into the ROSE Manual Binary Analysis chapter.}
+
    The documentation for the binary analysis can be found in the ROSE manual at
-\ref{binaryAnalysis::overview}.  However, there are a collection of details 
-that we need to document about the design; so for how these details can go here.
+\ref{binaryAnalysis::overview}.  There are also examples in the ROSE Tutorial.
+However, there are a collection of details 
+that we need to document about the design; so for now these details can go here.
    The design behind the support for binary analysis in ROSE has caused a number of
 design meetings to discuss details.  This section is specific to the support
 in ROSE for binary analysis and the development of the support in ROSE for the 

Modified: branches/testonly/docs/Rose/installRose.tex
===================================================================
--- branches/testonly/docs/Rose/installRose.tex	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/docs/Rose/installRose.tex	2008-11-18 06:54:05 UTC (rev 129)
@@ -338,7 +338,53 @@
            type {\tt make installcheck}.
            A sample {\tt makefile} is generated.%; see section \ref{gettingStarted:compilingTranslator}.
 \end{enumerate}
+\subsection{Building ROSE from a Development Version}
+Building ROSE from an internal or external development version is very
+similar to building it from a distribution. The major difference is that
+for development versions, you have to type ./build in the source tree to 
+generate the configure script and Makefile.ins. Once this is done, the rest
+steps are the same as those of building a distribution version.
 
+\subsection{TroubleShooting the ROSE Installation}
+
+% DQ (11/12/2008): This is where we need to accumulate the symptoms of what goes wrong.
+
+   There are a number of famous ways to screw up yur installation of ROSE.
+\begin{enumerate}
+   \item Message: {\tt configure: error: Could not link against boost\_filesystem-gcc41-mt} \\
+   This message from running the {\tt configure} command in ROSE (an initial step in building
+   ROSE) indicates that your {\tt LD\_LIBRARY\_PATH} (environment variable) is not set to 
+   to the location of the boost install tree.  The ROSE configure scripts (autoconf) will
+   test the linking to specific boost libraries and this is the first dynamic link library 
+   that it tests and so it will fail when many other tests on boost succeed because your
+   {\tt LD\_LIBRARY\_PATH} is finally required and is not properly set.
+
+   \item {\bf Don't build ROSE in the source tree, it is not tested often, but it should work.} \\
+    Save yourself some trouble and build a separate compile tree.  This will also allow
+    you to build a number of different versions of ROSE with different options.
+
+    \item Message: {\bf configure: error: Unable to find path to JVM library} \\
+   This message from running the {\tt configure} command in ROSE (an initial step in building
+   ROSE) indicates either that your {\tt LD\_LIBRARY\_PATH} (environment variable) is not set to 
+   to the location of the {\em libjvm.so} or that your machines java is not one that we
+   support (e.g. non-Sun Java).  If you don't require Java (e.g. don't need Fortran
+   support) then consider skipping the java support by using {\em --without-java} on the
+   configure command line.
+   Alternatively, your {\tt LD\_LIBRARY\_PATH} should contain the path to the file 
+   {\em libjvm.so}.  The likely path is specified in the lines just before the message.  
+   The full message will appear as:
+\begin{verbatim}
+checking for Java... /usr/lib/jvm/java-1.5.0-ibm.x86_64/bin/../bin/java
+checking for Java JVM include and link options... JavaJREDir  = /usr/lib/jvm/java-1.5.0-ibm-1.5.0.8.x86_64/jre/bin
+JavaHomeDir = /usr/lib/jvm/java-1.5.0-ibm-1.5.0.8.x86_64
+JavaJVMDir  = /usr/lib/jvm/java-1.5.0-ibm-1.5.0.8.x86_64/jre/bin/classic
+configure: error: Unable to find path to JVM library
+\end{verbatim}
+
+\end{enumerate}
+
+
+
 \subsection{ROSE Configure Options}
 \label{gettingStarted:configureOptions}
      A few example configure options are:
@@ -388,6 +434,8 @@
          listing.
 \end{itemize}
 
+
+
 %\fixme{It is suggested by TID that we move the figures to this location.
 %       Checkout if this is possible.}
 
@@ -474,12 +522,12 @@
 simplify their use of ROSE by using it from an installed version of ROSE.  This permits
 compilation using a single include directory and the specification of only two libraries, 
 as in:
-% {\footnotesize
 \begin{verbatim}
      g++ -I{\<install dir\>/include} -o executable executable.C 
          -L{\<install dir\>/lib} -lrose -ledg -lm $(RT_LIBS)
 \end{verbatim}
-% }
+% $ reset emacs highlighting
+
 See the example makefile in \\
 {\tt ROSE/exampleTranslators/documentedExamples/simpleTranslatorExamples/exampleMakefile} \\
 in Section \ref{gettingStarted:compilingTranslator}
@@ -499,6 +547,32 @@
 %    documentation does not yet really reflect this detail.  Also since the build process
 %    writes to the install directory we have to explain this in the documentation.}
 
+\subsection{MPI Support}
+     ROSE supports the use of MPI for parallel distributed memory program analysis, a
+research focus within the ROSE project.  To support this use the {\tt --with-mpi}
+option on the configure command line.  If you get the following message:
+%{\footnotesize
+\begin{verbatim}
+configuration file /home/<user name>/.mpd.conf not found
+A file named .mpd.conf file must be present in the user's home
+directory (/etc/mpd.conf if root) with read and write access
+only for the user, and must contain at least a line with:
+MPD_SECRETWORD=<secretword>
+One way to safely create this file is to do the following:
+  cd $HOME
+  touch .mpd.conf
+  chmod 600 .mpd.conf
+and then use an editor to insert a line like
+  MPD_SECRETWORD=mr45-j9z
+into the file.  (Of course use some other secret word than mr45-j9z.)
+\end{verbatim}
+%}
+% $ reset emacs highlighting
+Then follow the directions to build the {\tt .mpd.conf} file.  The use of the 
+MPI configure option will allow additional code in ROSE to be compiled and 
+additional tests to be run.
+
+
 \subsection{Testing ROSE}
      A set of test programs is available.  %More details are in section \ref{testing}.
 % written about this in later versions of the manual.  
@@ -506,6 +580,30 @@
 Several years of contributed bug reports and internal test codes have been accumulated 
 in the {\tt ROSE/tests} directory.
 
+Extra tests are available for development versions of ROSE. ROSE developers
+are highly recommended to run {\tt make dist} and {\tt make distcheck} to make
+sure that the modified development versions can be used to create functioning
+distributions.
+
 \subsection{Getting Help}
-     You may use the following mailing list to ask for help from the ROSE development 
-team: {\it casc-rose *dot* llnl *dot* gov}.
+%     You may use the following mailing list to ask for help from the ROSE development 
+% team: {\it casc-rose *dot* llnl *dot* gov}.
+%    The ROSE project maintain a number of email lists for internal development, 
+% external devlopers, and external users. More information is in the ROSE User Manual
+% in the Developer's Appendix (see \ref{rose_email_list_info}).
+
+% DQ (10/28/2008): This information is copied from:
+%                  ROSE User Manual: Developer's: Appendix: ROSE Email Lists.
+
+We have three mailing lists for core developers (those who have write access to
+the internal repository), all developers (anyone who has write access to the
+internal or external repository) and all
+users of ROSE. They are:
+\begin{itemize}
+\item rose-core at nersc.gov, web interface: 
+\htmladdnormallink{https://mailman.nersc.gov/mailman/listinfo/rose-core}{https://mailman.nersc.gov/mailman/listinfo/rose-core}.
+\item rose-developer at nersc.gov, web interface: 
+\htmladdnormallink{https://mailman.nersc.gov/mailman/listinfo/rose-developer}{https://mailman.nersc.gov/mailman/listinfo/rose-developer}.
+\item rose-public at nersc.gov, web interface:
+\htmladdnormallink{https://mailman.nersc.gov/mailman/listinfo/rose-public}{https://mailman.nersc.gov/mailman/listinfo/rose-public}.
+\end{itemize}

Modified: branches/testonly/docs/Rose/leftmenu.html.in
===================================================================
--- branches/testonly/docs/Rose/leftmenu.html.in	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/docs/Rose/leftmenu.html.in	2008-11-18 06:54:05 UTC (rev 129)
@@ -3,20 +3,16 @@
         <tr>
           <td width="221" class="Header3"><p>&nbsp;</p>
             <p class="style3"><a href="index.html" target="_blank">Home</a></p>
-            <p class="style3"><a href="ROSE_InstallationInstructions.pdf">Installation</a></p>
-            <!-- <p class="style3"><a href="ROSE_UserManual/ROSE- at VERSION@-UserManual.ps">User Manual (postscript)</p> -->
-            <!-- <p class="style3"><a href="ROSE_UserManual/manual.html">User Manual</p> -->
-            <!-- <p class="style3"><a href="ROSE_Tutorial/ROSE- at VERSION@-Tutorial.ps">Tutorial (postscript)</p> -->
-            <p class="style3"><a href="ROSE_UserManual/ROSE- at VERSION@-UserManual.pdf">User Manual (pdf)</p>
-            <p class="style3"><a href="ROSE_Tutorial/ROSE- at VERSION@-Tutorial.pdf">Tutorial (pdf)</p>
-            <!-- <p class="style3"><a href="ROSE_Tutorial/tutorial.html">Tutorial (generated from Latex, work in progress)</p> -->
-            <p class="style3"><a href="projects.html" target="_blank">Projects</p>
+            <p class="style3"><a href="ROSE_InstallationInstructions.pdf" target="_blank">Installation Guide (pdf)</a></p>
+            <p class="style3"><a href="ROSE_DeveloperInstructions.pdf" target="_blank">Developer's Guide (pdf)</a></p>
+            <p class="style3"><a href="ROSE_UserManual/ROSE- at VERSION@-UserManual.pdf" target="_blank">ROSE User Manual (pdf)</p>
+            <p class="style3"><a href="ROSE_Tutorial/ROSE- at VERSION@-Tutorial.pdf" target="_blank">ROSE Tutorial (pdf)</p>
+            <p class="style3"><a href="projects.html" target="_blank">Internal ROSE Projects</p>
             <p class="style3"><a href="ROSE_HTML_Reference/index.html" target="_blank">Programmer's Reference</p>
             <p class="style3"><a href="ROSE_HTML_Reference/ProjectPublications.html" target="_blank">Publications</p>
-            <!-- <p class="style3"><a href="ROSE_HTML_Reference/Gallery.html">Download Software</p> -->
-            <!-- <p class="style3"><a href="ROSE_HTML_Reference/ProjectDownLoadPage.html">Download Software</p> -->
-            <p class="style3"><a href="https://outreach.scidac.gov/projects/rose/" target="_blank">Released Software</p>
-            <p class="style3"><a href="regressionTest.html" target="_blank">Regression Tests</p>
+            <!-- <p class="style3"><a href="ROSE_HTML_Reference/Gallery.html"> Gallery</p> -->
+            <p class="style3"><a href="https://outreach.scidac.gov/projects/rose/" target="_blank">Download Software</p>
+            <p class="style3"><a href="regressionTest.html" target="_blank">External Regression Test Results</p>
             <p class="style3"><a href="https://outreach.scidac.gov/tracker/?group_id=24" target="_blank">Report Bugs</p>
             <!-- <p class="style3"><a href="ROSE_HTML_Reference/ProjectRelatedWorkPage.html">Related Work</p> -->
           </td>

Modified: branches/testonly/docs/Rose/manual.tex.in
===================================================================
--- branches/testonly/docs/Rose/manual.tex.in	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/docs/Rose/manual.tex.in	2008-11-18 06:54:05 UTC (rev 129)
@@ -51,6 +51,7 @@
 \newcommand{\AstRewriteExampleDirectory}{@top_srcdir@/exampleTranslators/documentedExamples/AstRewriteExamples}
 \newcommand{\TutorialExampleDirectory}{@top_srcdir@/tutorial}
 \newcommand{\TutorialExampleBuildDirectory}{@top_builddir@/tutorial}
+\newcommand{\TopSourceDirectory}{@top_srcdir@}
 
 \newcommand{\DatabaseExampleDirectory}{@top_srcdir@/exampleTranslators/documentedExamples/dataBaseExamples}
 

Modified: branches/testonly/docs/Rose/rose.cfg.in
===================================================================
--- branches/testonly/docs/Rose/rose.cfg.in	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/docs/Rose/rose.cfg.in	2008-11-18 06:54:05 UTC (rev 129)
@@ -451,35 +451,35 @@
                          @top_srcdir@/src/extra.docs \
                          @top_srcdir@/projects/projects.docs
 
-EXTRA_STUFF 			= \
-		         @top_srcdir@/src/roseExtensions/roseHPCToolkit/docs \
-                         @top_srcdir@/src/roseExtensions/roseHPCToolkit/include/rosehpct \
-                         @top_srcdir@/src/roseExtensions/roseHPCToolkit/include/rosehpct/util \
-                         @top_srcdir@/src/roseExtensions/roseHPCToolkit/include/rosehpct/xml \
-                         @top_srcdir@/src/roseExtensions/roseHPCToolkit/include/rosehpct/xml-xercesc \
-                         @top_srcdir@/src/roseExtensions/roseHPCToolkit/include/rosehpct/profir \
-                         @top_srcdir@/src/roseExtensions/roseHPCToolkit/include/rosehpct/sage \
-                         @top_srcdir@/src/roseExtensions/roseHPCToolkit/include/rosehpct/xml2profir \
-                         @top_srcdir@/src/roseExtensions/roseHPCToolkit/include/rosehpct/profir2sage \
-                         @top_srcdir@/src/roseExtensions/roseHPCToolkit/examples \
-                         @top_srcdir@/src/roseExtensions/roseHPCToolkit/src \
-                         @top_srcdir@/src/roseExtensions/roseHPCToolkit/src/util \
-                         @top_srcdir@/src/roseExtensions/roseHPCToolkit/src/xml \
-                         @top_srcdir@/src/roseExtensions/roseHPCToolkit/src/xml-xercesc \
-                         @top_srcdir@/src/roseExtensions/roseHPCToolkit/src/profir \
-                         @top_srcdir@/src/roseExtensions/roseHPCToolkit/src/sage \
-                         @top_srcdir@/src/roseExtensions/roseHPCToolkit/src/xml2profir \
-                         @top_srcdir@/src/roseExtensions/roseHPCToolkit/src/profir2sage
+# EXTRA_STUFF 			= \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/docs \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/include/rosehpct \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/include/rosehpct/util \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/include/rosehpct/xml \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/include/rosehpct/xml-xercesc \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/include/rosehpct/profir \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/include/rosehpct/sage \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/include/rosehpct/xml2profir \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/include/rosehpct/profir2sage \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/examples \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/src \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/src/util \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/src/xml \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/src/xml-xercesc \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/src/profir \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/src/sage \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/src/xml2profir \
+#                          @top_srcdir@/src/roseExtensions/roseHPCToolkit/src/profir2sage
 
-SIMPLE_INPUT                  = \
-                         @top_pwd@/rose.docs \
-                         @top_pwd@/docs/Rose/AvailableDocumentation.docs \
-                         @top_srcdir@/src/frontend/frontend.docs \
-                         @top_srcdir@/src/frontend/CxxFrontend/EDG_3.3/documentation.docs \
-                         @top_srcdir@/src/frontend/Open64/documentation.docs \
-                         @top_pwd@/src/frontend/SageIII/sage.docs \
-                         @top_srcdir@/src/frontend/SageIII/docs \
-                         @top_srcdir@/src/extra.docs
+# SIMPLE_INPUT                  = \
+#                          @top_pwd@/rose.docs \
+#                          @top_pwd@/docs/Rose/AvailableDocumentation.docs \
+#                          @top_srcdir@/src/frontend/frontend.docs \
+#                          @top_srcdir@/src/frontend/CxxFrontend/EDG_3.3/documentation.docs \
+#                          @top_srcdir@/src/frontend/Open64/documentation.docs \
+#                          @top_pwd@/src/frontend/SageIII/sage.docs \
+#                          @top_srcdir@/src/frontend/SageIII/docs \
+#                          @top_srcdir@/src/extra.docs
 
 
 # If the value of the INPUT tag contains directories, you can use the 
@@ -511,7 +511,7 @@
                          @top_srcdir@/AST_RewriteMechanism/testRewriteReplacementPermutations.C \
                          @top_srcdir@/AST_RewriteMechanism/test1.C \
                          @top_srcdir@/AST_RewriteMechanism/inputProgram1.C \
-    			@top_srcdir@/src/frontend/SageIII/sageInterface/highLevelInterface.h \
+                         @top_srcdir@/src/frontend/SageIII/sageInterface/highLevelInterface.h \
                          @top_srcdir@/util/testStrings.C \
                          @top_srcdir@/util/roseString.h \
                          @top_srcdir@/util/roseString.C \
@@ -552,7 +552,8 @@
 # directories that contain image that are included in the documentation (see 
 # the \image command).
 
-IMAGE_PATH             = .
+# IMAGE_PATH             = .
+IMAGE_PATH             = @top_srcdir@/docs/Rose
 
 # The INPUT_FILTER tag can be used to specify a program that doxygen should 
 # invoke to filter for each input file. Doxygen will invoke the filter program 

Modified: branches/testonly/docs/Rose/roseHelpOutput.txt
===================================================================
--- branches/testonly/docs/Rose/roseHelpOutput.txt	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/docs/Rose/roseHelpOutput.txt	2008-11-18 06:54:05 UTC (rev 129)
@@ -21,6 +21,8 @@
                              follow C99 standard, disable C++
      -rose:Cxx_only, -rose:Cxx
                              follow C++ 89 standard
+     -rose:OpenMP, -rose:openmp
+                             follow OpenMP 3.0 C/C++ specification
      -rose:UPC_only, -rose:UPC
                              follow Unified Parallel C 1.2 specification
      -rose:upc_threads n     Enable UPC static threads compilation with n threads

Modified: branches/testonly/projects/AstEquivalence/Makefile.am
===================================================================
--- branches/testonly/projects/AstEquivalence/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/AstEquivalence/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -6,7 +6,7 @@
 if ROSE_USE_QT
 if ROSE_USE_SQLITE_DATABASE
 
-bin_PROGRAMS = astEquivalence evaluateAllBinaries runIDA
+bin_PROGRAMS = astEquivalence createTextFiles evaluateAllBinaries runIDA
 
 astEquivalence_SOURCES = \
 	astEquivalenceGui.C \
@@ -15,6 +15,13 @@
       
 astEquivalence_LDADD = $(ROSE_LIBS) $(QT_LDFLAGS) $(QROSE_LDFLAGS) -lrt
 
+createTextFiles_SOURCES = \
+	createTextFiles.C 
+
+      
+createTextFiles_LDADD = $(ROSE_LIBS) $(QT_LDFLAGS) $(QROSE_LDFLAGS) -lrt
+
+
 evaluateAllBinaries_SOURCES = \
 	evaluateAllBinaries.C 
       

Modified: branches/testonly/projects/AstEquivalence/astEquivalenceGui.C
===================================================================
--- branches/testonly/projects/AstEquivalence/astEquivalenceGui.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/AstEquivalence/astEquivalenceGui.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -24,24 +24,6 @@
 using namespace std;
 using namespace boost;
 using namespace __gnu_cxx;
-class FindAsmFunctionsVisitor: public std::binary_function<SgNode*, std::vector<SgAsmFunctionDeclaration *>* , void* >
-{
-  public:
-    void* operator()(first_argument_type node, std::vector<SgAsmFunctionDeclaration*>* insns ) const{
-      if (isSgAsmFunctionDeclaration(node)) insns->push_back(isSgAsmFunctionDeclaration(node));
-      return NULL;
-    }
-};
-#if 0
-class FindInstructionsVisitor: public std::binary_function<SgNode*, std::vector<SgAsmx86Instruction *>* , void* >
-{
-  public:
-    void* operator()(first_argument_type node, std::vector<SgAsmx86Instruction*>* insns ) const{
-      if (isSgAsmx86Instruction(node)) insns->push_back(isSgAsmx86Instruction(node));
-      return NULL;
-    }
-};
-#endif
 
 
 static string htmlEscape(const string& s) {

Modified: branches/testonly/projects/AstEquivalence/astEquivalenceMainGui.C
===================================================================
--- branches/testonly/projects/AstEquivalence/astEquivalenceMainGui.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/AstEquivalence/astEquivalenceMainGui.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -53,7 +53,7 @@
 
 
   }
-  catch(exception& e) {
+  catch(std::exception& e) {
     cout << e.what() << "\n";
   }
 

Copied: branches/testonly/projects/AstEquivalence/createTextFiles.C (from rev 128, trunk/projects/AstEquivalence/createTextFiles.C)
===================================================================
--- branches/testonly/projects/AstEquivalence/createTextFiles.C	                        (rev 0)
+++ branches/testonly/projects/AstEquivalence/createTextFiles.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,330 @@
+#include <boost/program_options.hpp>
+#include "boost/filesystem/operations.hpp"
+#include "boost/filesystem/path.hpp"
+#include "boost/progress.hpp"
+#include <boost/algorithm/string.hpp>
+#include <boost/smart_ptr.hpp>
+
+
+#include <iostream>
+#include <list>
+#include "rose.h"
+
+using namespace std;
+using namespace boost;
+class DeleteAST : public SgSimpleProcessing
+   {
+     public:
+      //! Required traversal function
+          void visit (SgNode* node);
+   };
+
+void
+DeleteAST::visit(SgNode* node)
+   {
+     delete node;
+   }
+
+void DeleteSgTree( SgNode* root)
+{
+  DeleteAST deleteTree;
+  deleteTree.traverse(root,postorder);
+}
+
+SgNode* disassembleFile(std::string disassembleName)
+{
+
+    RoseBin_Def::RoseAssemblyLanguage=RoseBin_Def::x86;
+    RoseBin_Arch::arch=RoseBin_Arch::bit32;
+    RoseBin_OS::os_sys=RoseBin_OS::linux_op;
+    RoseBin_OS_VER::os_ver=RoseBin_OS_VER::linux_26;
+
+
+    RoseFile* roseBin = new RoseFile( (char*)disassembleName.c_str()  );
+
+    cerr << " ASSEMBLY LANGUAGE :: " << RoseBin_Def::RoseAssemblyLanguage << endl;
+    // query the DB to retrieve all data
+
+    SgNode* globalBlock = roseBin->retrieve_DB();
+
+    // traverse the AST and test it
+    roseBin->test();
+
+
+    return globalBlock;
+
+}
+
+
+static string htmlEscape(const string& s) {
+  string s2;
+  for (size_t i = 0; i < s.size(); ++i) {
+    switch (s[i]) {
+      case '<': s2 += "&lt;"; break;
+      case '>': s2 += "&gt;"; break;
+      case '&': s2 += "&amp;"; break;
+      default: s2 += s[i]; break;
+    }
+  }
+  return s2;
+}
+
+
+enum ExpressionCategory {ec_reg = 0, ec_mem = 1, ec_val = 2};
+
+static const size_t numberOfInstructionKinds = x86_last_instruction;
+inline size_t getInstructionKind(SgAsmx86Instruction* insn) {return insn->get_kind();}
+
+
+
+inline ExpressionCategory getCategory(SgAsmExpression* e) {
+  if (isSgAsmValueExpression(e)) {
+    return ec_val;
+  } else if (isSgAsmRegisterReferenceExpression(e)) {
+    return ec_reg;
+  } else if (isSgAsmMemoryReferenceExpression(e)) {
+    return ec_mem;
+  } else {
+    abort();
+  }
+}
+
+SgAsmExpressionPtrList& getOperands(SgAsmInstruction* insn) {
+  SgAsmOperandList* ol = insn->get_operandList();
+  SgAsmExpressionPtrList& operands = ol->get_operands();
+  return operands;
+}
+static map<string, void*> internTable;
+
+inline void* intern(const std::string& s) {
+  map<string, void*>::const_iterator i = internTable.find(s);
+  if (i == internTable.end()) {
+    void* sCopy = new string(s);
+    internTable.insert(std::make_pair(s, sCopy));
+    return sCopy;
+  } else {
+    return i->second;
+  }
+}
+static map<SgAsmExpression*, void*> unparseAndInternTable;
+
+inline void* unparseAndIntern(SgAsmExpression* e) {
+  map<SgAsmExpression*, void*>::const_iterator i = unparseAndInternTable.find(e);
+  if (i == unparseAndInternTable.end()) {
+    void* sPtr = intern(unparseX86Expression(e));
+    unparseAndInternTable.insert(std::make_pair(e, sPtr));
+    return sPtr;
+  } else {
+    return i->second;
+  }
+}
+ 
+void numberOperands(std::vector<SgAsmx86Instruction*>::iterator beg,
+        std::vector<SgAsmx86Instruction*>::iterator end, map<SgAsmExpression*, size_t> numbers[3]) {
+  map<void*, size_t> stringNumbers[3];
+  for (; beg != end; ++beg) {
+    SgAsmx86Instruction* insn = *beg;
+    const SgAsmExpressionPtrList& operands = getOperands(insn);
+    //size_t operandCount = operands.size();
+    for (size_t j = 0; j < operands.size(); ++j) {
+      SgAsmExpression* e = operands[j];
+      ExpressionCategory cat = getCategory(e);
+      void* str = unparseAndIntern(e);
+      map<void*, size_t>& currentStringNums = stringNumbers[(int)cat];
+      map<void*, size_t>::const_iterator stringNumIter = currentStringNums.find(str);
+      size_t num = (stringNumIter == currentStringNums.end() ? currentStringNums.size() : stringNumIter->second);
+      if (stringNumIter == currentStringNums.end()) currentStringNums.insert(std::make_pair(str, num));
+      numbers[(int)cat][e] = num;
+    }
+  }
+}
+std::string normalizeInstructionsToHTML(std::vector<SgAsmx86Instruction*>::iterator beg, 
+    std::vector<SgAsmx86Instruction*>::iterator end)
+{
+    string normalizedUnparsedInstructions;
+    map<SgAsmExpression*, size_t> valueNumbers[3];
+    numberOperands( beg,end, valueNumbers);
+
+    // Unparse the normalized forms of the instructions
+    for (; beg != end; ++beg ) {
+      SgAsmx86Instruction* insn = *beg;
+      string mne = insn->get_mnemonic();
+      boost::to_lower(mne);
+      mne = "<font color=\"red\">" + htmlEscape(mne)+"</font>";
+
+      normalizedUnparsedInstructions += mne;
+      const SgAsmExpressionPtrList& operands = getOperands(insn);
+      // Add to total for this variant
+      // Add to total for each kind of operand
+      size_t operandCount = operands.size();
+
+      normalizedUnparsedInstructions += "<font color=\"blue\">";
+      for (size_t i = 0; i < operandCount; ++i) {
+        SgAsmExpression* operand = operands[i];
+        ExpressionCategory cat = getCategory(operand);
+        map<SgAsmExpression*, size_t>::const_iterator numIter = valueNumbers[(int)cat].find(operand);
+        assert (numIter != valueNumbers[(int)cat].end());
+        size_t num = numIter->second;
+
+        normalizedUnparsedInstructions += (cat == ec_reg ? " R" : cat == ec_mem ? " M" : " V") + boost::lexical_cast<string>(num);
+      }
+      normalizedUnparsedInstructions += "; </font> <br> ";
+  
+    }
+   
+    return normalizedUnparsedInstructions;
+};
+void normalizeInstructionInSubTree(SgNode* topNode ){
+  vector<SgAsmx86Instruction*> insns;
+  FindInstructionsVisitor vis;
+  AstQueryNamespace::querySubTree(topNode, std::bind2nd( vis, &insns ));
+
+  for(std::vector<SgAsmx86Instruction*>::iterator iItr = insns.begin(); iItr !=  insns.end();
+      ++iItr)
+  {
+      SgAsmx86Instruction* insn = *iItr;
+       SgAsmExpressionPtrList& operands = getOperands(insn);
+      // Add to total for this variant
+      // Add to total for each kind of operand
+      size_t operandCount = operands.size();
+
+      for (size_t i = 0; i < operandCount; ++i) {
+        SgAsmExpression* operand = operands[i];
+        SgAsmExpression* newOperand;
+        if( isSgAsmMemoryReferenceExpression(operand) )
+        {
+          SgAsmMemoryReferenceExpression* memRefExp = new SgAsmMemoryReferenceExpression;
+          SgAsmWordValueExpression* wordVal = new SgAsmWordValueExpression;
+          wordVal->set_value(0);
+
+          memRefExp->set_segment(wordVal);
+          memRefExp->set_address(wordVal);
+          memRefExp->set_type(new SgAsmTypeWord);
+          newOperand = memRefExp;
+        }else if(isSgAsmRegisterReferenceExpression(operand) ){
+          SgAsmx86RegisterReferenceExpression* regRef = new SgAsmx86RegisterReferenceExpression;
+          regRef->set_register_class(x86_regclass_mm);
+          regRef->set_register_number(0);
+
+          newOperand = regRef;
+
+        }else{
+          SgAsmWordValueExpression* wordVal = new SgAsmWordValueExpression;
+          wordVal->set_value(0);
+          newOperand = wordVal;
+          
+        }
+
+        newOperand->set_parent(operand->get_parent());
+
+        DeleteSgTree(operands[i]);
+        operands[i]=newOperand;
+      }
+        //std::cout << "Unparsed: " <<unparseX86Instruction(insn)<< std::endl;
+
+  }
+
+
+
+
+
+
+
+};
+
+
+
+
+
+int main(int argc, char** argv)
+{
+
+//  SgNode* disFile = disassembleFile(argv[1]);
+  SgProject* disFile = frontend(argc,argv);
+
+#if 0
+  VariantVector vv1(V_SgAsmPEDLL);
+  vv1.push_back(V_SgAsmPEDLL); 
+  std::vector<SgNode*> peDLL = NodeQuery::querySubTree(disFile,vv1);
+
+  std::cout << "size: " << peDLL.size();
+    std::cout << "BEGIN - PEDLL" <<std::endl;
+
+  for(int i=0; i < peDLL.size() ; i++)
+  {
+    SgAddressList addrList = isSgAsmPEDLL(peDLL[i])->get_hintname_rvas();
+    for(int j = 0; i < addrList.size() ; j++ )
+    {
+    std::cout << addrList[j] << " ";
+
+    }
+      
+
+  };
+#endif
+  
+  std::cout << "END - PEDLL" <<std::endl;
+ 
+  {
+//  normalizeInstructionInSubTree(disFile);
+  
+  FindInstructionsVisitor vis;
+
+  //  backend((SgProject*)disFile);
+  vector<SgNode*> insnsA;
+
+  
+
+  AstQueryNamespace::querySubTree(disFile, std::bind2nd( vis, &insnsA ));
+
+  if(insnsA.size() == 0)
+  {
+    std::cerr << "error: there are no instrucitons" << std::endl;
+    return 0;
+  }
+
+
+  {
+    ofstream myfile;
+    std::string outputFile = string(argv[1])+".roseTxt";
+    myfile.open (outputFile.c_str());
+
+    std::vector<SgAsmx86Instruction*> instructions;
+    for(int i = 0; i < insnsA.size(); i++ )
+      if(isSgAsmx86Instruction(insnsA[i]))
+      {
+        if(isSgAsmx86Instruction(insnsA[i])->get_kind() != x86_call ) 
+          normalizeInstructionInSubTree(insnsA[i]);
+        myfile <<   unparseInstruction((SgAsmInstruction*)insnsA[i]) << "\n";
+      }
+    myfile.close();
+  }
+
+  {
+    ofstream myfile;
+    std::string outputFile = string(argv[1])+".roseTxtNoEndl";
+    myfile.open (outputFile.c_str());
+
+    std::vector<SgAsmx86Instruction*> instructions;
+    for(int i = 0; i < insnsA.size(); i++ )
+      if(isSgAsmx86Instruction(insnsA[i]))
+      {
+  //      normalizeInstructionInSubTree(insnsA[i]);
+    
+        myfile <<   unparseInstruction((SgAsmInstruction*)insnsA[i]) ;
+      }
+
+    myfile.close();
+
+  }
+
+ //     instructions.push_back(isSgAsmx86Instruction(insnsA[i]));
+
+
+//  myfile << normalizeInstructionsToHTML(instructions.begin(), instructions.end());
+
+
+  exit(0);
+
+  }
+};

Modified: branches/testonly/projects/AstEquivalence/evaluateAllBinaries.C
===================================================================
--- branches/testonly/projects/AstEquivalence/evaluateAllBinaries.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/AstEquivalence/evaluateAllBinaries.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -18,14 +18,6 @@
 using namespace boost::filesystem;
 using namespace boost::program_options;
 
-class FindAsmFunctionsVisitor: public std::binary_function<SgNode*, std::vector<SgAsmFunctionDeclaration *>* , void* >
-{
-  public:
-    void* operator()(first_argument_type node, std::vector<SgAsmFunctionDeclaration*>* insns ) const{
-      if (isSgAsmFunctionDeclaration(node)) insns->push_back(isSgAsmFunctionDeclaration(node));
-      return NULL;
-    }
-};
 
 template <typename T>
 class vector_start_at_zero {
@@ -116,7 +108,7 @@
   try {
 	  con.executenonquery("create table IF NOT EXISTS timing(property_name TEXT, total_wallclock FLOAT, total_usertime FLOAT, total_systime FLOAT, wallclock FLOAT, usertime FLOAT, systime FLOAT )");
   }
-  catch(exception &ex) {
+  catch(std::exception &ex) {
 	cerr << "Exception Occurred: " << ex.what() << endl;
   }
 
@@ -124,14 +116,14 @@
     // Function IDs are only unique within a file
 	  con.executenonquery("create table IF NOT EXISTS function_statistics(row_number INTEGER PRIMARY KEY, function_id INTEGER, num_instructions INTEGER )");
   }
-  catch(exception &ex) {
+  catch(std::exception &ex) {
 	cerr << "Exception Occurred: " << ex.what() << endl;
   }
 
   try {
 	  con.executenonquery("create table IF NOT EXISTS function_ids(row_number INTEGER PRIMARY KEY, file TEXT, function_name TEXT)");
   }
-  catch(exception &ex) {
+  catch(std::exception &ex) {
 	cerr << "Exception Occurred: " << ex.what() << endl;
   }
 
@@ -140,7 +132,7 @@
 	  con.executenonquery("create table IF NOT EXISTS vectors(row_number INTEGER PRIMARY KEY, function_id INTEGER,  index_within_function INTEGER, line INTEGER, offset INTEGER, sum_of_counts INTEGER, counts BLOB, instr_seq BLOB)");
 
   }
-  catch(exception &ex) {
+  catch(std::exception &ex) {
 	cerr << "Exception Occurred: " << ex.what() << endl;
   }
 
@@ -149,7 +141,7 @@
 
 
   }
-  catch(exception &ex) {
+  catch(std::exception &ex) {
 	cerr << "Exception Occurred: " << ex.what() << endl;
   }
 

Modified: branches/testonly/projects/AstEquivalence/gui/compilerFlagsGui.C
===================================================================
--- branches/testonly/projects/AstEquivalence/gui/compilerFlagsGui.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/AstEquivalence/gui/compilerFlagsGui.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -336,7 +336,7 @@
 
     try {
       eltCount = boost::lexical_cast<size_t>(cur_con.executestring("select max(row_number) from largest_clones"));
-    } catch (exception& e) { 
+    } catch (std::exception& e) { 
       eAssert(0, ("internal error: No largest_clones table found -- invalid database?!"));
     }
 
@@ -371,7 +371,7 @@
       {
         selectSeparateDatasets += " join function_statistics stat1 on stat1.function_id=function_id_A join function_statistics stat2 on stat2.function_id=function_id_B ";
 
-        selectSeparateDatasets += " where ( (stat1.num_instructions - " +boost::lexical_cast<string>(windowSize)+ ")/" +boost::lexical_cast<string>(stride)+") =( end_index_within_function_A-begin_index_within_function_A  )";
+        selectSeparateDatasets += " AND ( (stat1.num_instructions - " +boost::lexical_cast<string>(windowSize)+ ")/" +boost::lexical_cast<string>(stride)+") =( end_index_within_function_A-begin_index_within_function_A  )";
         selectSeparateDatasets += " AND   ( (stat2.num_instructions - " +boost::lexical_cast<string>(windowSize)+ ")/" +boost::lexical_cast<string>(stride)+") =( end_index_within_function_B-begin_index_within_function_B  )"  ;
 
       }
@@ -380,10 +380,10 @@
       {
        
 
-        if(wholeFunction->currentIndex() == 1) 
+//        if(wholeFunction->currentIndex() == 1) 
           selectSeparateDatasets += " AND ";
-        else
-          selectSeparateDatasets+=" where ";
+  //      else
+    //      selectSeparateDatasets+=" where ";
 
 
         
@@ -434,7 +434,7 @@
       std::cout << "Output A" << std::endl;;
 
     }
-    catch(exception& e) {
+    catch(std::exception& e) {
 	//cout << e.what() << "\n";
   }
 
@@ -446,117 +446,118 @@
 BinaryCloneGui::run( ) 
 {
 
-    
-    //Fill in table
-    // unlink activation callback, which otherwise would trigger each
-    // time we add a row in the table.
-    QROSE::unlink(tableWidget, SIGNAL(activated(int, int, int, int)));
 
-    while(tableWidget->rowCount()) tableWidget->removeRow(0);
+  //Fill in table
+  // unlink activation callback, which otherwise would trigger each
+  // time we add a row in the table.
+  QROSE::unlink(tableWidget, SIGNAL(activated(int, int, int, int)));
 
-    //Read in all largest clones
-    readIntoVector(conA, vectorOfClonesA);
-    std::cout << "Opening database B" << std::endl;
-    readIntoVector(conB, vectorOfClonesB);
-    std::cout << "Opening database B" << std::endl;
+  while(tableWidget->rowCount()) tableWidget->removeRow(0);
 
-    //vectorOfClones.allocate(  vectorOfClonesA.size() > vectorOfClonesB.size() ? vectorOfClonesA.size()  : vectorOfClonesB.size()  );
+  //Read in all largest clones
+  readIntoVector(conA, vectorOfClonesA);
+  std::cout << "Opening database B" << std::endl;
+  readIntoVector(conB, vectorOfClonesB);
+  std::cout << "Opening database B" << std::endl;
 
+  //vectorOfClones.allocate(  vectorOfClonesA.size() > vectorOfClonesB.size() ? vectorOfClonesA.size()  : vectorOfClonesB.size()  );
 
-    std::cout << "WALLIE" << std::endl;
-    //FIXME: Some functions in B may not be in A
-    for(unsigned int i = 0 ; i < vectorOfClonesA.size() ; i++ )
+
+  std::cout << "WALLIE" << std::endl;
+  //FIXME: Some functions in B may not be in A
+  for(unsigned int i = 0 ; i < vectorOfClonesA.size() ; i++ )
+  {
+    int j=0;
+    for(j = 0 ; j != (int)vectorOfClonesB.size() ; j++ )
     {
-      int j=0;
-      for(j = 0 ; j != (int)vectorOfClonesB.size() ; j++ )
+      if( vectorOfClonesA[i].file_A == vectorOfClonesB[j].file_A && 
+          vectorOfClonesA[i].function_name_A == vectorOfClonesB[j].function_name_A &&
+          vectorOfClonesA[i].file_B == vectorOfClonesB[j].file_B && 
+          vectorOfClonesA[i].function_name_B == vectorOfClonesB[j].function_name_B 
+        )
       {
-        if( vectorOfClonesA[i].file_A == vectorOfClonesB[j].file_A && 
-            vectorOfClonesA[i].function_name_A == vectorOfClonesB[j].function_name_A &&
-            vectorOfClonesA[i].file_B == vectorOfClonesB[j].file_B && 
-            vectorOfClonesA[i].function_name_B == vectorOfClonesB[j].function_name_B 
-            )
-        {
 
-          mapAtoB[i] = j;
-          break;
-        }
+        mapAtoB[i] = j;
+        break;
       }
-      if(j == (int)vectorOfClonesB.size())
-        mapAtoB[i]=-1;
-
     }
+    if(j == (int)vectorOfClonesB.size())
+      mapAtoB[i]=-1;
 
-    //FIXME: Some functions in B may not be in A
-    for(unsigned int i = 0 ; i < vectorOfClonesB.size() ; i++ )
+  }
+
+  //FIXME: Some functions in B may not be in A
+  for(unsigned int j = 0 ; j < vectorOfClonesB.size() ; j++ )
+  {
+    int i=0;
+    for(i = 0 ; i != (int)vectorOfClonesA.size() ; i++ )
     {
-      int j=0;
-      for(j = 0 ; j != (int)vectorOfClonesA.size() ; j++ )
+      if( vectorOfClonesA[i].file_A == vectorOfClonesB[j].file_A && 
+          vectorOfClonesA[i].function_name_A == vectorOfClonesB[j].function_name_A &&
+          vectorOfClonesA[i].file_B == vectorOfClonesB[j].file_B && 
+          vectorOfClonesA[i].function_name_B == vectorOfClonesB[j].function_name_B 
+        )
       {
-        if( vectorOfClonesA[i].file_A == vectorOfClonesB[j].file_A && 
-            vectorOfClonesA[i].function_name_A == vectorOfClonesB[j].function_name_A &&
-            vectorOfClonesA[i].file_B == vectorOfClonesB[j].file_B && 
-            vectorOfClonesA[i].function_name_B == vectorOfClonesB[j].function_name_B 
-            )
-        {
 
-          mapBtoA[i] = j;
-          break;
-        }
+        mapBtoA[i] = j;
+        break;
       }
-      if(j == (int)vectorOfClonesB.size())
-        mapBtoA[i]=-1;
-
     }
+    if(i == (int)vectorOfClonesA.size())
+      mapBtoA[j]=-1;
 
-    std::cout << "WALLIE" << std::endl;
+  }
 
-    int row =0;
+  std::cout << "WALLIE" << std::endl;
 
-    if(displayResults->currentIndex() == 0)
+  int row =0;
+
+  if(displayResults->currentIndex() == 0)
+  {
+    for(int i = 0 ; i < (int) vectorOfClonesA.size() ; i++ )
     {
-      for(int i = 0 ; i < (int) vectorOfClonesA.size() ; i++ )
+      if(mapAtoB[i] != -1 )
       {
-        if(mapAtoB[i] != -1 )
-        {
         Element cur_elem  = vectorOfClonesA[i];
         insert_into_table_row(row, cur_elem);
         mapRowtoDB[row]=i;
-        }
+        row++;
       }
-    }else if( displayResults->currentIndex() == 1 )
-    {
+    }
+  }else if( displayResults->currentIndex() == 1 )
+  {
 
     int row =0;
 
     for( std::map<int,int>::iterator mapAitr = mapAtoB.begin(); mapAitr != mapAtoB.end(); ++ mapAitr )
     {
       if(mapAitr->second == -1)
-        {
-          Element cur_elem  = vectorOfClonesA[mapAitr->first];
-          insert_into_table_row(row, cur_elem);
-          mapRowtoDB[row] = mapAitr->first;
-          row++;
+      {
+        Element cur_elem  = vectorOfClonesA[mapAitr->first];
+        insert_into_table_row(row, cur_elem);
+        mapRowtoDB[row] = mapAitr->first;
+        row++;
 
-        }
+      }
     }
 
-    }else if( displayResults->currentIndex() == 2 )
-    {
+  }else if( displayResults->currentIndex() == 2 )
+  {
 
     int row =0;
 
     for( std::map<int,int>::iterator mapBitr = mapBtoA.begin(); mapBitr != mapBtoA.end(); ++ mapBitr )
     {
       if(mapBitr->second == -1)
-        {
-          Element cur_elem  = vectorOfClonesB[mapBitr->first];
-          insert_into_table_row(row, cur_elem);
-          mapRowtoDB[row] = mapBitr->first;
-          row++;
-        }
+      {
+        Element cur_elem  = vectorOfClonesB[mapBitr->first];
+        insert_into_table_row(row, cur_elem);
+        mapRowtoDB[row] = mapBitr->first;
+        row++;
+      }
     }
 
-    }
+  }
 
     QROSE::link(tableWidget, SIGNAL(activated(int, int, int, int)), 
         &tableCellActivated, this);
@@ -567,11 +568,25 @@
 BinaryCloneGui::insert_into_table_row(int row, Element& cur_elem )
 {
 
-  int rowInB = mapAtoB.find(row)->second;
+  int rowInB = -1;
+  Element cur_elemB; 
+  
+  if(displayResults->currentIndex() == 0)
+  {
 
+    rowInB = mapAtoB.find(row)->second;
   ROSE_ASSERT(rowInB >= 0);
-  Element cur_elemB  =  rowInB >= 0 ? vectorOfClonesA[row] : Element();
+  Element cur_elemB  = vectorOfClonesB[rowInB] ;
 
+  }else if( displayResults->currentIndex() == 1 )
+  {
+  }else if( displayResults->currentIndex() == 2 )
+  {
+
+  }
+
+
+
   tableWidget->addRows(1);
   int diffA =  (cur_elem.end_index_within_function_A-cur_elem.begin_index_within_function_A+1)*windowSize;
   int diffB = (cur_elem.end_index_within_function_B-cur_elem.begin_index_within_function_B+1)*windowSize;
@@ -593,7 +608,7 @@
 
   tableWidget->setHAlignment(true, false, 0); // left horizontal alignment
 
-  mapRowtoDB[row] = row;
+//  mapRowtoDB[row] = row;
 
 };
 
@@ -694,24 +709,6 @@
   return std::pair<std::string,std::string>(line,offset);
 }  ;
 
-#if 0
-class FindInstructionsVisitor: public std::binary_function<SgNode*, std::vector<SgAsmx86Instruction *>* , void* >
-{
-  public:
-    void* operator()(first_argument_type node, std::vector<SgAsmx86Instruction*>* insns ) const{
-      if (isSgAsmx86Instruction(node)) insns->push_back(isSgAsmx86Instruction(node));
-      return NULL;
-    }
-};
-#endif
-class FindAsmFunctionsVisitor: public std::binary_function<SgNode*, std::vector<SgAsmFunctionDeclaration *>* , void* >
-{
-  public:
-    void* operator()(first_argument_type node, std::vector<SgAsmFunctionDeclaration*>* insns ) const{
-      if (isSgAsmFunctionDeclaration(node)) insns->push_back(isSgAsmFunctionDeclaration(node));
-      return NULL;
-    }
-};
 
 
 enum ExpressionCategory {ec_reg = 0, ec_mem = 1, ec_val = 2};

Modified: branches/testonly/projects/AstEquivalence/gui/compilerFlagsMainGui.C
===================================================================
--- branches/testonly/projects/AstEquivalence/gui/compilerFlagsMainGui.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/AstEquivalence/gui/compilerFlagsMainGui.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -53,7 +53,7 @@
 
 
   }
-  catch(exception& e) {
+  catch(std::exception& e) {
     cout << e.what() << "\n";
   }
 

Modified: branches/testonly/projects/AstEquivalence/runIDA.C
===================================================================
--- branches/testonly/projects/AstEquivalence/runIDA.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/AstEquivalence/runIDA.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -206,17 +206,14 @@
 	   exit(1);
 	 }
 
-    path dir_path(argv[1]);
-
-    rename_windows_directories(dir_path);
-
-    exit(0);
     std::list<string> tsvDirectories; 
 
-  //  find_tsv_directories(dir_path, tsvDirectories);
 
-    tsvDirectories.push_back(argv[1]);
+    path dir_path(argv[1]); 
+    
+    find_tsv_directories(dir_path, tsvDirectories);
 
+
     std::cout << "We have " << tsvDirectories.size() << " files " << std::endl;
 
 

Copied: branches/testonly/projects/BinQ/AlignFunctions.C (from rev 128, trunk/projects/BinQ/AlignFunctions.C)
===================================================================
--- branches/testonly/projects/BinQ/AlignFunctions.C	                        (rev 0)
+++ branches/testonly/projects/BinQ/AlignFunctions.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,160 @@
+#include "BinQGui.h"
+
+#include "boost/filesystem/operations.hpp" 
+#include <boost/lexical_cast.hpp>
+#include <iostream>
+
+
+#include "BinQSupport.h"
+#include "slide.h"
+
+#include <qtabwidget.h>
+#include "AlignFunctions.h"
+
+using namespace qrs;
+using namespace boost::filesystem;
+using namespace std;
+using namespace boost;
+using namespace __gnu_cxx;
+
+std::string AlignFunction::name() {
+  return "Align Functions";
+}
+
+bool 
+AlignFunction::findPosWhenFunctionsAreNotSync(int& position, int& offset, int& currentPos) {
+  BinQGUI *instance = QROSE::cbData<BinQGUI *>();
+  unsigned int max = instance->itemsFileA.size();
+  if (instance->itemsFileB.size()>max) 
+    max=instance->itemsFileB.size();
+  for (unsigned int i=0;i<max;++i) {
+    Item* itemA =NULL;
+    Item* itemB =NULL;
+    if (i<instance->itemsFileA.size())
+      itemA=instance->itemsFileA[i];
+    if (i<instance->itemsFileB.size())
+      itemB=instance->itemsFileB[i];
+    if (itemA && itemB) {
+      SgAsmFunctionDeclaration* fa = isSgAsmFunctionDeclaration(itemA->statement);
+      SgAsmFunctionDeclaration* fb = isSgAsmFunctionDeclaration(itemB->statement);
+      if (fa && !fb) {
+	// fa occured but fb is further away, need padding for fa
+	for (unsigned int k=i;k<instance->itemsFileB.size();++k) {
+	    itemB=instance->itemsFileB[k];
+	    fb = isSgAsmFunctionDeclaration(itemB->statement);
+	    if (fb) {
+	      // We need a padding in B at pos i with length (k-i)
+	      position=i-1;
+	      offset=k-i;
+	      currentPos = itemB->pos;
+	      return true; //left (A)
+	    }
+	}
+      } else if (fb && !fa) {
+	// fa occured but fb is further away, need padding for fa
+	for (unsigned int k=i;k<instance->itemsFileA.size();++k) {
+	    itemA=instance->itemsFileA[k];
+	    fa = isSgAsmFunctionDeclaration(itemA->statement);
+	    if (fa) {
+	      // We need a padding in A at pos i with length (k-i)
+	      position=i-1;
+	      offset=k-i;
+	      currentPos = itemA->pos;
+	      return false; //right (B)
+	    }
+	}
+      }
+
+    }
+  }
+  return true; // should not be reached
+}
+
+std::string 
+AlignFunction::getDescription() {
+  return "This Analysis aligns functions of two binaries. It is a simple algorithm that aligns functions based on their first encounter.";
+}
+
+
+void
+AlignFunction::run() {
+  BinQGUI *instance = QROSE::cbData<BinQGUI *>();
+
+#if 1
+  // ------------------------------ Sync statments between itemsFileA amd itemsFileB
+  // add padding 
+  int position=-1, offset=0, currentPos=0;
+  bool fileAPadd = findPosWhenFunctionsAreNotSync(position, offset,currentPos);
+  cerr << " 1 Found PosWhenFunctionsAre not sync : " << position << "   offset : " << offset << 
+    " A? " << fileAPadd << "  currentPos : " << currentPos << endl;
+  //int count=0;
+  while (position!=-1) {
+    // lets add padding
+    if (fileAPadd) {
+      Item* oldItem = *(instance->itemsFileA.begin()+position);
+      int oldPos = oldItem->pos+oldItem->length;
+      //cerr << "    A: old item at : " << (position) << "  oldPos : " << oldPos << endl;
+      vector<Item*>::iterator it = instance->itemsFileA.begin()+position+1;
+      int length=currentPos-oldPos;
+      for (int i=0; i<offset;++i) {
+	Item* item =NULL;
+	if (i==0)
+	  item = new Item(0,NULL,4,(position+i+1),length,(oldPos),"",0);
+	else
+	  item = new Item(0,NULL,4,(position+i+1),0,(oldPos)+length,"",0);
+	it = instance->itemsFileA.insert(it,item);
+	++it;
+	//	cerr << "    A: adding NULL item at : " << (position+i+1) << "  pos : " << (oldPos+i) <<endl;
+      }
+      // need to adjust the remainder
+      int c=1;
+      for (; it!=instance->itemsFileA.end();++it) {
+	Item* item = (*it);
+	//cerr << "    changing row at : " << (item->row) << "  to : " << (position+offset+c) <<endl;
+	item->row = position+offset+c;
+	item->pos = item->pos+length;
+	c++;
+      }
+    }
+
+    if (!fileAPadd) {
+      Item* oldItem = *(instance->itemsFileB.begin()+position);
+      int oldPos = oldItem->pos+oldItem->length;
+      //cerr << "    B: old item at : " << (position) << "  oldPos : " << oldPos << endl;
+      vector<Item*>::iterator it = instance->itemsFileB.begin()+position+1;
+      int length=currentPos-oldPos;
+      for (int i=0; i<offset;++i) {
+	Item* item =NULL;
+	if (i==0)
+	  item = new Item(0,NULL,4,(position+i+1),length,(oldPos),"",0);
+	else
+	  item = new Item(0,NULL,4,(position+i+1),0,(oldPos)+length,"",0);
+	it = instance->itemsFileB.insert(it,item);
+	++it;
+	//cerr << "    B: adding NULL item at : " << (position+i+1) << "  pos : " << oldPos+i<<endl;
+      }
+      // need to adjust the remainder
+      int c=1;
+      for (; it!=instance->itemsFileB.end();++it) {
+	Item* item = (*it);
+	//cerr << "    changing row at : " << (item->row) << "  to : " << (position+offset+c) <<endl;
+	item->row = position+offset+c;
+	item->pos = item->pos+length;
+	c++;
+      }
+    }
+    position=-1;
+    offset=0;
+    currentPos=0;
+    fileAPadd = findPosWhenFunctionsAreNotSync(position, offset,currentPos);
+    cerr << " 2 Found PosWhenFunctionsAre not sync : " << position << "   offset : " << offset << 
+      " A? " << fileAPadd << "  currentPos : " << currentPos << endl;
+    //    count++;
+    //if (count==5) break;
+  }
+
+  instance->updateByteItemList();
+#endif
+
+}
+

Copied: branches/testonly/projects/BinQ/AlignFunctions.h (from rev 128, trunk/projects/BinQ/AlignFunctions.h)
===================================================================
--- branches/testonly/projects/BinQ/AlignFunctions.h	                        (rev 0)
+++ branches/testonly/projects/BinQ/AlignFunctions.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,23 @@
+#ifndef ALIGNFUNCTION_R_H
+#define ALIGNFUNCTION_R_H
+#include "rose.h"
+
+#include <iostream>
+#include <list>
+#include "BinAnalyses.h"
+
+class AlignFunction : public BinAnalyses {
+ public:
+  AlignFunction(){};
+  virtual ~AlignFunction(){};
+  void run();
+  std::string name();
+  std::string getDescription();
+ private:
+  bool findPosWhenFunctionsAreNotSync(int& position, int& offset, int& currentPos);
+
+};
+
+
+
+#endif

Copied: branches/testonly/projects/BinQ/BinAnalyses.h (from rev 128, trunk/projects/BinQ/BinAnalyses.h)
===================================================================
--- branches/testonly/projects/BinQ/BinAnalyses.h	                        (rev 0)
+++ branches/testonly/projects/BinQ/BinAnalyses.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,21 @@
+#ifndef BINANALYSES_R_H
+#define BINANALYSES_R_H
+#include "rose.h"
+
+#include <iostream>
+
+
+class  BinAnalyses {
+ public:
+
+  BinAnalyses(){};
+  virtual ~BinAnalyses(){};
+  virtual void run()=0;
+  virtual std::string name()=0;
+  virtual std::string getDescription()=0;
+
+};
+
+
+
+#endif

Copied: branches/testonly/projects/BinQ/BinCallGraph.C (from rev 128, trunk/projects/BinQ/BinCallGraph.C)
===================================================================
--- branches/testonly/projects/BinQ/BinCallGraph.C	                        (rev 0)
+++ branches/testonly/projects/BinQ/BinCallGraph.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,70 @@
+#include "BinQGui.h"
+
+#include <iostream>
+
+
+#include "BinQSupport.h"
+#include "slide.h"
+
+#include <qtabwidget.h>
+#include "BinCallGraph.h"
+
+using namespace qrs;
+using namespace std;
+using namespace __gnu_cxx;
+
+std::string BinCallGraph::name() {
+  return "Binary Call Graph";
+}
+
+std::string BinCallGraph::getDescription() {
+  return "Creates a call graph for the current Binary. Output is callgraph.dot";
+}
+
+
+void
+BinCallGraph::run() {
+  BinQGUI *instance = QROSE::cbData<BinQGUI *>();
+
+  RoseBin_Graph* graph=NULL;
+  ROSE_ASSERT(isSgProject(instance->fileA));
+  SgBinaryFile* binaryFile = isSgBinaryFile(isSgProject(instance->fileA)->get_fileList()[0]);
+  SgAsmFile* file = binaryFile != NULL ? binaryFile->get_binaryFile() : NULL;
+  ROSE_ASSERT(file);
+
+  VirtualBinCFG::AuxiliaryInformation* info = new VirtualBinCFG::AuxiliaryInformation(file);
+
+  // call graph analysis  *******************************************************
+  cerr << " creating call graph ... " << endl;
+  instance->analysisTab->setCurrentIndex(1);
+  QString res = QString("Creating call graph ");
+  instance->analysisResult->append(res);  
+  
+  graph= new RoseBin_DotGraph(info);
+  ROSE_ASSERT(graph);
+  string callFileName = "callgraph.dot";
+  bool dot=true;
+  bool mergedEdges=true;
+  if (dot==false) {
+    callFileName = "callgraph.gml";
+    graph= new RoseBin_GMLGraph(info);
+  }
+
+  SgAsmInterpretation* interp = SageInterface::getMainInterpretation(file);
+  RoseBin_CallGraphAnalysis* callanalysis = 
+    //    new RoseBin_CallGraphAnalysis(isSgAsmNode(instance->fileA), new RoseObj(), info);
+   new RoseBin_CallGraphAnalysis(interp->get_global_block(), new RoseObj(), info);
+
+  ROSE_ASSERT(callanalysis);
+  callanalysis->run(graph, callFileName, !mergedEdges);
+
+  res = QString("nr of nodes visited %1. nr of edges visited %2. ")
+    .arg(callanalysis->nodesVisited())
+    .arg(callanalysis->edgesVisited());
+    
+  instance->analysisResult->append(res);  
+
+  cerr << " nr of nodes visited in callanalysis : " << callanalysis->nodesVisited() << endl;
+  cerr << " nr of edges visited in callanalysis : " << callanalysis->edgesVisited() << endl;
+  
+}

Copied: branches/testonly/projects/BinQ/BinCallGraph.h (from rev 128, trunk/projects/BinQ/BinCallGraph.h)
===================================================================
--- branches/testonly/projects/BinQ/BinCallGraph.h	                        (rev 0)
+++ branches/testonly/projects/BinQ/BinCallGraph.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,23 @@
+#ifndef BINCALLGRAPH_R_H
+#define BINCALLGRAPH_R_H
+#include "rose.h"
+
+#include <iostream>
+#include <list>
+#include "BinAnalyses.h"
+
+class BinCallGraph : public BinAnalyses {
+ public:
+  BinCallGraph(){};
+  virtual ~BinCallGraph(){};
+  void run();
+  std::string name();
+  std::string getDescription();
+ private:
+
+
+};
+
+
+
+#endif

Copied: branches/testonly/projects/BinQ/BinControlFlowAnalysis.C (from rev 128, trunk/projects/BinQ/BinControlFlowAnalysis.C)
===================================================================
--- branches/testonly/projects/BinQ/BinControlFlowAnalysis.C	                        (rev 0)
+++ branches/testonly/projects/BinQ/BinControlFlowAnalysis.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,65 @@
+#include "BinQGui.h"
+
+#include <iostream>
+
+
+#include "BinQSupport.h"
+#include "slide.h"
+
+#include <qtabwidget.h>
+#include "BinControlFlowAnalysis.h"
+
+using namespace qrs;
+using namespace std;
+using namespace __gnu_cxx;
+
+std::string BinControlFlowAnalysis::name() {
+  return "Control Flow Graph";
+}
+
+std::string BinControlFlowAnalysis::getDescription() {
+  return "Creates a control flow graph. Outputs cfg.dot";
+}
+
+
+void
+BinControlFlowAnalysis::run() {
+  BinQGUI *instance = QROSE::cbData<BinQGUI *>();
+
+  RoseBin_Graph* graph=NULL;
+  ROSE_ASSERT(isSgProject(instance->fileA));
+  SgBinaryFile* binaryFile = isSgBinaryFile(isSgProject(instance->fileA)->get_fileList()[0]);
+  SgAsmFile* file = binaryFile != NULL ? binaryFile->get_binaryFile() : NULL;
+  ROSE_ASSERT(file);
+
+  VirtualBinCFG::AuxiliaryInformation* info = new VirtualBinCFG::AuxiliaryInformation(file);
+
+
+  // control flow analysis  *******************************************************
+  instance->analysisTab->setCurrentIndex(1);
+  QString res = QString("Creating control flow graph ");
+  instance->analysisResult->append(res);  
+  string cfgFileName = "cfg.dot";
+  graph= new RoseBin_DotGraph(info);
+  bool dot=true;
+  bool forward=true;
+  bool edges=true;
+  bool mergedEdges=true;
+  if (dot==false) {
+    cfgFileName = "cfg.gml";
+    graph= new RoseBin_GMLGraph(info);
+  }
+
+
+  SgAsmInterpretation* interp = SageInterface::getMainInterpretation(file);
+  RoseBin_ControlFlowAnalysis* cfganalysis = 
+    new RoseBin_ControlFlowAnalysis(interp->get_global_block(), forward, new RoseObj(), edges, info);
+  ROSE_ASSERT(cfganalysis);
+  cfganalysis->run(graph, cfgFileName, mergedEdges);
+  res = QString("nr of nodes visited %1. nr of edges visited %2. ")
+    .arg(cfganalysis->nodesVisited())
+    .arg(cfganalysis->edgesVisited());
+    
+  instance->analysisResult->append(res);  
+  
+}

Copied: branches/testonly/projects/BinQ/BinControlFlowAnalysis.h (from rev 128, trunk/projects/BinQ/BinControlFlowAnalysis.h)
===================================================================
--- branches/testonly/projects/BinQ/BinControlFlowAnalysis.h	                        (rev 0)
+++ branches/testonly/projects/BinQ/BinControlFlowAnalysis.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,23 @@
+#ifndef CONTROLFLOW_R_H
+#define CONTROLFLOW_R_H
+#include "rose.h"
+
+#include <iostream>
+#include <list>
+#include "BinAnalyses.h"
+
+class BinControlFlowAnalysis : public BinAnalyses {
+ public:
+  BinControlFlowAnalysis(){};
+  virtual ~BinControlFlowAnalysis(){};
+  void run();
+  std::string name();
+  std::string getDescription();
+ private:
+
+
+};
+
+
+
+#endif

Copied: branches/testonly/projects/BinQ/BinDataFlowAnalysis.C (from rev 128, trunk/projects/BinQ/BinDataFlowAnalysis.C)
===================================================================
--- branches/testonly/projects/BinQ/BinDataFlowAnalysis.C	                        (rev 0)
+++ branches/testonly/projects/BinQ/BinDataFlowAnalysis.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,68 @@
+#include "BinQGui.h"
+
+#include <iostream>
+
+
+#include "BinQSupport.h"
+#include "slide.h"
+
+#include <qtabwidget.h>
+#include "BinDataFlowAnalysis.h"
+
+using namespace qrs;
+using namespace std;
+using namespace __gnu_cxx;
+
+std::string BinDataFlowAnalysis::name() {
+  return "Data Flow Graph";
+}
+
+std::string BinDataFlowAnalysis::getDescription() {
+  return "Creates a dataflow graph. Outputs dfg.dot";
+}
+
+
+void
+BinDataFlowAnalysis::run() {
+  BinQGUI *instance = QROSE::cbData<BinQGUI *>();
+
+  RoseBin_Graph* graph=NULL;
+  ROSE_ASSERT(isSgProject(instance->fileA));
+  SgBinaryFile* binaryFile = isSgBinaryFile(isSgProject(instance->fileA)->get_fileList()[0]);
+  SgAsmFile* file = binaryFile != NULL ? binaryFile->get_binaryFile() : NULL;
+  ROSE_ASSERT(file);
+
+  VirtualBinCFG::AuxiliaryInformation* info = new VirtualBinCFG::AuxiliaryInformation(file);
+
+  // call graph analysis  *******************************************************
+  instance->analysisTab->setCurrentIndex(1);
+  QString res = QString("Creating dataflow graph ");
+  instance->analysisResult->append(res);  
+  
+  bool dot=true;
+  bool forward=true;
+  bool edges=true;
+  bool mergedEdges=true;
+  bool interprocedural=false;
+  string dfgFileName = "dfg.dot";
+  graph= new RoseBin_DotGraph(info);
+  if (dot==false) {
+    dfgFileName = "dfg.gml";
+    graph= new RoseBin_GMLGraph(info);
+  }
+
+  SgAsmInterpretation* interp = SageInterface::getMainInterpretation(file);
+  RoseBin_DataFlowAnalysis* dfanalysis = 
+    new RoseBin_DataFlowAnalysis(interp->get_global_block(), forward, new RoseObj(), info);
+  ROSE_ASSERT(dfanalysis);
+  dfanalysis->init(interprocedural, edges);
+  dfanalysis->run(graph, dfgFileName, mergedEdges);
+
+  res = QString("nr of nodes visited %1. nr of edges visited %2. ")
+    .arg(dfanalysis->nodesVisited())
+    .arg(dfanalysis->edgesVisited());
+    
+  instance->analysisResult->append(res);  
+
+  
+}

Copied: branches/testonly/projects/BinQ/BinDataFlowAnalysis.h (from rev 128, trunk/projects/BinQ/BinDataFlowAnalysis.h)
===================================================================
--- branches/testonly/projects/BinQ/BinDataFlowAnalysis.h	                        (rev 0)
+++ branches/testonly/projects/BinQ/BinDataFlowAnalysis.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,23 @@
+#ifndef DATAFLOW_R_H
+#define DATAFLOW_R_H
+#include "rose.h"
+
+#include <iostream>
+#include <list>
+#include "BinAnalyses.h"
+
+class BinDataFlowAnalysis : public BinAnalyses {
+ public:
+  BinDataFlowAnalysis(){};
+  virtual ~BinDataFlowAnalysis(){};
+  void run();
+  std::string name();
+  std::string getDescription();
+ private:
+
+
+};
+
+
+
+#endif

Modified: branches/testonly/projects/BinQ/BinQGui.C
===================================================================
--- branches/testonly/projects/BinQ/BinQGui.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/BinQ/BinQGui.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,30 +1,65 @@
-#include <boost/algorithm/string.hpp>
+// tps: the following line causes the frontend to misbehave!!!
+// that is totally weird!
+//#include <boost/algorithm/string.hpp>
 #include "BinQGui.h"
-#include <ext/hash_map>
 
-#include <sstream>
-#include <QFileDialog>
-#include <unistd.h>
-
-#include "boost/filesystem/operations.hpp" // includes boost/filesystem/path.hpp
+#include "boost/filesystem/operations.hpp" 
 #include <boost/lexical_cast.hpp>
 #include <iostream>
 
 #include "icons.h"
+#include "folder.xpm"
 
-//#include "disks.xpm"
-#include "folder.xpm"
 #include "BinQSupport.h"
+#include "slide.h"
 
-#define EMACS
+#include <qtabwidget.h>
 
+
+#include "LCS.h"
+#include "Clone.h"
+#include "FunctionDiff.h"
+#include "AlignFunctions.h"
+#include "BinCallGraph.h"
+#include "BinControlFlowAnalysis.h"
+#include "BinDataFlowAnalysis.h"
+#include "BufferOverflow.h"
+#include "InterruptAnalysis.h"
+
 using namespace qrs;
 using namespace boost::filesystem;
 using namespace std;
 using namespace boost;
 using namespace __gnu_cxx;
 
+
 // ----------------------------------------------------------------------------------------------
+// specify analyses here!
+//void alignFunctions();
+//void andreasDiff();
+//void alignFunctionsSmart();
+
+void clicked1() {
+  BinQGUI *instance = QROSE::cbData<BinQGUI *>();
+  QListWidgetItem *item= instance->listWidget->currentItem(); 
+  QString te = item->text();
+  string t = te.toStdString();
+  //const char *t = (const char *)text;
+  cerr << " Selected : " << t << endl;
+  for (unsigned int i=0;i<instance->analyses.size();++i) {
+    BinAnalyses* analysis = instance->analyses[i];
+    if (t==analysis->name()) {
+      instance->analysisInfo->setText(instance->analyses[i]->getDescription().c_str());
+      instance->analyses[i]->run();
+    } 
+  }
+} 
+
+
+
+
+
+// ----------------------------------------------------------------------------------------------
 void toolbarClick(int action) {
   BinQGUI *instance = QROSE::cbData<BinQGUI *>();
   switch(action){
@@ -45,103 +80,619 @@
   }
 }
 
-static void tableWidgetCellActivated(int col, int row, int oldCol, int oldRow) {
+
+
+static void tableWidgetCellActivatedA(int col, int row, int oldCol, int oldRow) {
   BinQGUI *instance = QROSE::cbData<BinQGUI *>();
-  instance->unhighlightFunctionRow(oldRow);
-  instance->highlightFunctionRow(row);
+  instance->unhighlightFunctionRow(oldRow, true);
+  instance->highlightFunctionRow(row,true);
   return;
 } //tableCellActivated(int col, int row, int oldCol, int oldRow)
 
-static void codeTableWidgetCellActivated(int col, int row, int oldCol, int oldRow) {
+static void codeTableWidgetCellActivatedA(int col, int row, int oldCol, int oldRow) {
   BinQGUI *instance = QROSE::cbData<BinQGUI *>();
-  instance->unhighlightInstructionRow(oldRow);
-  instance->highlightInstructionRow(row);
+  instance->unhighlightInstructionRow(oldRow, true);
+  instance->highlightInstructionRow(row, true);
+  Item* item = instance->rowItemFileA[row];
+  if (item) {
+    QString res = QString("A: Item selected  %1 : %2.")
+      .arg(item->row)
+      .arg(isSgNode(item->statement)->class_name().c_str());
+    instance->console->append(res);  
+    SgAsmElfSection* sec = isSgAsmElfSection(item->statement);
+    if (sec) {
+      instance->analysisTab->setCurrentIndex(3);
+      instance->insertSectionInformation(sec,instance->fileNameA);      
+    }
+  }
   return;
 } //tableCellActivated(int col, int row, int oldCol, int oldRow)
 
-static void viewBoxActivated(int selection) {
+static void tableWidgetCellActivatedB(int col, int row, int oldCol, int oldRow) {
   BinQGUI *instance = QROSE::cbData<BinQGUI *>();
-  instance->selectView(selection);
+  instance->unhighlightFunctionRow(oldRow, false);
+  instance->highlightFunctionRow(row,false);
   return;
-}
+} //tableCellActivated(int col, int row, int oldCol, int oldRow)
 
+static void codeTableWidgetCellActivatedB(int col, int row, int oldCol, int oldRow) {
+  BinQGUI *instance = QROSE::cbData<BinQGUI *>();
+  instance->unhighlightInstructionRow(oldRow, false);
+  instance->highlightInstructionRow(row, false);
+  Item* item = instance->rowItemFileB[row];
+  if (item) {
+    QString res = QString("B: Item selected  %1 : %2.")
+      .arg(item->row)
+      .arg(isSgNode(item->statement)->class_name().c_str());
+    instance->console->append(res);  
+    SgAsmElfSection* sec = isSgAsmElfSection(item->statement);
+    if (sec) {
+      instance->analysisTab->setCurrentIndex(3);
+      instance->insertSectionInformation(sec,instance->fileNameB);      
+    }
+  }
+  return;
+} //tableCellActivated(int col, int row, int oldCol, int oldRow)
 
 
 
 
+// ----------------------------------------------------------------------------------------------
 
 
-// ----------------------------------------------------------------------------------------------
-
-void BinQGUI::highlightFunctionRow(int row) {
-  activeFunctionRow = -1;
+void BinQGUI::highlightFunctionRow(int row, bool fileA) {
   if(row >= 0)    {         
-    QFont f = tableWidget->getFont(0, row);
-    f.setBold(true);
-    tableWidget->setFont(f, 0, row);
-    activeFunctionRow = row;
-    showFileA(row);
-    //tableWidget->isItemSelected(tableWidget->horizontalHeaderItem(row));
+    if (fileA) {
+      QFont f = tableWidget->getFont(0, row);
+      f.setBold(true);
+      tableWidget->setFont(f, 0, row);
+      tableWidget->setBgColor(QColor(255,255,0),0,row);
+      //showFileA(row);
+      if (isSgAsmFunctionDeclaration(funcsFileA[row])) {
+	SgAsmFunctionDeclaration* func = isSgAsmFunctionDeclaration(funcsFileA[row]);
+	std::vector<Item*>::iterator it = itemsFileA.begin();
+	int offset=0;
+	for (;it!=itemsFileA.end();++it) {
+	  Item* item = *it;
+	  if (isSgAsmStatement(item->statement)) {
+	    SgAsmStatement* stat = isSgAsmStatement(item->statement);
+	    if (func==isSgAsmFunctionDeclaration(stat)) {
+	      offset=item->row;
+	      break;
+	    }
+	  } 
+	}
+      
+	//cerr << " highlight func row : " << row << "  inst row : " << offset << endl;
+	codeTableWidget->setCurrentCell(offset,0);
+      }
+    } else {
+      QFont f = tableWidget2->getFont(0, row);
+      f.setBold(true);
+      tableWidget2->setFont(f, 0, row);
+      tableWidget2->setBgColor(QColor(255,255,0),0,row);
+      //      showFileB(row);
+      if (isSgAsmFunctionDeclaration(funcsFileB[row])) {
+	SgAsmFunctionDeclaration* func = isSgAsmFunctionDeclaration(funcsFileB[row]);
+	std::vector<Item*>::iterator it = itemsFileB.begin();
+	int offset=0;
+	for (;it!=itemsFileB.end();++it) {
+	  Item* item = *it;
+	  SgAsmStatement* stat = isSgAsmStatement(item->statement);
+	  if (func==isSgAsmFunctionDeclaration(stat)) {
+	    offset=item->row;
+	    break;
+	  }
+	}
+	//      cerr << " highlight func row : " << row << "  inst row : " << offset << endl;
+	codeTableWidget2->setCurrentCell(offset,0);
+      } else if (isSgFunctionDeclaration(funcsFileB[row])) {
+	SgFunctionDeclaration* func = isSgFunctionDeclaration(funcsFileB[row]);
+	std::vector<Item*>::iterator it = itemsFileB.begin();
+	int offset=0;
+	for (;it!=itemsFileB.end();++it) {
+	  Item* item = *it;
+	  SgLocatedNode* stat = isSgLocatedNode(item->statement);
+	  if (func==isSgFunctionDeclaration(stat)) {
+	    offset=item->row;
+	    break;
+	  }
+	}
+	codeTableWidget2->setCurrentCell(offset,0);
+      }
+    }
   } //if(row >= 0)
 } //CompassGui::highlighFunctionRow(int row)
 
-void BinQGUI::unhighlightFunctionRow(int row) {
+void BinQGUI::unhighlightFunctionRow(int row, bool fileA) {
   if (row >= 0)     {
-    QFont f = tableWidget->getFont(0, row);
-    f.setBold(false);
-    tableWidget->setFont(f, 0, row);
+    if (fileA) {
+      QFont f = tableWidget->getFont(0, row);
+      f.setBold(false);
+      tableWidget->setFont(f, 0, row);
+      tableWidget->setBgColor(QColor(255,255,255),0,row);
+    } else {
+      QFont f = tableWidget2->getFont(0, row);
+      f.setBold(false);
+      tableWidget2->setFont(f, 0, row);
+      tableWidget2->setBgColor(QColor(255,255,255),0,row);
+    }
   } //if (row >= 0)
 } //CompassGui::unhighlighFunctionRow(int row)
 
 
-void BinQGUI::highlightInstructionRow(int row) {
-  activeInstructionRow = -1;
+
+
+void BinQGUI::highlightInstructionRow(int row, bool fileA) {
   if(row >= 0)    {         
-    QFont f = codeTableWidget->getFont(0, row);
-    f.setBold(true);
-    codeTableWidget->setFont(f, 0, row);
-    activeInstructionRow = row;
-    //tableWidget->isItemSelected(tableWidget->horizontalHeaderItem(row));
+    if (fileA) {
+      QFont f = codeTableWidget->getFont(0, row);
+      f.setBold(true);
+      codeTableWidget->setCurrentCell(row,0);
+      Item* item = itemsFileA[row];
+      for (int j=1;j<maxrows;j++) {
+	codeTableWidget->setFont(f, j, row);
+	if (isSgAsmFunctionDeclaration(item->statement) ||
+	    isSgFunctionDeclaration(item->statement)) 
+	  codeTableWidget->setBgColor(QColor(120,120,120),j,row);
+	else 
+	  codeTableWidget->setBgColor(QColor(255,255,0),j,row);
+      }
+    } else {
+      QFont f = codeTableWidget2->getFont(0, row);
+      f.setBold(true);
+      codeTableWidget2->setCurrentCell(row,0);
+      Item* item = itemsFileB[row];
+      if (item) {
+	for (int j=1;j<maxrows;j++) {
+	  codeTableWidget2->setFont(f, j, row);
+	  if (isSgAsmFunctionDeclaration(item->statement) ||
+	      isSgFunctionDeclaration(item->statement)) 
+	    codeTableWidget2->setBgColor(QColor(120,120,120),j,row);
+	  else
+	    codeTableWidget2->setBgColor(QColor(255,255,0),j,row);
+	}
+      }
+    }
   } //if(row >= 0)
-
 } //CompassGui::highlighFunctionRow(int row)
 
-void BinQGUI::unhighlightInstructionRow(int row) {
+void BinQGUI::unhighlightInstructionRow(int row,bool fileA) {
   if (row >= 0)     {
-    QFont f = codeTableWidget->getFont(0, row);
-    f.setBold(false);
-    codeTableWidget->setFont(f, 0, row);
+    if (fileA) {
+      QFont f = codeTableWidget->getFont(0, row);
+      f.setBold(false);
+      Item* item = itemsFileA[row];
+      for (int j=1;j<maxrows;j++) {      
+	codeTableWidget->setFont(f, j, row);
+	codeTableWidget->setBgColor(item->bg,j,row);
+      }
+    } else {
+      QFont f = codeTableWidget2->getFont(0, row);
+      f.setBold(false);
+      Item* item = itemsFileB[row];
+      if (item) {
+	for (int j=1;j<maxrows;j++) {      
+	  codeTableWidget2->setFont(f, j, row);
+	  codeTableWidget2->setBgColor(item->bg,j,row);
+	}
+      }
+    }
   } //if (row >= 0)
-
 } //CompassGui::unhighlighFunctionRow(int row)
 
 
 
 
 // ----------------------------------------------------------------------------------------------
+
+void BinQGUI::updateByteItemList() {
+  // update byteItemList
+  cerr << "updating itemsFileA : " << itemsFileA.size() << endl; 
+  for (unsigned int i=0;i<itemsFileA.size();++i) {
+    Item* a = itemsFileA[i];
+    if (a) {
+      int pos = a->pos;
+      int length = a->length;
+      //      cerr << i << ": updating pos : " << pos << " length : " << length << endl;       
+      for (int k=0; k<length;++k)
+	byteItemFileA[pos+k]=a;
+      rowItemFileA[i]=a;
+    }
+  }
+  cerr << "updating itemsFileA : " << itemsFileB.size() << endl; 
+  for (unsigned int i=0;i<itemsFileB.size();++i) {
+    Item* b = itemsFileB[i];
+    if (b) {
+      int pos = b->pos;
+      int length = b->length;
+      for (int k=0; k<length;++k)
+	byteItemFileB[pos+k]=b;
+      rowItemFileB[i]=b;
+    }
+  }
+  cerr << "displaying A and B ... " << endl; 
+  slide->colorize();
+  showFileA(0);
+  showFileB(0);
+  //  codeTableWidget->viewport()->update();
+  //codeTableWidget2->viewport()->update();
+
+}
+
+
+
 void
-BinQGUI::selectView(int selection) {
-  switch (selection) {
-  case 0:
-    //    codeWidget->setHtml(QString(normalizedView.first.c_str()));
-    codeWidget2->setHtml(QString(normalizedView.second.c_str()));
-    break;
-  case 1:
-    //codeWidget->setHtml(QString(allInsnsUnparsedView.first.c_str()));
-    codeWidget2->setHtml(QString(allInsnsUnparsedView.second.c_str()));
-    break;
+BinQGUI::insertSectionInformation(SgAsmElfSection* sec, std::string filename) {
+  ROSE_ASSERT(sec);
+  sectionInfo->setText(filename.c_str());
+  SgAsmElfFileHeader* elf = isSgAsmElfFileHeader(sec);
+  if (elf) {
+    sectionInfo->append(elf->format_name());
+    string num = RoseBin_support::ToString(elf->get_e_machine());
+    sectionInfo->append( QString("Machine: %1")
+		      .arg(num.c_str()) );
+    SgAsmElfSegmentTable *segments = elf->get_segment_table();
+    string seg = RoseBin_support::ToString(segments);
+    sectionInfo->append( QString("ElfSegmentTable: %1")
+		      .arg(seg.c_str()) );
+    SgAsmElfSectionTable *sections = elf->get_section_table();
+    string sec = RoseBin_support::ToString(sections);
+    sectionInfo->append( QString("ElfSectionTable: %1")
+		      .arg(sec.c_str()) );
+  } else {
+      SgAsmElfSectionTableEntry* entry= sec->get_section_entry();
+      if (entry) {
+	rose_addr_t addr = entry->get_sh_addr();
+	rose_addr_t size = entry->get_sh_size();
+	rose_addr_t offset = entry->get_sh_offset();
+	string addrS = RoseBin_support::HexToString(addr);
+	string sizeS = RoseBin_support::HexToString(size);
+	string offsetS = RoseBin_support::HexToString(offset);
+	sectionInfo->append( QString("%1           type:     %2 Addr: %3  Size: %4   Offset: %5")
+			  .arg(QString(sec->get_name()->get_string().c_str()))
+			  .arg(sec->class_name().c_str())
+			  .arg(addrS.c_str())
+			  .arg(sizeS.c_str())
+			  .arg(offsetS.c_str()));	 
+      }
   }
-};
+  sectionInfo->append(QString("Append dump information here..."));
+}
 
+void
+BinQGUI::insertFileInformation() {
 
+  ROSE_ASSERT(isSgProject(fileA));
 
+  SgBinaryFile* binaryFile = isSgBinaryFile(isSgProject(fileA)->get_fileList()[0]);
+  SgAsmFile* file = binaryFile != NULL ? binaryFile->get_binaryFile() : NULL;
 
-BinQGUI::BinQGUI(std::string fA, std::string fB ) :  window(0), fileNameA(fA), fileNameB(fB) {
+  SgAsmInterpretationPtrList& interps = file->get_interpretations();
+  SgAsmInterpretationPtrList::iterator it = interps.begin();
+  for (;it!=interps.end();++it) {
+    SgAsmInterpretation* mainInt = *it;
+    SgAsmGenericHeader* header = mainInt->get_header();
+    fileInfo->append(header->class_name().c_str());
+    SgAsmElfFileHeader* elf = isSgAsmElfFileHeader(header);
+    if (elf) {
+      fileInfo->append(file->get_name().c_str());
+      fileInfo->append(elf->format_name());
+      string num = RoseBin_support::ToString(elf->get_e_machine());
+      fileInfo->append( QString("Machine: %1")
+			.arg(num.c_str()) );
+      SgAsmElfSegmentTable *segments = elf->get_segment_table();
+      string seg = RoseBin_support::ToString(segments);
+      fileInfo->append( QString("ElfSegmentTable: %1")
+			.arg(seg.c_str()) );
+      SgAsmElfSectionTable *sections = elf->get_section_table();
+      string sec = RoseBin_support::ToString(sections);
+      fileInfo->append( QString("ElfSectionTable: %1")
+			.arg(sec.c_str()) );
+    }
+  }
+  SgAsmGenericFile *genericF = file->get_genericFile() ;
+  string size = RoseBin_support::ToString(genericF->get_orig_size());
+  fileInfo->append( QString("Orig Size of AsmGenericFile: %1")
+		    .arg(size.c_str()) );
+
+  SgAsmGenericHeaderPtrList headers = genericF->get_headers()->get_headers();
+  fileInfo->append(QString("HEADERS ------------- %1")
+		   .arg(RoseBin_support::ToString(headers.size()).c_str()));	 
+  for (unsigned int i=0;i<headers.size();++i) {
+    SgAsmGenericHeader* h = headers[i];
+    fileInfo->append(h->class_name().c_str());	 
+    fileInfo->append(h->format_name());	 
+  }
+
+  SgAsmGenericSectionPtrList sectionsList = genericF->get_sections();
+  fileInfo->append(QString("SECTIONS ------------- %1")
+		   .arg(RoseBin_support::ToString(sectionsList.size()).c_str()));	 
+  for (unsigned int i=0;i<sectionsList.size();++i) {
+    SgAsmGenericSection* h = sectionsList[i];
+    SgAsmElfSection* elfSec = isSgAsmElfSection(h);
+    if (elfSec) {
+      SgAsmElfSectionTableEntry* entry= elfSec->get_section_entry();
+      if (entry) {
+	rose_addr_t addr = entry->get_sh_addr();
+	rose_addr_t size = entry->get_sh_size();
+	rose_addr_t offset = entry->get_sh_offset();
+	string addrS = RoseBin_support::HexToString(addr);
+	string sizeS = RoseBin_support::HexToString(size);
+	string offsetS = RoseBin_support::HexToString(offset);
+	fileInfo->append( QString("%1           type:     %2 Addr: %3  Size: %4   Offset: %5")
+			  .arg(QString(h->get_name()->get_string().c_str()))
+			  .arg(h->class_name().c_str())
+			  .arg(addrS.c_str())
+			  .arg(sizeS.c_str())
+			  .arg(offsetS.c_str()));	 
+      }
+    } else {
+      fileInfo->append( QString("%1")
+			.arg(h->class_name().c_str()));
+    }
+  }
+  SgFileContentList fileList = genericF->get_data();
+  fileInfo->append(QString("DATA ---------------- %1 ")
+		   .arg(fileList.size()));	 
+#if 0
+  string data="";
+  for (unsigned int i=0;i<fileList.size();++i) {
+    data.append(RoseBin_support::ToString(fileList[i]));	
+  }
+  fileInfo->append( data.c_str());	 
+#endif
+  // doesnt work
+  SgFileContentList contentList = genericF->content();
+  fileInfo->append(QString("CONTENT ------------- %1 ")
+		   .arg(contentList.size()));	 
+#if 0
+  string content="";
+  for (unsigned int i=0;i<contentList.size();++i) {
+    data += RoseBin_support::ToString(contentList[i]);	
+  }
+  fileInfo->append( content.c_str());	 
+#endif
+
+
+}
+
+
+BinQGUI::BinQGUI(std::string fA, std::string fB,bool test ) :  
+  window(0), fileNameA(fA), fileNameB(fB) {
   window = new QRWindow( "mainWindow", QROSE::TopDown );
   binqsupport= new BinQSupport();
+  maxrows=5;
+  sourceFile=false;
+  init();
+  if (test==false)
+    createGUI();
+}
 
-  fileA = binqsupport->disassembleFile(fileNameA);
-  fileB = binqsupport->disassembleFile(fileNameB);
+void BinQGUI::init(){
+  cerr << "Checking for analyses ... " << endl;
+  analyses.clear();
+  analyses.push_back(new DiffAlgo());
+  analyses.push_back(new FunctionDiffAlgo());
+  analyses.push_back(new AlignFunction());
+  analyses.push_back(new BinCallGraph());
+  analyses.push_back(new BinControlFlowAnalysis());
+  analyses.push_back(new BinDataFlowAnalysis());
+  analyses.push_back(new BufferOverflow());
+  analyses.push_back(new InterruptAnalysis());
+
+
+  cerr << "Disassemble File A ... " << fileNameA << endl;
+  std::string sourceFileS;
+  fileA = binqsupport->disassembleFile(fileNameA, sourceFileS);
+  cerr << "\nDisassemble File B ... " << fileNameB << endl;
+  fileB = binqsupport->disassembleFile(fileNameB, sourceFileS);
+  ROSE_ASSERT(fileA);
+  ROSE_ASSERT(fileB);
+  if (sourceFileS=="true")
+    sourceFile=true;
+
+  ROSE_ASSERT(isSgProject(fileA));
+  backend(isSgProject(fileA));
+
+  string filename="binary_tree.dot";
+  AST_BIN_Traversal* trav = new AST_BIN_Traversal();
+  trav->run(fileA, filename);
+
+  
+  // this part writes the file out to an assembly file -----------------------------------
+  SgBinaryFile* binaryFileA = isSgBinaryFile(isSgProject(fileA)->get_fileList()[0]);
+  SgAsmFile* file1 = binaryFileA != NULL ? binaryFileA->get_binaryFile() : NULL;
+  SgAsmInterpretation* interpA = SageInterface::getMainInterpretation(file1);
+
+  unparseAsmStatementToFile("unparsedA.s", interpA->get_global_block());
+
+  if(is_directory( fileNameB  ) == false && sourceFile==false) {
+    SgBinaryFile* binaryFileB = isSgBinaryFile(isSgProject(fileB)->get_fileList()[0]);
+    SgAsmFile* file2 = binaryFileB != NULL ? binaryFileB->get_binaryFile() : NULL;
+    SgAsmInterpretation* interpB = SageInterface::getMainInterpretation(file2);
+    unparseAsmStatementToFile("unparsedB.s", interpB->get_global_block());
+  }
+  // -------------------------------------------------------------------------------------
+
+  itemsFileA.clear();
+  itemsFileB.clear();
+  
+  // ---------------------- Create itemsFileA and itemsFileB , containing all statements
+  FindAsmFunctionsVisitor funcVis;
+  AstQueryNamespace::querySubTree(fileA, std::bind2nd( funcVis, &funcsFileA ));
+  if (sourceFile) {
+    FindSgFunctionsVisitor funcVisSource;
+    AstQueryNamespace::querySubTree(fileB, std::bind2nd( funcVisSource, &funcsFileB ));
+  } else
+    AstQueryNamespace::querySubTree(fileB, std::bind2nd( funcVis, &funcsFileB ));
+
+  cerr << " File A has " << funcsFileA.size() << " funcs." << endl;
+  cerr << " File B has " << funcsFileB.size() << " funcs." << endl;
+
+  FindAsmStatementsHeaderVisitor visStat;
+  std::vector<SgNode*> stmts;
+  AstQueryNamespace::querySubTree(fileA, std::bind2nd( visStat, &stmts ));
+  vector<SgNode*>::iterator it= stmts.begin();
+  int pos=0;
+  int row=0;
+  for (;it!=stmts.end();++it) {
+    Item* item=NULL;
+    int length=1;
+    // make sure file 1 is a binary file -- source file only for file 2 allowed
+    ROSE_ASSERT(isSgAsmNode(*it));
+    if (isSgAsmFunctionDeclaration(*it)) {
+      SgAsmFunctionDeclaration* func = isSgAsmFunctionDeclaration(*it);
+      item = new Item(func->get_address(),func,2,row,length, pos,"",0);
+    } else if (isSgAsmBlock(*it)) {
+      
+    } else if (isSgAsmInstruction(*it)) {
+      SgAsmInstruction* inst = isSgAsmInstruction(*it);
+      length = isSgAsmInstruction(*it)->get_raw_bytes().size();
+      item = new Item(inst->get_address(),inst,0,row,length,pos,"",0);
+    } else if (isSgAsmElfSection(*it)) {
+      SgAsmElfSection* sec = isSgAsmElfSection(*it);
+      std::string nam = "size: " + RoseBin_support::ToString(sec->get_size());
+      //      item = new Item(sec->get_offset(),sec,2,row,length,pos,nam,0);
+      item = new Item(sec->get_mapped_rva(),sec,2,row,length,pos,nam,0);
+    } else {
+      cerr << " >>> found pos : " << pos << "  item " << 
+	isSgAsmNode(*it)->class_name() << " length : " << length << endl;
+
+    }
+    // color code call as an example
+    if (isSgAsmx86Instruction(*it)) {
+      length = isSgAsmInstruction(*it)->get_raw_bytes().size();
+      if (isSgAsmx86Instruction(*it)->get_kind() == x86_call) { 
+	SgAsmx86Instruction* inst = isSgAsmx86Instruction(*it);
+	SgAsmOperandList * ops = inst->get_operandList();
+	SgAsmExpressionPtrList& opsList = ops->get_operands();
+	std::string addrDest="";
+	SgAsmExpressionPtrList::iterator itOP = opsList.begin();
+	for (;itOP!=opsList.end();++itOP) {
+	  addrDest += unparseX86Expression(*itOP, false) ;
+	}
+	string s="<...>";
+	for (unsigned int j=0; j<funcsFileA.size();++j) {
+	  SgAsmFunctionDeclaration* f = isSgAsmFunctionDeclaration(funcsFileA[j]);
+	  string addrF= RoseBin_support::HexToString(f->get_address());
+	  addrF="0x"+addrF.substr(1,addrF.size());
+	  if (addrF==addrDest) {
+	    s="<"+f->get_name()+">";
+	    break;
+	  }
+	}
+	delete item;
+	item = new Item(inst->get_address(),inst,3,row,length,pos,s,0);
+      }
+    }
+    if (item) {
+      row++;
+      //      cerr << " creating pos : " << pos << "  item " << 
+      //	isSgAsmNode(*it)->class_name() << " length : " << length << endl;
+      itemsFileA.push_back(item);
+      pos+=length;
+    }
+  }
+
+  stmts.clear();
+  if (!sourceFile) {
+    FindAsmStatementsHeaderVisitor visStat2;
+    AstQueryNamespace::querySubTree(fileB, std::bind2nd( visStat2, &stmts ));
+  } else {
+    FindNodeVisitor visStat2;
+    AstQueryNamespace::querySubTree(fileB, std::bind2nd( visStat2, &stmts ));
+  }
+  it= stmts.begin();
+  pos=0;
+  row=0;
+  for (;it!=stmts.end();++it) {
+    Item* item = NULL;
+    int length=1;
+    if (isSgAsmFunctionDeclaration(*it)){
+      SgAsmFunctionDeclaration* func = isSgAsmFunctionDeclaration(*it);
+      item = new Item(func->get_address(),func,2,row,length,pos,"",0);
+    }    else if (isSgAsmBlock(*it)) {
+      continue;
+      //item = new Item(false,*it,0,1,row,0);
+    } else if (isSgAsmInstruction(*it)) {
+      SgAsmInstruction* inst = isSgAsmInstruction(*it);
+      length = isSgAsmInstruction(*it)->get_raw_bytes().size();
+      item = new Item(inst->get_address(),inst,0,row,length,pos,"",0);
+    } else if (isSgFunctionDeclaration(*it)) {
+      int color=4;
+      SgFunctionDeclaration* func = isSgFunctionDeclaration(*it);
+      SgFunctionDefinition* def = isSgFunctionDefinition(isSgFunctionDeclaration(*it)->get_definition());
+      if (def)
+	color=2;
+      if (isSgFunctionDeclaration(*it)->get_file_info()->isCompilerGenerated())
+	color=3;
+      item = new Item(0,func,color,row,length,pos,"",0);
+    }  else if (isSgAsmElfSection(*it)) {
+      SgAsmElfSection* sec = isSgAsmElfSection(*it);
+      std::string nam = "size: " + RoseBin_support::ToString(sec->get_size());
+      //      item = new Item(sec->get_offset(),sec,2,row,length,pos,nam,0);
+      item = new Item(sec->get_mapped_rva(),sec,2,row,length,pos,nam,0);
+    }else if (isSgLocatedNode(*it)) {
+      Sg_File_Info* fi = isSgLocatedNode(*it)->get_file_info();
+      int line = -1;
+      if (fi) {
+	line = fi->get_line();
+	length = 1;
+      }
+      //      cerr << fi << " creating statement : " << isSgLocatedNode(*it)->class_name() << " ... comment " << line << endl;
+      item = new Item(line,isSgLocatedNode(*it),0,row,length,pos,
+		      isSgLocatedNode(*it)->class_name(),line);
+    } else {
+      //      cerr << "unknown node " << endl;//*it->class_name() << endl;
+      //      item = new Item(false,NULL,0,0,row,0,pos, " ",0);
+    }
+    //example -- color calls red
+    if (isSgAsmx86Instruction(*it)) {
+      length = isSgAsmInstruction(*it)->get_raw_bytes().size();
+      if (isSgAsmx86Instruction(*it)->get_kind() == x86_call) {
+	SgAsmx86Instruction* inst = isSgAsmx86Instruction(*it);
+	SgAsmOperandList * ops = inst->get_operandList();
+	SgAsmExpressionPtrList& opsList = ops->get_operands();
+	std::string addrDest="";
+	SgAsmExpressionPtrList::iterator itOP = opsList.begin();
+	for (;itOP!=opsList.end();++itOP) {
+	  addrDest += unparseX86Expression(*itOP, false) ;
+	}
+	string s="<...>";
+	for (unsigned int j=0; j<funcsFileB.size();++j) {
+	  SgAsmFunctionDeclaration* f = isSgAsmFunctionDeclaration(funcsFileB[j]);
+	  string addrF= RoseBin_support::HexToString(f->get_address());
+	  addrF="0x"+addrF.substr(1,addrF.size());
+	  if (addrF==addrDest) {
+	    s="<"+f->get_name()+">";
+	    break;
+	  }
+	}
+	delete item;
+	item = new Item(inst->get_address(),inst,3,row,length,pos,s,0);
+
+      }
+    }
+    if (item) {
+      row++;
+      itemsFileB.push_back(item);
+      pos+=length;
+    }
+  }
+
+}
+
+void BinQGUI::createGUI() {
+  QDesktopWidget *desktop = QApplication::desktop();
+
+
+  screenWidth = desktop->width()-10;
+  screenHeight = desktop->height()-100;
+  if (screenWidth>1450) screenWidth=1450;
+  if (screenHeight>1250) screenHeight=1250;
+
+
   {
     //--------------------------------------------------------------------------
     QRToolBar *toolbar = (*window)["toolbar"] << new QRToolBar(QROSE::LeftRight, true, true, true);
@@ -156,78 +707,126 @@
 
   QRPanel &mainPanel = *window << *( new QRPanel(QROSE::TopDown, QROSE::UseSplitter) );
   {
-    QRPanel &parameters = mainPanel << *new QRPanel(QROSE::LeftRight, QROSE::UseSplitter);
+    QRPanel &topPanels = mainPanel << *new QRPanel(QROSE::TopDown, QROSE::UseSplitter);
     {
-      QGroupBox *selectGroup =  parameters <<  new QGroupBox(("Data Selection Parameters"));
+      QGroupBox *topPanelLeft =  topPanels <<  new QGroupBox(("Binary File Analysis Information"));
       {
         QGridLayout *echoLayout =  new QGridLayout;
-        QLabel *echoLabel = new QLabel(">=:");
-	echoLayout->addWidget(echoLabel, 0, 0);
-        largerThanRestriction = new QLineEdit;
-        echoLayout->addWidget(largerThanRestriction, 0, 1);
-        
-        QLabel *functionLabel = new QLabel("<=:");
-        echoLayout->addWidget(functionLabel, 1, 0);
-        smallerThanRestriction = new QLineEdit;
-        echoLayout->addWidget(smallerThanRestriction, 1, 1 );
+	slide = new Slide(this);
+	echoLayout->addWidget(slide, 0, 0 );
+        topPanelLeft->setLayout(echoLayout);
 
+      }
+      topPanelLeft->setFixedHeight(70);
+      QRPanel &analysisPanel = topPanels << *new QRPanel(QROSE::LeftRight, QROSE::UseSplitter);
+      {
+	QRPanel &analysisPanelLeft = analysisPanel << *new QRPanel(QROSE::TopDown, QROSE::UseSplitter);
+	{
+	  // add analyses here
+	  QTabWidget *qtabwidgetL =  analysisPanelLeft << new QTabWidget( );
+	  listWidget = new QListWidget;
+	  for (unsigned int i=0; i < analyses.size(); ++i){
+	    new QListWidgetItem((analyses[i]->name().c_str()), listWidget);
+	  }
+	  //	  new QListWidgetItem(("Align Functions Smart"), listWidget);
+	  //new QListWidgetItem(("Binary Diff"), listWidget);
 
-	wholeFunction = new QComboBox;
-	wholeFunction->addItem(("No"));
-	wholeFunction->addItem(("Yes"));
+	  QROSE::link(listWidget, 
+		      SIGNAL(itemSelectionChanged()), 
+		      &clicked1, this);
 
-	QLabel *wholeFunctionLabel = new QLabel("Only whole functions:");
-	echoLayout->addWidget(wholeFunctionLabel, 2, 0 );
+	  qtabwidgetL->insertTab(0,listWidget,"Analyses");
 
-	echoLayout->addWidget(wholeFunction, 2, 1 );
+	  analysisInfo = analysisPanelLeft << new QTextEdit;//new QREdit(QREdit::Box);
+	  analysisInfo->setReadOnly(true);
+	  
+	}
+	analysisPanelLeft.setFixedWidth(screenWidth/4 );
+	//	analysisPanelLeft.setFixedHeight(170);
 
-        selectGroup->setLayout(echoLayout);
-      }
-      
-      comboBox = new QComboBox;
-      comboBox->addItem(("Normalized"));
-      comboBox->addItem(("Whole Function"));
-      
-      QGroupBox *echoGroup =  parameters <<  new QGroupBox(("Selection Clone-View"));
-      QGridLayout *echoLayout =  new QGridLayout;
-      QLabel *echoLabel = new QLabel("Views:");
-      echoLayout->addWidget(echoLabel, 0, 0);
-      echoLayout->addWidget(comboBox, 0, 1);
+	QRPanel &analysisPanelRight = analysisPanel << *new QRPanel(QROSE::LeftRight, QROSE::UseSplitter);
+	{
 
+	  // --------
+	  analysisTab =  analysisPanelRight << new QTabWidget();
+	  //	analysisPanelRight.setTileSize(50,50);
 
-      echoGroup->setLayout(echoLayout);
+	  console = new QTextEdit;//new QREdit(QREdit::Box);
+	  console->setReadOnly(true);
+	  console->setText("Initializing GUI");
 
-      QROSE::link(comboBox, SIGNAL(activated(int)), &viewBoxActivated, this);
+	  analysisResult = new QTextEdit;//new QREdit(QREdit::Box);
+	  analysisResult->setReadOnly(true);
+
+	  sectionInfo = new QTextEdit;//new QREdit(QREdit::Box);
+	  sectionInfo->setReadOnly(true);
+
+	  fileInfo = new QTextEdit;//new QREdit(QREdit::Box);
+	  fileInfo->setReadOnly(true);
+	  insertFileInformation();
+
+	  analysisTab->insertTab(0,console,"Console");
+	  analysisTab->insertTab(1,analysisResult,"Analysis Results");
+	  analysisTab->insertTab(2,fileInfo,"File Info");
+	  analysisTab->insertTab(3,sectionInfo,"Section Info");
+	}
+      }
+      //      topPanels.setFixedHeight(300);
     }
       
     QRPanel &bottomPanel = mainPanel << *new QRPanel(QROSE::LeftRight, QROSE::UseSplitter);
     {
       QRPanel &bottomPanelLeft = bottomPanel << *new QRPanel(QROSE::LeftRight, QROSE::UseSplitter);
       {
-	tableWidget = bottomPanelLeft << new QRTable( 2, "function","#instr" );
-	QROSE::link(tableWidget, SIGNAL(activated(int, int, int, int)), &tableWidgetCellActivated, this);
-	codeTableWidget = bottomPanelLeft << new QRTable( 4, "address","instr","operands","comment" );
+	tableWidget = bottomPanelLeft << new QRTable( 1, "function" );
+	QROSE::link(tableWidget, SIGNAL(activated(int, int, int, int)), &tableWidgetCellActivatedA, this);
+	tableWidget2 = bottomPanelLeft << new QRTable( 1, "function" );
+	QROSE::link(tableWidget2, SIGNAL(activated(int, int, int, int)), &tableWidgetCellActivatedB, this);
 
+	//	bottomPanelLeft.setTileSize(20,20);
+      }
 
-	QROSE::link(codeTableWidget, SIGNAL(activated(int, int, int, int)), &codeTableWidgetCellActivated, this);
+      QRPanel &bottomPanelRight = bottomPanel << *new QRPanel(QROSE::LeftRight, QROSE::UseSplitter);
+      {
+	codeTableWidget = bottomPanelRight << new QRTable( 7, "row","address","instr","operands","comment","pos","byte" );
+	QROSE::link(codeTableWidget, SIGNAL(activated(int, int, int, int)), &codeTableWidgetCellActivatedA, this);
+	if (sourceFile) {
+	  codeTableWidget2 = bottomPanelRight << new QRTable( 5, "row","line","text","type","pos" );
+	  maxrows=3;
+	} else {
+	  codeTableWidget2 = bottomPanelRight << new QRTable( 7, "row","address","instr","operands","comment","pos","byte" );
+	}
+	QROSE::link(codeTableWidget2, SIGNAL(activated(int, int, int, int)), &codeTableWidgetCellActivatedB, this);
 
-	//	codeWidget = bottomPanelLeft << new QTextEdit;//new QREdit(QREdit::Box);
-	//codeWidget->setReadOnly(true);
       }
-      bottomPanelLeft.setTileSize(25,90);
-      codeWidget2 = bottomPanel << new QTextEdit;//new QREdit(QREdit::Box);
-      codeWidget2->setReadOnly(true);
-      bottomPanel.setTileSize(50,50);
+      bottomPanelLeft.setFixedWidth(screenWidth/5 );
     } //mainPanel
-    mainPanel.setTileSize(10,60);
+    mainPanel.setTileSize(30);
   } //window 
 
-  window->setGeometry(0,0,1280,1200);
-  window->setTitle("BinaryCloneMainGui");
+
+
+  window->setGeometry(0,0,screenWidth,screenHeight);
+  window->setTitle("BinQ");
+  console->append("Initializing done.");
+  QString res = QString("A: Total functions  %1.  Total statements: %2. ")
+    .arg(funcsFileA.size())
+    .arg(itemsFileA.size());
+  console->append(res);  
+  QString res2 = QString("B: Total functions  %1.  Total statements: %2. ")
+    .arg(funcsFileB.size())
+    .arg(itemsFileB.size());
+  console->append(res2);  
+
+
+  updateByteItemList();
+  // ------------------------------------
+
 } //BinQGUI::BinQGUI()
 
 
 void BinQGUI::open() {
+#if 0
   char buf[4096] = "\0";
   std::string database = QFileDialog::getOpenFileName( 0, "Open As", getcwd(buf, 4096), "ASCII (*.sql)").toStdString();
   if( database.empty() ) return;
@@ -235,9 +834,12 @@
     //codeWidget->setReadOnly(true);
     //codeWidget->setPlainText(QString("foobar\nBar\nFoobari3"));
   }
+#endif
 } //CompassGui::open()
 
 void BinQGUI::reset() {
+  init();
+  updateByteItemList();
 } //CompassGui::open()
 
 
@@ -246,155 +848,415 @@
 void
 BinQGUI::run( ) {
   QROSE::unlink(tableWidget, SIGNAL(activated(int, int, int, int)));
-  while(tableWidget->rowCount()) tableWidget->removeRow(0);
+  QROSE::unlink(tableWidget2, SIGNAL(activated(int, int, int, int)));
+  while(tableWidget->rowCount()) 
+    tableWidget->removeRow(0);
+  while(tableWidget2->rowCount()) 
+    tableWidget2->removeRow(0);
 
-
-  FindAsmFunctionsVisitor funcVis;
-  AstQueryNamespace::querySubTree(fileA, std::bind2nd( funcVis, &funcs ));
-  //FindInstructionsVisitor vis;
-  //AstQueryNamespace::querySubTree(fileA, std::bind2nd( vis, &insns ));
-  FindStatementsVisitor visStat;
-  AstQueryNamespace::querySubTree(fileA, std::bind2nd( visStat, &stmts ));
-
-  vectorOfClones.allocate(funcs.size());
-  for (size_t row = 0; row < funcs.size(); ++row) {
-    Element cur_elem;
-    cur_elem.function_name_A = funcs[row]->get_name();
-    cur_elem.function_name_B = funcs[row]->get_name();
-
-    FindStatementsVisitor visStat2;
-    std::vector<SgAsmStatement*> stmts2;
-    AstQueryNamespace::querySubTree(funcs[row], std::bind2nd( visStat2, &stmts2 ));
-    cur_elem.size = stmts2.size();
-    vectorOfClones[row] = cur_elem;
-    
+  tableWidget->setTextColor(QColor(0,0,255),0);
+  tableWidget2->setTextColor(QColor(0,0,255),0);
+  for (size_t row = 0; row < funcsFileA.size(); ++row) {
     tableWidget->addRows(1);
-    tableWidget->setText(boost::lexical_cast<std::string>(cur_elem.function_name_A), 0, row);
-    tableWidget->setText(boost::lexical_cast<std::string>(cur_elem.size), 1, row);
+    ROSE_ASSERT(isSgAsmFunctionDeclaration(funcsFileA[row]));
+    tableWidget->setText(boost::lexical_cast<std::string>(isSgAsmFunctionDeclaration(funcsFileA[row])->get_name()), 0, row);
+    //tableWidget->setText(boost::lexical_cast<std::string>(cur_elem.size), 1, row);
     tableWidget->setVDim(row,18);
   }
+  for (size_t row = 0; row < funcsFileB.size(); ++row) {
+    tableWidget2->addRows(1);
+    if (isSgAsmFunctionDeclaration(funcsFileB[row]))
+      tableWidget2->setText(boost::lexical_cast<std::string>(isSgAsmFunctionDeclaration(funcsFileB[row])->get_name()), 0, row);
+    if (isSgFunctionDeclaration(funcsFileB[row])) {
+      SgFunctionDeclaration* func = isSgFunctionDeclaration(funcsFileB[row]);
+      if (func->get_file_info()->isCompilerGenerated())
+	tableWidget2->setTextColor(QColor(255,0,0),0,row);	
+      else if (isSgFunctionDefinition(func->get_definition()))
+	tableWidget2->setTextColor(QColor(0,0,0),0,row);
+      else
+	tableWidget2->setTextColor(QColor(128,128,128),0,row);
+      //      cerr << row << " comp : " << func->get_file_info()->isCompilerGenerated() <<
+      //	"   def : " << isSgFunctionDefinition(func->get_definition()) << endl;
+      tableWidget2->setText(boost::lexical_cast<std::string>(isSgFunctionDeclaration(funcsFileB[row])->get_name().str()), 0, row);
+    }
+    tableWidget2->setVDim(row,18);
+  }
   tableWidget->setHAlignment(true, false, 0); // left horizontal alignment
-  tableWidget->setHAlignment(true, false, 1); // left horizontal alignment
-  tableWidget->setTextColor(QColor(0,0,255),0);
-  tableWidget->setHDim(0,100);
-  tableWidget->setHDim(1,40);
+
+  tableWidget->setHDim(0,140);
   tableWidget->setShowGrid(false);
-  //    tableWidget->setColumnStretchable(0,false);
+  tableWidget2->setHAlignment(true, false, 0); // left horizontal alignment
+  tableWidget2->setHDim(0,140);
+  tableWidget2->setShowGrid(false);
+
   
-  QROSE::link(tableWidget, SIGNAL(activated(int, int, int, int)), 
-	      &tableWidgetCellActivated, this);
+  QROSE::link(tableWidget, SIGNAL(activated(int, int, int, int)),  &tableWidgetCellActivatedA, this);
+  QROSE::link(tableWidget2, SIGNAL(activated(int, int, int, int)),  &tableWidgetCellActivatedB, this);
   showFileA(0);
+  showFileB(0);
 }
 
 
-  
-
-
 void BinQGUI::showFileA(int row) {
   QROSE::unlink(codeTableWidget, SIGNAL(activated(int, int, int, int)));
-  while(codeTableWidget->rowCount()) codeTableWidget->removeRow(0);
 
-  //Disassemble files
-  Element& elem = vectorOfClones[row];
-  std::string unparsedFileA;
-  std::string unparsedFileB;
+  while(codeTableWidget->rowCount()) 
+    codeTableWidget->removeRow(0);
 
-  std::string normalizedFileA;
-  std::string normalizedFileB;
-
   ROSE_ASSERT(fileA != NULL);
   ROSE_ASSERT(fileB != NULL);
 
+  ROSE_ASSERT(isSgAsmFunctionDeclaration(funcsFileA[row]));
+  QString res = QString("FILE A : Looking at function  %1  row: %2  size ")
+    .arg(isSgAsmFunctionDeclaration(funcsFileA[row])->get_name().c_str())
+    .arg(row);
+  //    .arg(elem.size);
+  console->append(res);  
+  //  std::cout << "Looking at function " << elem.function_name_B << "   row : " << row << "   size : " << elem.size << std::endl;
+  int rowC=0;
+  int posC=0;
+  for(size_t i=0; i < itemsFileA.size(); i++ )    {
+    SgAsmNode* stmts = isSgAsmNode(itemsFileA[i]->statement);
+    //    ROSE_ASSERT(stmts);
+    int length=1;    
+    bool addRow=false;
+    //posRowA[posC]=-1;
+    if (isSgAsmx86Instruction(stmts)) {
+      codeTableWidget->addRows(1);
+      length = isSgAsmInstruction(stmts)->get_raw_bytes().size();
+      //      if (itemsFileA[i]->plus)
+      //	itemsFileA[i]->bg=QColor(135,206,255);
 
-  int addr=0;
-  for (size_t i = 0; i < funcs.size(); ++i) {
-    if( funcs[i]->get_name() == (elem.function_name_A ))      {
-      addr=funcs[i]->get_address();
-      //cerr << " FOUND FUNCTION " << elem.function_name_A << " at address : " << RoseBin_support::HexToString(addr) << endl;
-    }
-  }
-  size_t pos=0;
-  for (size_t i = 1; i < stmts.size(); ++i) {
-    if (stmts[i]->get_address()==addr) {
-      pos=i;
-      //      cerr << " FOUND STMT at address : " << RoseBin_support::HexToString(addr) << "  at pos : " << pos << endl;
-      break;
-    }
-  }
+      itemsFileA[i]->bg=QColor(255,255,255);
+      QColor back = itemsFileA[i]->bg;
+      itemsFileA[i]->fg=QColor(0,0,0);
+      QColor front = itemsFileA[i]->fg;
 
-  std::cout << "Looking at function " << elem.function_name_B << "   pos : " << pos << "   size : " << elem.size << std::endl;
-  std::string allInsnsUnparsed;
-  for(size_t i=0; i < stmts.size(); i++ )    {
-    bool addRow=false;
-    if (isSgAsmx86Instruction(stmts[i])) {
-      codeTableWidget->addRows(1);
-      codeTableWidget->setTextColor(QColor(255,0,0),0,i);
-      codeTableWidget->setTextColor(QColor(0,0,255),1,i);
-      codeTableWidget->setTextColor(QColor(0,155,0),2,i);
+      for (int j=1;j<maxrows;++j) {
+	codeTableWidget->setBgColor(back,j,i);
+      }
+      codeTableWidget->setTextColor(front,0,i);
+      codeTableWidget->setTextColor(QColor(255,0,0),1,i);
+      codeTableWidget->setTextColor(QColor(0,0,255),2,i);
       codeTableWidget->setTextColor(QColor(0,155,0),3,i);
-      codeTableWidget->setText(boost::lexical_cast<std::string>(RoseBin_support::HexToString((isSgAsmx86Instruction(stmts[i]))->get_address()) ), 0, i);
-      codeTableWidget->setText(boost::lexical_cast<std::string>((isSgAsmx86Instruction(stmts[i]))->get_mnemonic() ), 1, i);
-      SgAsmOperandList * ops = isSgAsmx86Instruction(stmts[i])->get_operandList();
+      codeTableWidget->setTextColor(QColor(0,155,0),4,i);
+      codeTableWidget->setText(boost::lexical_cast<std::string>(itemsFileA[i]->row), 0, i);	
+      codeTableWidget->setText(boost::lexical_cast<std::string>(RoseBin_support::HexToString((isSgAsmx86Instruction(stmts))->get_address()) ), 1, i);
+      codeTableWidget->setText(boost::lexical_cast<std::string>((isSgAsmx86Instruction(stmts))->get_mnemonic() ), 2, i);
+      SgAsmOperandList * ops = isSgAsmx86Instruction(stmts)->get_operandList();
       SgAsmExpressionPtrList& opsList = ops->get_operands();
       SgAsmExpressionPtrList::iterator it = opsList.begin();
       string opsName="";
       for (;it!=opsList.end();++it) {
-	opsName += boost::lexical_cast<std::string>(unparseX86Expression(*it, false) );
+	opsName += boost::lexical_cast<std::string>(unparseX86Expression(*it, false) )+", ";
       }
-      codeTableWidget->setText(boost::lexical_cast<std::string>(opsName), 2, i);	
-      codeTableWidget->setText(boost::lexical_cast<std::string>((isSgAsmx86Instruction(stmts[i]))->get_comment() ), 3, i);
+      codeTableWidget->setText(boost::lexical_cast<std::string>(opsName), 3, i);	
+      codeTableWidget->setText(boost::lexical_cast<std::string>(itemsFileA[i]->comment ), 4, i);
+      codeTableWidget->setText(boost::lexical_cast<std::string>(itemsFileA[i]->pos), 5, i);	
+      codeTableWidget->setText(boost::lexical_cast<std::string>(itemsFileA[i]->length), 6, i);	
       addRow=true;
-    } else if (isSgAsmBlock(stmts[i])  && !(isSgAsmInterpretation(isSgAsmBlock(stmts[i])->get_parent()))) {
-    //cerr << " isSgAsmBlock(stmts[i])->get_parent() " << isSgAsmBlock(stmts[i])->get_parent()->class_name() << endl;
+    } else if (isSgAsmBlock(stmts)  && !(isSgAsmInterpretation(isSgAsmBlock(stmts)->get_parent()))) {
+      //cerr << " isSgAsmBlock(stmts[i])->get_parent() " << isSgAsmBlock(stmts[i])->get_parent()->class_name() << endl;
       codeTableWidget->addRows(1);
       codeTableWidget->setTextColor(QColor(128,128,128),0,i);
-      codeTableWidget->setTextColor(QColor(255,255,0),1,i);
-      codeTableWidget->setText(boost::lexical_cast<std::string>(RoseBin_support::HexToString((isSgAsmBlock(stmts[i]))->get_address()) ), 0, i);
-      codeTableWidget->setText(boost::lexical_cast<std::string>("***"), 1, i);
+      codeTableWidget->setTextColor(QColor(128,128,128),1,i);
+      codeTableWidget->setTextColor(QColor(255,255,0),2,i);
+      codeTableWidget->setText(boost::lexical_cast<std::string>(itemsFileA[i]->row), 0, i);	
+      codeTableWidget->setText(boost::lexical_cast<std::string>(RoseBin_support::HexToString((isSgAsmBlock(stmts))->get_address()) ), 1, i);
+      codeTableWidget->setText(boost::lexical_cast<std::string>("***"), 2, i);
       addRow=true;
-    } else if (isSgAsmFunctionDeclaration(stmts[i]),i) {
+    }  else if (isSgAsmFunctionDeclaration(stmts)) {
       codeTableWidget->addRows(1);
-      //      codeTableWidget->addRows(1);
-      codeTableWidget->setTextColor(QColor(0,0,0),0,i);
-      codeTableWidget->setTextColor(QColor(0,0,0),1,i);
-      codeTableWidget->setTextColor(QColor(0,0,0),2,i);
-      codeTableWidget->setText(boost::lexical_cast<std::string>(RoseBin_support::HexToString((isSgAsmFunctionDeclaration(stmts[i]))->get_address()) ), 0, i);
-      codeTableWidget->setText(boost::lexical_cast<std::string>("FUNC"), 1, i);
-      codeTableWidget->setText(boost::lexical_cast<std::string>((isSgAsmFunctionDeclaration(stmts[i]))->get_name() ), 2, i);
+      itemsFileA[i]->bg=QColor(0,0,0);
+      QColor back = itemsFileA[i]->bg;
+      itemsFileA[i]->fg=QColor(255,255,255);
+      QColor front = itemsFileA[i]->fg;
+      for (int j=1;j<maxrows;++j) {
+	codeTableWidget->setBgColor(back,j,i);
+	codeTableWidget->setTextColor(front,j,i);
+      }
+      codeTableWidget->setText(boost::lexical_cast<std::string>(itemsFileA[i]->row), 0, i);	
+      codeTableWidget->setText(boost::lexical_cast<std::string>(RoseBin_support::HexToString((isSgAsmFunctionDeclaration(stmts))->get_address()) ), 1, i);
+      codeTableWidget->setText(boost::lexical_cast<std::string>("FUNC"), 2, i);
+      codeTableWidget->setText(boost::lexical_cast<std::string>((isSgAsmFunctionDeclaration(stmts))->get_name() ), 3, i);
+      codeTableWidget->setText(boost::lexical_cast<std::string>(itemsFileA[i]->pos), 5, i);	
+      codeTableWidget->setText(boost::lexical_cast<std::string>(itemsFileA[i]->length), 6, i);	
       addRow=true;
+    } else if (isSgAsmElfSection(stmts)) {
+      codeTableWidget->addRows(1);
+      itemsFileA[i]->bg=QColor(0,100,0);
+      QColor back = itemsFileA[i]->bg;
+      itemsFileA[i]->fg=QColor(255,255,255);
+      QColor front = itemsFileA[i]->fg;
+      for (int j=1;j<maxrows;++j) {
+	codeTableWidget->setBgColor(back,j,i);
+	codeTableWidget->setTextColor(front,j,i);
+      }
+      codeTableWidget->setText(boost::lexical_cast<std::string>(itemsFileA[i]->row), 0, i);	
+      codeTableWidget->setText(boost::lexical_cast<std::string>(RoseBin_support::HexToString(itemsFileA[i]->addr) ), 1, i);
+      codeTableWidget->setText(boost::lexical_cast<std::string>(isSgAsmElfSection(itemsFileA[i]->statement)->get_name()->get_string()), 2, i);
+      codeTableWidget->setText(boost::lexical_cast<std::string>((isSgAsmNode(stmts))->class_name() ), 3, i);
+      codeTableWidget->setText(boost::lexical_cast<std::string>(itemsFileA[i]->comment ), 4, i);
+      codeTableWidget->setText(boost::lexical_cast<std::string>(itemsFileA[i]->pos), 5, i);	
+      codeTableWidget->setText(boost::lexical_cast<std::string>(itemsFileA[i]->length), 6, i);	
+      addRow=true;
+
+
     } else {
       codeTableWidget->addRows(1);
-      cerr << " FOUND UNEXPECTED NODE " << stmts[i]->class_name() << endl;
+      itemsFileA[i]->bg=QColor(128,128,128);
+      QColor back = itemsFileA[i]->bg;
+      for (int j=1;j<maxrows;++j) {
+	codeTableWidget->setBgColor(back,j,i);
+      }
+      if (itemsFileA[i]->row) {
+	codeTableWidget->setText(boost::lexical_cast<std::string>(itemsFileA[i]->row), 0, i);	
+	codeTableWidget->setText(boost::lexical_cast<std::string>(itemsFileA[i]->pos), 5, i);	
+	codeTableWidget->setText(boost::lexical_cast<std::string>(itemsFileA[i]->length), 6, i);	
+      }
       addRow=true;
     }
     if (addRow) {
+      cout << " adding row ... " << rowC << " / " << itemsFileA.size() << endl;
       codeTableWidget->setHAlignment(true, false, 0); // left horizontal alignment
       codeTableWidget->setHAlignment(true, false, 1); // left horizontal alignment
       codeTableWidget->setHAlignment(true, false, 2); // left horizontal alignment
       codeTableWidget->setHAlignment(true, false, 3); // left horizontal alignment
+      codeTableWidget->setHAlignment(true, false, 4); // left horizontal alignment
+      codeTableWidget->setHAlignment(true, false, 5); // left horizontal alignment
+      codeTableWidget->setHAlignment(true, false, 6); // left horizontal alignment
       
       codeTableWidget->setVDim(i,18);
-      codeTableWidget->setHDim(0,80);
-      codeTableWidget->setHDim(1,50);
-      codeTableWidget->setHDim(2,170);
-      codeTableWidget->setHDim(3,130);
-
+      codeTableWidget->setHDim(0,30);
+      codeTableWidget->setHDim(1,65);
+      codeTableWidget->setHDim(2,55);
+      codeTableWidget->setHDim(3,180);
+      codeTableWidget->setHDim(4,90);
+      codeTableWidget->setHDim(5,30);
+      codeTableWidget->setHDim(6,30);
+      
+      //posRowA[posC]=rowC;
+      //      cerr << "added at pos:" << posC << "  rowC:" << rowC<<endl;
+      rowC++;
+      posC+=length;
     }
   }
 
-  selectView(0);
-     
-  for(size_t i=0; i < stmts.size(); i++ ) 
-    unhighlightInstructionRow(i);  
-  for(size_t i=pos; i < (pos+elem.size); i++ ) 
-    highlightInstructionRow(i);  
+  codeTableWidget->setShowGrid(false);
+  codeTableWidget->setCurrentCell(row,0);
 
+  QROSE::link(codeTableWidget, SIGNAL(activated(int, int, int, int)), &codeTableWidgetCellActivatedA, this);
 
-  codeTableWidget->setShowGrid(false);
-  codeTableWidget->setCurrentCell(pos+elem.size,0);
-  QROSE::link(codeTableWidget, SIGNAL(activated(int, int, int, int)), 
-	      &codeTableWidgetCellActivated, this);
+}
 
+void BinQGUI::showFileB(int row) {
+  QROSE::unlink(codeTableWidget2, SIGNAL(activated(int, int, int, int)));
+
+  while(codeTableWidget2->rowCount()) 
+    codeTableWidget2->removeRow(0);
+
+  ROSE_ASSERT(fileA != NULL);
+  ROSE_ASSERT(fileB != NULL);
+  std::string funcname ="";
+  if (isSgAsmFunctionDeclaration(funcsFileB[row])) {
+    funcname=isSgAsmFunctionDeclaration(funcsFileB[row])->get_name();
+  }
+  QString res = QString("FILE B : Looking at function  %1  row: %2  size ")
+    .arg(funcname.c_str())
+    .arg(row);
+  //    .arg(elem.size);
+  console->append(res);  
+  //  std::cout << "Looking at function " << elem.function_name_B << "   row : " << row << "   size : " << elem.size << std::endl;
+  int rowC=0;
+  int posC=0;
+  for(size_t i=0; i < itemsFileB.size(); i++ )    {
+    SgNode* stmts = itemsFileB[i]->statement;
+    int length=1;    
+    bool addRow=false;
+    //posRowB[posC]=-1;
+    if (isSgAsmx86Instruction(stmts)) {
+      codeTableWidget2->addRows(1);
+      length = isSgAsmInstruction(stmts)->get_raw_bytes().size();
+
+      itemsFileB[i]->bg=QColor(255,255,255);
+      QColor back = itemsFileB[i]->bg;
+      itemsFileB[i]->fg=QColor(0,0,0);
+      QColor front = itemsFileB[i]->fg;
+      for (int j=1;j<maxrows;++j) {
+	codeTableWidget2->setBgColor(back,j,i);
+      }
+      codeTableWidget2->setTextColor(front,0,i);
+      codeTableWidget2->setTextColor(QColor(255,0,0),1,i);
+      codeTableWidget2->setTextColor(QColor(0,0,255),2,i);
+      codeTableWidget2->setTextColor(QColor(0,155,0),3,i);
+      codeTableWidget2->setTextColor(QColor(0,155,0),4,i);
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->row), 0, i);	
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(RoseBin_support::HexToString((isSgAsmx86Instruction(stmts))->get_address()) ), 1, i);
+      codeTableWidget2->setText(boost::lexical_cast<std::string>((isSgAsmx86Instruction(stmts))->get_mnemonic() ), 2, i);
+      SgAsmOperandList * ops = isSgAsmx86Instruction(stmts)->get_operandList();
+      SgAsmExpressionPtrList& opsList = ops->get_operands();
+      SgAsmExpressionPtrList::iterator it = opsList.begin();
+      string opsName="";
+      for (;it!=opsList.end();++it) {
+	opsName += boost::lexical_cast<std::string>(unparseX86Expression(*it, false) )+", ";
+      }
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(opsName), 3, i);	
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->comment ), 4, i);
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->pos), 5, i);	
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->length), 6, i);	
+      addRow=true;
+    } else if (isSgAsmBlock(stmts)  && !(isSgAsmInterpretation(isSgAsmBlock(stmts)->get_parent()))) {
+      //cerr << " isSgAsmBlock(stmts[i])->get_parent() " << isSgAsmBlock(stmts[i])->get_parent()->class_name() << endl;
+      codeTableWidget2->addRows(1);
+      codeTableWidget2->setTextColor(QColor(128,128,128),0,i);
+      codeTableWidget2->setTextColor(QColor(128,128,128),1,i);
+      codeTableWidget2->setTextColor(QColor(255,255,0),2,i);
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->row), 0, i);	
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(RoseBin_support::HexToString((isSgAsmBlock(stmts))->get_address()) ), 1, i);
+      codeTableWidget2->setText(boost::lexical_cast<std::string>("***"), 2, i);
+      addRow=true;
+    } else if (isSgAsmFunctionDeclaration(stmts)) {
+      codeTableWidget2->addRows(1);
+      itemsFileB[i]->bg=QColor(0,0,0);
+      QColor back = itemsFileB[i]->bg;
+      itemsFileB[i]->fg=QColor(255,255,255);
+      QColor front = itemsFileB[i]->fg;
+      for (int j=1;j<maxrows;++j) {
+	codeTableWidget2->setBgColor(back,j,i);
+	codeTableWidget2->setTextColor(front,j,i);
+      }
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->row), 0, i);	
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(RoseBin_support::HexToString((isSgAsmFunctionDeclaration(stmts))->get_address()) ), 1, i);
+      codeTableWidget2->setText(boost::lexical_cast<std::string>("FUNC"), 2, i);
+      codeTableWidget2->setText(boost::lexical_cast<std::string>((isSgAsmFunctionDeclaration(stmts))->get_name() ), 3, i);
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->pos), 5, i);	
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->length), 6, i);	
+      addRow=true;
+    } 
+    else if (isSgAsmElfSection(stmts)) {
+      codeTableWidget2->addRows(1);
+      itemsFileB[i]->bg=QColor(0,100,0);
+      QColor back = itemsFileB[i]->bg;
+      itemsFileB[i]->fg=QColor(255,255,255);
+      QColor front = itemsFileB[i]->fg;
+      for (int j=1;j<maxrows;++j) {
+	codeTableWidget2->setBgColor(back,j,i);
+	codeTableWidget2->setTextColor(front,j,i);
+      }
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->row), 0, i);	
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(RoseBin_support::HexToString(itemsFileB[i]->addr) ), 1, i);
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(isSgAsmElfSection(itemsFileB[i]->statement)->get_name()->get_string()), 2, i);
+      codeTableWidget2->setText(boost::lexical_cast<std::string>((isSgAsmNode(stmts))->class_name() ), 3, i);
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->comment ), 4, i);
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->pos), 5, i);	
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->length), 6, i);	
+      addRow=true;
+
+
+    }
+
+    else if (isSgFunctionDeclaration(stmts)) {
+      SgFunctionDeclaration* func = isSgFunctionDeclaration(stmts);
+      //cerr << func->class_name() << "  maxrows: " << maxrows << endl;
+      codeTableWidget2->addRows(1);
+      itemsFileB[i]->bg=QColor(0,0,0);
+      QColor back = itemsFileB[i]->bg;
+      itemsFileB[i]->fg=QColor(255,255,255);
+      QColor front = itemsFileB[i]->fg;
+      for (int j=1;j<maxrows;++j) {
+	codeTableWidget2->setBgColor(back,j,i);
+	codeTableWidget2->setTextColor(front,j,i);
+      }
+      //      if (isSgFunctionDefinition(func->get_definition()))
+      //	cerr << row << " " << func->unparseToString() << endl;
+
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->row), 0, i);	
+      codeTableWidget2->setText(boost::lexical_cast<std::string>("FUNC"), 1, i);
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(func->get_name().str() ), 2, i);
+      std::string comment = func->get_file_info()->isCompilerGenerated() ? "compiler gen": " ";
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(comment ), 3, i);
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->pos), 4, i);	
+      addRow=true;
+
+    } else if (isSgLocatedNode(stmts)) {
+      SgLocatedNode* st = isSgLocatedNode(stmts);
+      //cerr << st->class_name() << "  maxrows: " << maxrows << endl;
+      codeTableWidget2->addRows(1);
+
+      itemsFileB[i]->bg=QColor(255,255,255);
+      QColor back = itemsFileB[i]->bg;
+      itemsFileB[i]->fg=QColor(0,0,0);
+      QColor front = itemsFileB[i]->fg;
+      for (int j=1;j<maxrows;++j) {
+	codeTableWidget2->setBgColor(back,j,i);
+      }
+      codeTableWidget2->setTextColor(front,0,i);
+      codeTableWidget2->setTextColor(QColor(255,0,0),1,i);
+      codeTableWidget2->setTextColor(QColor(0,0,255),2,i);
+      codeTableWidget2->setTextColor(QColor(0,155,0),3,i);
+      codeTableWidget2->setTextColor(QColor(0,155,0),4,i);
+
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->row), 0, i);	
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->lineNr ), 1, i);
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(st->unparseToString()), 2, i);
+      //int size = st->get_traversalSuccessorContainer().size();
+      //cerr << size << " : " << st->unparseToString() << endl;
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->comment ), 3, i);
+      codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->pos), 4, i);	
+
+      addRow=true;
+    } 
+    else {
+      codeTableWidget2->addRows(1);
+      itemsFileB[i]->bg=QColor(128,128,128);
+      QColor back = itemsFileB[i]->bg;
+      for (int j=1;j<maxrows;++j) {
+	codeTableWidget2->setBgColor(back,j,i);
+      }
+
+      if (itemsFileB[i]->row) {
+	codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->row), 0, i);	
+	if (!sourceFile) {
+	  codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->pos), 5, i);	
+	  codeTableWidget2->setText(boost::lexical_cast<std::string>(itemsFileB[i]->length), 6, i);	
+	}
+      }
+      addRow=true;
+    }
+
+    if (addRow) {
+      codeTableWidget2->setHAlignment(true, false, 0); // left horizontal alignment
+      codeTableWidget2->setHAlignment(true, false, 1); // left horizontal alignment
+      codeTableWidget2->setHAlignment(true, false, 2); // left horizontal alignment
+      codeTableWidget2->setHAlignment(true, false, 3); // left horizontal alignment
+      codeTableWidget2->setHAlignment(true, false, 4); // left horizontal alignment
+      
+      codeTableWidget2->setVDim(i,18);
+      if (sourceFile) {
+	codeTableWidget2->setHDim(0,30);
+	codeTableWidget2->setHDim(1,50);
+	codeTableWidget2->setHDim(2,300);
+	codeTableWidget2->setHDim(3,110);
+	codeTableWidget2->setHDim(4,40);
+      } else {
+	codeTableWidget2->setHAlignment(true, false, 5); // left horizontal alignment
+	codeTableWidget2->setHAlignment(true, false, 6); // left horizontal alignment
+	codeTableWidget2->setHDim(0,30);
+	codeTableWidget2->setHDim(1,65);
+	codeTableWidget2->setHDim(2,55);
+	codeTableWidget2->setHDim(3,180);
+	codeTableWidget2->setHDim(4,90);
+	codeTableWidget2->setHDim(5,30);
+	codeTableWidget2->setHDim(6,30);
+      }
+      rowC++;
+      posC+=length;
+    }
+  }
+  codeTableWidget2->setShowGrid(false);
+  codeTableWidget2->setCurrentCell(row,0);
+
+  QROSE::link(codeTableWidget2, SIGNAL(activated(int, int, int, int)), &codeTableWidgetCellActivatedB, this);
 }
 
 

Modified: branches/testonly/projects/BinQ/BinQGui.h
===================================================================
--- branches/testonly/projects/BinQ/BinQGui.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/BinQ/BinQGui.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -10,111 +10,92 @@
 #include <QLabel>
 #include <QLineEdit>
 #include <QCheckBox>
+#include <QRProgress.h>
 
-#include <boost/smart_ptr.hpp>
-#include <boost/lexical_cast.hpp>
-#include <stdint.h>
-#include "BinQSupport.h"
+#include <QList>
+#include <QListWidget>
+#include <QListWidgetItem>
 
-template <typename T>
-class scoped_array_with_size {
-  boost::scoped_array<T> sa;
-  size_t theSize;
+#include <QDesktopWidget>
+#include <QApplication>
 
-  public:
-  scoped_array_with_size(): sa(), theSize(0) {}
-  scoped_array_with_size(size_t s): sa(new T[s]), theSize(s) {}
+#include "Item.h"
+#include "BinAnalyses.h"
 
-  void allocate(size_t s) {
-    sa.reset(new T[s]);
-    theSize = s;
-  }
-  size_t size() const {return theSize;}
-  T* get() const {return sa.get();}
+class Slide;
+class BinQSupport;
 
-  T& operator[](size_t i) {return sa[i];}
-  const T& operator[](size_t i) const {return sa[i];}
 
-  private:
-  scoped_array_with_size(const scoped_array_with_size<T>&); // Not copyable
-};
-
-
-
-struct Element {
-  uint64_t size;
-  uint64_t function_A ;
-  uint64_t function_B ;
-  uint64_t begin_index_within_function_A ;
-  uint64_t end_index_within_function_A   ;
-  uint64_t begin_index_within_function_B ;
-  uint64_t end_index_within_function_B   ;
-  std::string file_A;
-  std::string function_name_A;
-  std::string file_B;
-  std::string function_name_B;
-
-};
-
-
-class BinQGUI
+class BinQGUI //: public QWidget
 {
   public:
-    BinQGUI(std::string, std::string );
+  BinQGUI(std::string, std::string, bool test );
     ~BinQGUI();
     void run( ) ;
     void open();
     void reset();
-    void highlightFunctionRow(int);
-    void unhighlightFunctionRow(int);
-    void highlightInstructionRow(int);
-    void unhighlightInstructionRow(int);
+    void highlightFunctionRow(int,bool fileA);
+    void unhighlightFunctionRow(int,bool fileA);
+    void highlightInstructionRow(int,bool fileA);
+    void unhighlightInstructionRow(int,bool fileA);
 
     void showFileA(int row);
-    //SgNode* disassembleFile(std::string tsv_directory);
-    //std::string normalizeInstructionsToHTML(std::vector<SgAsmx86Instruction*>::iterator beg, 
-    //std::vector<SgAsmx86Instruction*>::iterator end);
+    void showFileB(int row);
 
-    //std::pair<std::string,std::string> getAddressFromVectorsTable(uint64_t function_id, uint64_t index);
+    std::vector<Item*> itemsFileA;
+    std::vector<Item*> itemsFileB;
+    std::map<int,Item*> byteItemFileA;
+    std::map<int,Item*> byteItemFileB;
+    std::map<int,Item*> rowItemFileA;
+    std::map<int,Item*> rowItemFileB;
+    QTextEdit *console;
+    QTextEdit *analysisResult;
+    QTextEdit *fileInfo;
+    QTextEdit *sectionInfo;
+    QListWidget *listWidget;
+    QTextEdit *analysisInfo;
+    SgNode* fileA;
+    SgNode* fileB;
+    Slide *slide;
+    int maxrows;
 
-    void selectView(int selection);
-
-  protected:
     qrs::QRWindow *window;
     qrs::QRTable *tableWidget;
     qrs::QRTable *codeTableWidget;
-    //QTextEdit *codeWidget;
-    QTextEdit *codeWidget2;
+    QTabWidget *analysisTab;
+
+    qrs::QRTable *tableWidget2;
+    qrs::QRTable *codeTableWidget2;
+
+    std::string fileNameA,fileNameB;
+    
+    void updateByteItemList();
+    void insertSectionInformation(SgAsmElfSection* sec,std::string filename);
+    void insertFileInformation();
+    std::vector<BinAnalyses*> analyses;
+
+  protected:
     QComboBox *comboBox;
-    QComboBox *wholeFunction;
+    qrs::QRProgress *wholeFunction;
+    
 
     QTextBrowser *codeBrowser;
     QLineEdit *smallerThanRestriction;
     QLineEdit *largerThanRestriction;
-    //    QComboBox *checkBoxLockBars;
+
   private:
 
-    std::vector<SgAsmFunctionDeclaration*> funcs;
-    //    std::vector<SgAsmx86Instruction*> insns;
-    std::vector<SgAsmStatement*> stmts;
 
+    std::vector<SgNode*> funcsFileA;
+    std::vector<SgNode*> funcsFileB;
     BinQSupport* binqsupport;
     
-    std::string fileNameA,fileNameB;
-    SgNode* fileA;
-    SgNode* fileB;
 
-    double similarity;
-    int stride;
-    int windowSize;
-    int activeFunctionRow;
-    int activeInstructionRow;
-
-
-    scoped_array_with_size<Element > vectorOfClones;
-    std::pair<std::string,std::string> normalizedView;
-    std::pair<std::string,std::string> unparsedView;
-    std::pair<std::string,std::string> allInsnsUnparsedView;
+    int screenWidth;
+    int screenHeight;
+    void init();
+    void createGUI();
+    bool sourceFile;
    
 }; //class BinQGUI
 

Modified: branches/testonly/projects/BinQ/BinQMain.C
===================================================================
--- branches/testonly/projects/BinQ/BinQMain.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/BinQ/BinQMain.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -2,6 +2,7 @@
  *
  */
 
+#include "rose.h"
 #include <vector>
 #include <qrose.h>
 #include "BinQGui.h"
@@ -16,10 +17,19 @@
 
 int main( int argc, char **argv )
 {
+#if 0
+  RoseBin_Def::RoseAssemblyLanguage = RoseBin_Def::x86;
+  fprintf(stderr, "Starting binCompass frontend...\n");
+  SgProject* project = frontend(argc,argv);
+  ROSE_ASSERT (project != NULL);
+  fprintf(stderr, "End binCompass frontend...\n\n\n");
+#endif
+
+
   QROSE::init(argc,argv);
 
   std::string fileA,fileB;
-
+    bool test=false;
   try {
     options_description desc("Allowed options");
     desc.add_options()
@@ -28,8 +38,9 @@
        "file A to be diffed")
       ("fileB,b", value< string >()->composing(), 
        "file B to be diffed")
+      ("test", "for testing")
       ;
-
+//, value< bool >()->composing(), 
     variables_map vm;
     store(command_line_parser(argc, argv).options(desc)
         .run(), vm);
@@ -39,30 +50,34 @@
       cout << desc;            
       exit(0);
     }
+    if (vm.count("test")) {
+      test=true;
+    }
 
     if (vm.count("fileA")!=1 ||vm.count("fileB")!=1 ) {
-      std::cerr << "Missing options. Call as: astEquivalence --fileA <file A> --fileB <file B>" 
+      std::cerr << "Missing options. Call as: BinQ --fileA <file A> --fileB <file B>" 
         << std::endl;
       exit(1);
 
     }
 
+
     fileA = vm["fileA"].as<string >();
     fileB = vm["fileB"].as<string >();
-    cout << "File A: " << fileA << " File B: " << fileB << std::endl;
+    //    test = vm["test"].as<bool >();
+    cout << "File A: " << fileA << " File B: " << fileB << "  test? " << test << std::endl;
 
 
   }
-  catch(exception& e) {
+  catch(std::exception& e) {
     cout << e.what() << "\n";
   }
 
 
-
-  
-  BinQGUI binGui(fileA,fileB);
-
-  binGui.run();
-  
+  if (test==false) {
+    BinQGUI binGui(fileA,fileB, test);
+    binGui.run();
+  } else
+    exit(0);
   return QROSE::exec();
 }

Modified: branches/testonly/projects/BinQ/BinQSupport.C
===================================================================
--- branches/testonly/projects/BinQ/BinQSupport.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/BinQ/BinQSupport.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -95,60 +95,63 @@
 }
 // ----------------------------------------------------------------------------------------------
 
+std::string BinQSupport::ToUpper(std::string myString)
+{
+  const int length = myString.length();
+  for(int i=0; i!=length ; ++i)
+    {
+      myString[i] = std::toupper(myString[i]);
+    }
+  return myString;
+}
 
 
+SgNode* BinQSupport::disassembleFile(std::string tsv_directory, std::string& sourceFile){
+  SgNode* globalBlock=NULL;
+  int found = tsv_directory.rfind(".");
+  string ending="";
 
-SgNode* BinQSupport::disassembleFile(std::string tsv_directory){
-  SgNode* globalBlock;
-  std::cout << "\nDisassembling: " << tsv_directory << std::endl;
-  if(exists(tsv_directory) == false)  {
-    char buf[4096] = "\0";
-    int i = 0; 
-    while( exists ( relativePathPrefix +"/"+ tsv_directory) == false )     {
-      if(i>10){
-        std::string error_message = "user error: Relative Path to  ";
-        error_message+=tsv_directory;
-        error_message+=" not selected in " ;
-        error_message+= boost::lexical_cast<std::string>(i);
-        error_message+=" attempts.";
-        eAssert(0,  (error_message.c_str()) );
-      }
-
-      QFileDialog dialog;
-      dialog.setFileMode(QFileDialog::DirectoryOnly);
-      //relativePathPrefix = dialog.getOpenFileName( 0, "Relative Path To Binaries", getcwd(buf, 4096), "ASCII (*)").toStdString();
-      relativePathPrefix = dialog.getExistingDirectory(0,  "get existing directory", getcwd(buf, 4096)).toStdString();
-      i++;
-    }
-    tsv_directory = relativePathPrefix +"/"+tsv_directory;
-  };
+  if (found!=string::npos) {
+    ending =tsv_directory.substr(found+1,tsv_directory.length());
+  }
+  std::cout << "\nDisassembling: " << tsv_directory << " Ending : " << ending << std::endl;
   
-  if(is_directory( tsv_directory  ) == true )
-    {
-      RoseBin_Def::RoseAssemblyLanguage=RoseBin_Def::x86;
-      RoseBin_Arch::arch=RoseBin_Arch::bit32;
-      RoseBin_OS::os_sys=RoseBin_OS::linux_op;
-      RoseBin_OS_VER::os_ver=RoseBin_OS_VER::linux_26;
-      RoseFile* roseBin = new RoseFile( (char*)tsv_directory.c_str() );
-      cerr << " ASSEMBLY LANGUAGE :: " << RoseBin_Def::RoseAssemblyLanguage << endl;
-      // query the DB to retrieve all data
-      globalBlock = roseBin->retrieve_DB();
-      // traverse the AST and test it
-      roseBin->test();
-    }else{
+  if(is_directory( tsv_directory  ) == true ){
+    std::cout << "\nsql: " << tsv_directory << std::endl;
+    RoseBin_Def::RoseAssemblyLanguage=RoseBin_Def::x86;
+    RoseBin_Arch::arch=RoseBin_Arch::bit32;
+    RoseBin_OS::os_sys=RoseBin_OS::linux_op;
+    RoseBin_OS_VER::os_ver=RoseBin_OS_VER::linux_26;
+    RoseFile* roseBin = new RoseFile( (char*)tsv_directory.c_str() );
+    cerr << " ASSEMBLY LANGUAGE :: " << RoseBin_Def::RoseAssemblyLanguage << endl;
+    // query the DB to retrieve all data
+    globalBlock = roseBin->retrieve_DB();
+    // traverse the AST and test it
+    roseBin->test();
+    sourceFile="false";
+  } else if (ToUpper(ending)=="C" || ToUpper(ending)=="CPP" || ToUpper(ending)=="CXX") {
+    cerr << "Found C code ... " << endl;
     vector<char*> args;
     args.push_back(strdup(""));
     args.push_back(strdup(tsv_directory.c_str()));
     args.push_back(0);
-
+    globalBlock =  frontend(args.size()-1,&args[0]);
+    sourceFile="true";
+  }  else{
+    vector<char*> args;
+    args.push_back(strdup(""));
+    args.push_back(strdup(tsv_directory.c_str()));
+    args.push_back(0);
+    
     ostringstream outStr; 
     for(vector<char*>::iterator iItr = args.begin(); iItr != args.end();
-        ++iItr )    {
+	++iItr )    {
       outStr << *iItr << " ";
     }     
     ;
     std::cout << "Calling " << outStr.str() << std::endl;
     globalBlock =  frontend(args.size()-1,&args[0]);
+    sourceFile="false";
   }
   return globalBlock;
 };
@@ -158,7 +161,7 @@
 
 std::string 
 BinQSupport::normalizeInstructionsToHTML(std::vector<SgAsmx86Instruction*>::iterator beg, 
-					    std::vector<SgAsmx86Instruction*>::iterator end) {
+					 std::vector<SgAsmx86Instruction*>::iterator end) {
   string normalizedUnparsedInstructions;
   map<SgAsmExpression*, size_t> valueNumbers[3];
   numberOperands( beg,end, valueNumbers);

Modified: branches/testonly/projects/BinQ/BinQSupport.h
===================================================================
--- branches/testonly/projects/BinQ/BinQSupport.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/BinQ/BinQSupport.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -2,13 +2,15 @@
 #define BINQSUPPORT_H
 #include "rose.h"
 
+SgAsmExpressionPtrList& getOperands(SgAsmInstruction* insn);
 
+
 class BinQSupport
 {
   public:
   BinQSupport(){};
     ~BinQSupport();
-    SgNode* disassembleFile(std::string tsv_directory);
+    SgNode* disassembleFile(std::string tsv_directory, std::string& sourceFile);
     std::string normalizeInstructionsToHTML(std::vector<SgAsmx86Instruction*>::iterator beg, 
 					    std::vector<SgAsmx86Instruction*>::iterator end);
 
@@ -17,7 +19,7 @@
 
   private:
     std::string relativePathPrefix;
-   
+    std::string ToUpper(std::string myString);   
 }; //class BinQGUI
 
 #endif

Copied: branches/testonly/projects/BinQ/BufferOverflow.C (from rev 128, trunk/projects/BinQ/BufferOverflow.C)
===================================================================
--- branches/testonly/projects/BinQ/BufferOverflow.C	                        (rev 0)
+++ branches/testonly/projects/BinQ/BufferOverflow.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,289 @@
+#include "BinQGui.h"
+
+#include <iostream>
+
+
+#include "BinQSupport.h"
+#include "slide.h"
+
+#include <qtabwidget.h>
+#include "BufferOverflow.h"
+
+
+using namespace qrs;
+using namespace std;
+using namespace __gnu_cxx;
+using namespace  RoseBin_DataTypes;
+
+std::string BufferOverflow::name() {
+  return "Buffer Overflow Analysis";
+}
+
+std::string BufferOverflow::getDescription() {
+  return "Runs Buffer Overflow analysis on binary.";
+}
+
+
+bool 
+BufferOverflow::run(string& name, SgDirectedGraphNode* node,
+			      SgDirectedGraphNode* previous){
+  // check known function calls and resolve variables
+  ROSE_ASSERT(node);
+
+  //cerr << " bufferoverflow->run " << node->get_name() << endl;
+  SgAsmx86Instruction* asmNode = isSgAsmx86Instruction(node->get_SgNode());
+  if (asmNode) {
+
+    // ANALYSIS 2 : BUFFER OVERFLOW DETECTION -------------------------------------------
+      if (asmNode->get_kind() == x86_call) {
+	// DEFINITION OF BUFFER OVERFLOW
+	uint64_t malloc_pos = asmNode->get_address();
+	SgAsmOperandList* opList = asmNode->get_operandList();
+	ROSE_ASSERT(opList);
+	SgAsmExpressionPtrList ptrList = opList->get_operands();
+	// get the first (and only) element 
+	if (ptrList.size()!=0) {
+	SgAsmExpression* expr = *(ptrList.begin());
+	string replace = expr->get_replacement();
+	string op = unparseX86Expression(expr);
+
+	// we can detect malloc with the help of ida.
+	if (replace=="_malloc" || replace=="malloc at plt") {
+	  if (RoseBin_support::DEBUG_MODE()) 
+	    cerr << "    " << name << " : found malloc function call " << endl;
+	  
+	  // find the size of the malloc, = backward search within this function
+	  bool foundMov=false;
+	  SgDirectedGraphNode* pre = node;
+	  uint64_t value=0;
+	  while (foundMov!=true && sameParents(node, pre)) {
+	    pre = getPredecessor(pre);
+	    SgAsmx86Instruction* asmPre = isSgAsmx86Instruction(pre->get_SgNode());
+	    if (asmPre->get_kind() == x86_mov || asmPre->get_kind() == x86_push) {
+	      foundMov = true;
+	      if (asmPre->get_kind() == x86_mov) {
+		// make sure we are moving to the top of the stack, i.e. esp
+		bool memRef = false;
+		std::pair<X86RegisterClass, int> code;
+		code = check_isRegister(pre, asmPre, false, memRef);
+		string codeStr = unparseX86Register(code.first, code.second, x86_regpos_qword);
+		if (codeStr=="rsp")
+		  value = getValueOfInstr(asmPre, true);
+		else 
+		  cerr << " Error :: foud a mov before a call that does not point to rsp but ::: " << codeStr << endl;
+		if (RoseBin_support::DEBUG_MODE() && asmPre->get_kind() == x86_mov) 
+		  cerr << "   malloc: found mov size of " << codeStr << " in " << value << " for malloc call : " << unparseInstruction(asmPre) <<endl;
+	      } else if (asmPre->get_kind() == x86_push) {
+		value = getValueOfInstr(asmPre, false);
+		if (RoseBin_support::DEBUG_MODE() && asmPre->get_kind() == x86_push) 
+		  cerr << "   malloc: found push size " << value << " for malloc call : " << unparseInstruction(asmPre) <<endl;
+	      }
+	    }
+	  }
+
+
+	  // result of malloc (variable) is in eax, we need to see what the variable is and store it
+	  // forward search in the same function
+	  foundMov=false;
+	  SgDirectedGraphNode* aft = node;
+	  while (foundMov!=true && sameParents(node, aft)) {
+	    aft = getSuccessor(aft);
+	    SgAsmx86Instruction* asmAft = isSgAsmx86Instruction(aft->get_SgNode());
+	    if (asmAft->get_kind() == x86_mov) {
+	      foundMov = true;
+	      uint64_t address_of_var=0;
+		bool memRef = false;
+		std::pair<X86RegisterClass, int> code;
+		code = check_isRegister(aft, asmAft, true, memRef);
+		if (code.first == x86_regclass_gpr && code.second == x86_gpr_ax) {
+		  if (RoseBin_support::DEBUG_MODE() && asmAft->get_kind() == x86_mov) 
+		    cerr << "    found mov of eax of malloc call : " << unparseInstruction(asmAft) <<endl;
+		  SgAsmMemoryReferenceExpression* memExpr = 
+		    isSgAsmMemoryReferenceExpression(getOperand(asmAft,false));
+		  if (memExpr) {
+		    //SgAsmRegisterReferenceExpression* refLeft = getRegister(memref->get_segment(),false);
+		    
+		    //SgAsmMemoryReferenceExpression* memExpr = 
+		    //  isSgAsmMemoryReferenceExpression(refLeft->get_offset());
+		    //if (memExpr)
+		      address_of_var = getValueInMemoryRefExp( memExpr->get_address());
+		    if (RoseBin_support::DEBUG_MODE()) 
+		    cerr << " The address of the malloc variable is : " << RoseBin_support::HexToString(address_of_var) << endl;
+		    string functionName = "func";
+		    //SgAsmFunctionDeclaration* func = isSgAsmFunctionDeclaration(mov->get_parent());
+		    //if (func)
+		    //  functionName = func->get_name();
+		    functionName = RoseBin_support::HexToString(malloc_pos)+":";
+		    uint64_t pos = asmAft->get_address();
+		    vector<uint64_t> val_v ;
+		    val_v.push_back(address_of_var);
+		    vector<uint64_t> pos_v ;
+		    pos_v.push_back(address_of_var);
+		    //RoseBin_Variable* var = 
+		    createVariable(pos, pos_v, functionName+"_malloc", d_array, "Memory allocation", value, val_v,true); 		  
+		    //string varStr = var->toString();
+		    //aft->append_properties(RoseBin_Def::dfa_variable,varStr);		  
+		  }
+		} else 
+		  cerr << " Error :: foud a mov after a call that is not rax." << endl;
+	    } // mov
+	  } // while
+	}	  
+	}
+      }
+
+    // BUFFER OVERFLOW : Once we have the buffer overflow variable,
+    // we are looking for the mov instruction, that moves the variable into eax
+    // in order to access it.
+    //      if (isSgAsmMov(asmNode) ) {
+    bool isDataTransfer = x86InstructionIsDataTransfer(asmNode);
+    if (isDataTransfer ) {
+      // USAGE OF BUFFER OVERFLOW
+      // Should this be only for mov instructions?
+	if (isDataTransfer) {
+	bool memRef = false;
+	uint64_t address_of_var=0;
+	std::pair<X86RegisterClass, int> code;
+	// check if eax register on the left hand side
+	code = check_isRegister(node, asmNode, false, memRef);
+	if (code.first == x86_regclass_gpr && code.second == x86_gpr_ax) {
+	  // right hand side is Register Reg / MemoryRef
+	  //	  SgAsmRegisterReferenceExpression* refRight = getRegister(mov,true);
+	  //if (refRight) {
+	    SgAsmMemoryReferenceExpression* memExpr = 
+	      isSgAsmMemoryReferenceExpression(getOperand(asmNode,true));
+	    if (memExpr) {
+	      address_of_var = getValueInMemoryRefExp( memExpr->get_address());
+	    if (RoseBin_support::DEBUG_MODE() && isDataTransfer) {
+	      cout << "  malloc:  found mov to eax  " << unparseInstruction(asmNode) ;
+	      cout << "  malloc address ::  : " << RoseBin_support::HexToString(address_of_var) << endl;
+	    }
+	    RoseBin_Variable* var = getVariable(address_of_var);
+	    if (var) {
+	      string varName = var->toString();
+	      RoseBin_DataTypes::DataTypes type = var->getType();
+	      bool array = false;
+	      if (type==d_array)
+		array = true;
+	      if (RoseBin_support::DEBUG_MODE() ) 
+		cerr << "  malloc:  variable found :  " << varName << " array? " << RoseBin_support::resBool(array) 
+	             << "    instr : " << unparseInstruction(asmNode) <<endl;
+	      // now that we have found the usage of an array, we check 
+	      // in a forward analysis, whether we access a value that is greater than
+	      // the length of the array
+	      if (array) {
+		int length = var->getLength();
+		int arrayLength = 0;
+		bool foundMov=false;
+		SgDirectedGraphNode* aft = node;
+		while (foundMov!=true && sameParents(node, aft)) {
+		  aft = getSuccessor(aft);
+		  SgAsmx86Instruction* asmAft = isSgAsmx86Instruction(aft->get_SgNode());
+		  if (asmAft->get_kind() == x86_add) {
+		    bool memRef = false;
+		    std::pair<X86RegisterClass, int> code;
+		    code = check_isRegister(aft, asmAft, false, memRef);
+		    if (code.first == x86_regclass_gpr && code.second == x86_gpr_ax) {
+		      uint64_t val = getValueOfInstr(asmAft, true);
+		      arrayLength += val;
+		    }
+		  }		  
+		  if (asmAft->get_kind() == x86_mov) {
+		    foundMov = true;
+		    bool memRef = false;
+		    std::pair<X86RegisterClass, int> code;
+		    code = check_isRegister(aft, asmAft, true, memRef);
+		    if (code.first == x86_regclass_gpr && code.second == x86_gpr_ax) {
+		      if (RoseBin_support::DEBUG_MODE() && asmAft->get_kind() == x86_mov) {
+			cout << "   malloc - access to eax : " << unparseInstruction(asmAft) 
+			     << "   length array (var) " << length << "  access array point: " << arrayLength  <<endl;
+		      }
+		      if (arrayLength> array) {
+			if (RoseBin_support::DEBUG_MODE() && asmAft->get_kind() == x86_mov) {
+			  cerr << "  WARNING:: MALLOC - Buffer Overflow at : " << unparseInstruction(asmAft) 
+			       <<  "  Length of array is " << length << "  but access at : " << arrayLength << endl;
+			  aft->append_properties(RoseBin_Def::dfa_bufferoverflow,varName);		  
+			}
+		      }
+		    }
+		  } 
+		} // while
+		
+	      }
+	    }
+	  } // refRight
+	}
+	} // mov
+    }
+
+  }
+  return false;
+}
+
+
+void
+BufferOverflow::run() {
+  BinQGUI *instance = QROSE::cbData<BinQGUI *>();
+
+  RoseBin_Graph* graph=NULL;
+  ROSE_ASSERT(isSgProject(instance->fileA));
+  SgBinaryFile* binaryFile = isSgBinaryFile(isSgProject(instance->fileA)->get_fileList()[0]);
+  SgAsmFile* file = binaryFile != NULL ? binaryFile->get_binaryFile() : NULL;
+  ROSE_ASSERT(file);
+
+  VirtualBinCFG::AuxiliaryInformation* info = new VirtualBinCFG::AuxiliaryInformation(file);
+
+  // call graph analysis  *******************************************************
+  instance->analysisTab->setCurrentIndex(1);
+  QString res = QString("Creating dataflow graph ");
+  instance->analysisResult->append(res);  
+  
+  bool dot=true;
+  bool forward=true;
+  bool edges=true;
+  bool mergedEdges=true;
+  bool interprocedural=false;
+  string dfgFileName = "dfg.dot";
+  graph= new RoseBin_DotGraph(info);
+  if (dot==false) {
+    dfgFileName = "dfg.gml";
+    graph= new RoseBin_GMLGraph(info);
+  }
+
+  SgAsmInterpretation* interp = SageInterface::getMainInterpretation(file);
+  RoseBin_DataFlowAnalysis* dfanalysis = 
+    new RoseBin_DataFlowAnalysis(interp->get_global_block(), forward, new RoseObj(), info);
+  ROSE_ASSERT(dfanalysis);
+  dfanalysis->init(interprocedural, edges);
+  dfanalysis->run(graph, dfgFileName, mergedEdges);
+
+  res = QString("nr of nodes visited %1. nr of edges visited %2. ")
+    .arg(dfanalysis->nodesVisited())
+    .arg(dfanalysis->edgesVisited());
+    
+  instance->analysisResult->append(res);  
+
+  res = QString("Running BufferOverflow detection... ");
+  instance->analysisResult->append(res);  
+
+  vector<SgDirectedGraphNode*> rootNodes;
+  dfanalysis->getRootNodes(rootNodes);
+
+  res = QString("Graph has Rootnodes : %1 ")
+    .arg(rootNodes.size());
+  instance->analysisResult->append(res);  
+
+  dfanalysis->init();
+  res = QString("Initializing ... ");
+  instance->analysisResult->append(res);  
+  init(graph);
+  res = QString("Traversing ... ");
+  instance->analysisResult->append(res);  
+  dfanalysis->traverseGraph(rootNodes, this, interprocedural);
+  
+  res = QString("Done. ");
+  instance->analysisResult->append(res);  
+  
+
+  
+}

Copied: branches/testonly/projects/BinQ/BufferOverflow.h (from rev 128, trunk/projects/BinQ/BufferOverflow.h)
===================================================================
--- branches/testonly/projects/BinQ/BufferOverflow.h	                        (rev 0)
+++ branches/testonly/projects/BinQ/BufferOverflow.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,38 @@
+#ifndef BUFFEROVERFLOW_R_H
+#define BUFFEROVERFLOW_R_H
+#include "rose.h"
+
+#include <iostream>
+#include <list>
+#include "BinAnalyses.h"
+#include "RoseBin_DataFlowAbstract.h"
+#include "RoseBin_DefUseAnalysis.h"
+//#include "RoseBin_VariableAnalysis.h"
+
+class BufferOverflow : public BinAnalyses,  RoseBin_DataFlowAbstract {
+ public:
+  BufferOverflow(){};
+  virtual ~BufferOverflow(){};
+  void run();
+  std::string name();
+  std::string getDescription();
+
+  bool run(std::string& name, SgDirectedGraphNode* node,
+	   SgDirectedGraphNode* previous);
+
+
+ private:
+  
+  void init(RoseBin_Graph* vg) {
+    vizzGraph = vg;
+  }
+  bool runEdge(SgDirectedGraphNode* node, SgDirectedGraphNode* next) {
+    return false;
+  }
+
+
+};
+
+
+
+#endif

Copied: branches/testonly/projects/BinQ/Clone.C (from rev 128, trunk/projects/BinQ/Clone.C)
===================================================================
--- branches/testonly/projects/BinQ/Clone.C	                        (rev 0)
+++ branches/testonly/projects/BinQ/Clone.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,128 @@
+#include "BinQGui.h"
+#include "BinQSupport.h"
+#include "LCS.h"
+#include "Clone.h"
+
+using namespace boost;
+using namespace std;
+using namespace qrs;
+using namespace LCS;
+
+
+std::string DiffAlgo::name() {
+  return "BinaryDiff";
+}
+
+
+
+std::string 
+DiffAlgo::getDescription() {
+  return "This Analysis detects the diff between two binary files. It marks the additions and removals between them.";
+}
+
+
+void
+DiffAlgo::run() {
+  BinQGUI *instance = QROSE::cbData<BinQGUI *>();
+    // this part is to find the added and removed code (from Andreas)
+    FindInstructionsVisitor vis;
+   
+    LCS::vector_start_at_one<SgNode*> insnsA;
+    AstQueryNamespace::querySubTree(instance->fileA, std::bind2nd( vis, &insnsA ));
+    LCS::vector_start_at_one<SgNode*> insnsB;
+    AstQueryNamespace::querySubTree(instance->fileB, std::bind2nd( vis, &insnsB ));
+
+    std::vector<pair<int,int> > addInstr,minusInst;
+
+    printDiff(insnsA, insnsB,addInstr,minusInst);
+
+    //    cerr << " found adds on left side : " << addInstr.size() << endl;
+    //cerr << " found subbs on left side : " << minusInst.size() << endl;
+
+
+    QString res = QString("Found adds:  %1.  Found subbs: %2. ")
+      .arg(addInstr.size())
+      .arg(minusInst.size());
+    instance->analysisTab->setCurrentIndex(1);
+    instance->analysisResult->append(res);  
+
+    colorTable(instance, addInstr, minusInst, insnsA, insnsB);
+};
+
+void 
+colorTable(BinQGUI* instance,  const std::vector<pair<int,int> >& addInstr,  const std::vector<pair<int,int> >&  minusInst,
+           vector_start_at_one<SgNode*>& insnsA, vector_start_at_one<SgNode*>& insnsB 
+    )
+{
+
+  const char* results [] = {"PLUS", "MINUS"};
+  std::vector<QColor> colors;
+  colors.push_back( QColor(233,150,122)  );
+  colors.push_back( QColor(135,206,255)  );
+
+  for( int choice = 0; choice < sizeof(results)/sizeof(char*) ; choice++ )
+  {
+
+    std::string currentName(results[choice]);
+    const std::vector< pair<int,int> >& currentResults = ( choice == 0 ? addInstr : minusInst ); 
+    QColor& color = colors[choice];
+
+
+    for (unsigned int k=0;k<currentResults.size();++k) {
+      std::pair<int,int> p = currentResults[k];
+      int a = p.first;
+      int b = p.second;
+      SgAsmInstruction* instA = isSgAsmInstruction(insnsA[a]);
+      SgAsmInstruction* instB = isSgAsmInstruction(insnsB[b]);
+#if 0
+      cerr << i << " Found " << currentName << " in A  (a:" << a <<",b:"<<b<<") : " << endl << 
+                                                                                       "     " << RoseBin_support::HexToString(instA->get_address()) << "  " <<
+                                                                                         instA->get_mnemonic() <<endl <<
+                                                                                         "     " << RoseBin_support::HexToString(instB->get_address()) << "  " <<
+                                                                                         instB->get_mnemonic() <<endl;
+#endif
+
+      int myPosA=0;
+      int myPosB=0;
+      for(size_t i=0; i < instance->itemsFileA.size(); i++ )    {
+        SgAsmStatement* stmts = isSgAsmStatement(instance->itemsFileA[i]->statement);
+        //	ROSE_ASSERT(stmts);
+        SgAsmInstruction* inst = isSgAsmInstruction(stmts);
+        if (inst && inst->get_address()==instA->get_address()) {
+          myPosA=instance->itemsFileA[i]->row;
+          //  instance->itemsFileA[i]->plus=true;
+          instance->itemsFileA[i]->bg=color;
+          for (int j=1;j<instance->maxrows;j++)
+            instance->codeTableWidget->setBgColor(instance->itemsFileA[i]->bg,j,i);
+        }
+      }
+      for(size_t i=0; i < instance->itemsFileB.size(); i++ )    {
+        SgNode* stmts = instance->itemsFileB[i]->statement;
+        SgAsmInstruction* inst = isSgAsmInstruction(stmts);
+        if (inst && inst->get_address()==instB->get_address()) {
+          myPosB=instance->itemsFileB[i]->row;
+          instance->itemsFileA[i]->bg=color;
+          for (int j=1;j<instance->maxrows;j++)
+            instance->codeTableWidget2->setBgColor(instance->itemsFileB[i]->bg,j,i);
+        }
+      }
+
+      std::string resultsString ="%1 Found " + currentName + " in A  (a:%2,b:%3) (a:%4,b:%5)  %6 %7   %8 %9";
+      QString res = QString( resultsString.c_str())
+        .arg(k)
+        .arg(a)
+        .arg(b)
+        .arg(myPosA)
+        .arg(myPosB)
+        .arg(QString(RoseBin_support::HexToString(instA->get_address()).c_str()))
+        .arg(QString(instA->get_mnemonic().c_str()))
+        .arg(QString(RoseBin_support::HexToString(instB->get_address()).c_str()))
+        .arg(QString(instB->get_mnemonic().c_str()));
+      instance->analysisResult->append(res);  
+
+    }
+
+  }
+
+
+}

Copied: branches/testonly/projects/BinQ/Clone.h (from rev 128, trunk/projects/BinQ/Clone.h)
===================================================================
--- branches/testonly/projects/BinQ/Clone.h	                        (rev 0)
+++ branches/testonly/projects/BinQ/Clone.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,30 @@
+#ifndef CLONE_R_H
+#define CLONE_R_H
+#include "rose.h"
+
+
+#include <iostream>
+#include <list>
+#include "BinAnalyses.h"
+
+class BinQGUI;
+
+class DiffAlgo : public BinAnalyses {
+ public:
+  DiffAlgo(){};
+  virtual ~DiffAlgo(){};
+  void run();
+  std::string name();
+  std::string getDescription();
+
+
+};
+
+//Find matching instructions between insnsA and the global instructions for file A. 
+//Color the table row for the instruction in file A that matches the one in file A. Repeat for insns A and file B.
+void colorTable(BinQGUI* instance, const std::vector<std::pair<int,int> >& addInstr,  const std::vector<std::pair<int,int> >&  minusInst,
+       LCS::vector_start_at_one<SgNode*>& insnA, LCS::vector_start_at_one<SgNode*>& insnB 
+ );
+
+
+#endif

Copied: branches/testonly/projects/BinQ/FunctionDiff.C (from rev 128, trunk/projects/BinQ/FunctionDiff.C)
===================================================================
--- branches/testonly/projects/BinQ/FunctionDiff.C	                        (rev 0)
+++ branches/testonly/projects/BinQ/FunctionDiff.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,78 @@
+#include "BinQGui.h"
+#include "BinQSupport.h"
+#include "LCS.h"
+#include "FunctionDiff.h"
+#include "Clone.h"
+
+using namespace boost;
+using namespace std;
+using namespace qrs;
+using namespace LCS;
+
+
+std::string FunctionDiffAlgo::name() {
+  return "FunctionBinaryDiff";
+}
+
+
+
+std::string 
+FunctionDiffAlgo::getDescription() {
+  return "This Analysis detects the diff between two binary files where the symbols matches. It marks the additions and removals between them.";
+}
+
+
+void
+FunctionDiffAlgo::run() {
+  BinQGUI *instance = QROSE::cbData<BinQGUI *>();
+  // this part is to find the added and removed code (from Andreas)
+  FindInstructionsVisitor vis;
+
+  vector<SgAsmFunctionDeclaration*> funcsA, funcsB;
+  FindAsmFunctionsVisitor funcVis;
+  AstQueryNamespace::querySubTree(instance->fileA, std::bind2nd( funcVis, &funcsA ));
+  AstQueryNamespace::querySubTree(instance->fileB, std::bind2nd( funcVis, &funcsB ));
+
+
+  int adds=0, minus=0;
+  
+  for(int i = 0; i < funcsA.size() ; i++)
+  {
+    SgAsmFunctionDeclaration* functionA = funcsA[i];
+    for(int j = 0; j < funcsB.size() ; j++)
+    {
+
+      SgAsmFunctionDeclaration* functionB = funcsB[j];
+
+      if( functionA->get_name() != functionB->get_name() ) continue;
+      
+      LCS::vector_start_at_one<SgNode*> insnsA;
+      AstQueryNamespace::querySubTree(functionA, std::bind2nd( vis, &insnsA ));
+      LCS::vector_start_at_one<SgNode*> insnsB;
+      AstQueryNamespace::querySubTree(functionB, std::bind2nd( vis, &insnsB ));
+
+      std::vector<pair<int,int> > addInstr,minusInst;
+
+      printDiff(insnsA, insnsB,addInstr,minusInst);
+
+      //    cerr << " found adds on left side : " << addInstr.size() << endl;
+      //cerr << " found subbs on left side : " << minusInst.size() << endl;
+
+      colorTable(instance,addInstr, minusInst, insnsA, insnsB);
+
+      adds+=addInstr.size();
+      minus+=minusInst.size();
+
+    }
+  }
+  
+  QString res = QString("Found adds:  %1.  Found subbs: %2. ")
+    .arg(adds)
+    .arg(minus);
+  instance->analysisTab->setCurrentIndex(1);
+  instance->analysisResult->append(res);  
+   
+  
+};
+
+

Copied: branches/testonly/projects/BinQ/InterruptAnalysis.C (from rev 128, trunk/projects/BinQ/InterruptAnalysis.C)
===================================================================
--- branches/testonly/projects/BinQ/InterruptAnalysis.C	                        (rev 0)
+++ branches/testonly/projects/BinQ/InterruptAnalysis.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,593 @@
+#include "BinQGui.h"
+
+#include <iostream>
+
+
+#include "BinQSupport.h"
+#include "slide.h"
+
+#include <qtabwidget.h>
+#include "InterruptAnalysis.h"
+
+
+using namespace qrs;
+using namespace std;
+using namespace __gnu_cxx;
+using namespace  RoseBin_DataTypes;
+using namespace RoseBin_OS_VER;
+using namespace RoseBin_Arch;
+
+std::string InterruptAnalysis::name() {
+  return "Interrupt Analysis";
+}
+
+std::string InterruptAnalysis::getDescription() {
+  return "Runs interrupt analysis on binary.";
+}
+
+
+std::string
+InterruptAnalysis::getIntCallName(uint64_t rax,
+					 DataTypes& data_ebx,
+					 DataTypes& data_ecx,
+					 DataTypes& data_edx,
+					 vector<uint64_t>& val_rbx, 
+					 vector<uint64_t>& val_rcx, 
+					 vector<uint64_t>& val_rdx,
+					 std::vector<uint64_t>& pos_rbx,
+					 std::vector<uint64_t>& pos_rcx,
+					 std::vector<uint64_t>& pos_rdx,
+					 uint64_t fpos_rbx, uint64_t fpos_rcx, uint64_t fpos_rdx ) {
+  string int_name = "unknown";
+  data_ebx = d_none;
+  data_ecx = d_none;
+  data_edx = d_none;
+
+  if ((os_ver==linux_22 ||
+      os_ver==linux_24 || 
+      os_ver==linux_26 ||
+      os_ver==linux_27) && arch==bit32)
+    int_name = getIntCallName_Linux32bit(rax, data_ebx, data_ecx, data_edx,
+					 val_rbx, val_rcx, val_rdx,
+					 pos_rbx, pos_rcx, pos_rdx,
+					 fpos_rbx, fpos_rcx, fpos_rdx);
+  if ((os_ver==linux_22 ||
+      os_ver==linux_24 || 
+      os_ver==linux_26 ||
+      os_ver==linux_27) && arch==bit64)
+    int_name = getIntCallName_Linux64bit(rax, data_ebx, data_ecx, data_edx,
+					 val_rbx, val_rcx, val_rdx,
+					 pos_rbx, pos_rcx, pos_rdx,
+					 fpos_rbx, fpos_rcx, fpos_rdx);
+
+  return int_name;
+}
+
+std::string
+InterruptAnalysis::getIntCallName_Linux32bit(uint64_t rax,
+						    DataTypes& data_ebx,
+						    DataTypes& data_ecx,
+						    DataTypes& data_edx,
+						    vector<uint64_t>& val_rbx, 
+						    vector<uint64_t>& val_rcx, 
+						    vector<uint64_t>& val_rdx,
+						    std::vector<uint64_t>& pos_rbx,
+						    std::vector<uint64_t>& pos_rcx,
+						    std::vector<uint64_t>& pos_rdx,
+						    uint64_t fpos_rbx, uint64_t fpos_rcx, uint64_t fpos_rdx) {
+  string int_name = "unknown";
+  // linux system calls for kernel 2.2 - 32bit
+	switch (rax) {
+	case 1: {
+	  int_name="sys_exit"; 
+	  data_ebx = d_int; 
+	  createVariable(fpos_rbx, pos_rbx, "error_code", data_ebx, int_name, 0, val_rbx,false); 
+	  break;
+	}
+	case 2: {
+	  int_name="sys_fork"; 
+	  data_ebx = d_struct; 
+	  createVariable(fpos_rbx, pos_rbx, "fork", data_ebx, int_name, 0, val_rbx,false); 
+	  break;
+	}
+	case 3: {
+	  int_name="sys_read"; 
+	  data_ebx = d_uint; 
+	  data_ecx = d_char_p; 
+	  data_edx = d_size_t; 
+	  createVariable(fpos_rbx, pos_rbx, "fd", data_ebx, int_name, 0, val_rbx,false); 
+	  createVariable(fpos_rcx, pos_rcx, "buf", data_ecx, int_name, *(val_rdx.begin()), val_rcx,true); 
+	  createVariable(fpos_rdx, pos_rdx, "count", data_edx, int_name, 0, val_rdx,false); 
+	  break;
+	}
+	case 4: {
+	  int_name="sys_write"; 
+	  data_ebx = d_uint; 
+	  data_ecx = d_const_char_p; 
+	  data_edx = d_size_t; 
+	  createVariable(fpos_rbx, pos_rbx, "fd", data_ebx, int_name, 0, val_rbx,false); 
+	  createVariable(fpos_rcx, pos_rcx, "buf", data_ecx, int_name, *(val_rdx.begin()), val_rcx,true); 
+	  createVariable(fpos_rdx, pos_rdx, "count", data_edx, int_name, 0, val_rdx,false); 
+	  break;
+	}
+	case 5: {
+	  int_name="sys_open"; 
+	  data_ebx = d_const_char_p; 
+	  data_ecx = d_int;
+	  data_edx = d_int; 
+	  break;
+	}
+	case 6: {
+	  int_name="sys_close"; 
+	  data_ebx = d_uint; 
+	  break;
+	}
+	case 7: {
+	  int_name="sys_waitpid"; 
+	  data_ebx = d_pid_t; 
+	  data_ecx = d_uint_p;
+	  data_edx = d_int; 
+	  break;
+	}
+	case 8: {
+	  int_name="sys_creat"; 
+	  data_ebx = d_const_char_p; 
+	  data_ecx = d_int;
+	  break;
+	}
+	case 9: {
+	  int_name="sys_link"; 
+	  data_ebx = d_const_char_p; 
+	  data_ecx = d_const_char_p; 
+	  break;
+	}
+	case 10: {
+	  int_name="sys_unlink";
+	  data_ebx = d_const_char_p; 
+	  break;
+	}
+	case 11: {
+	  int_name="sys_execve"; 
+	  data_ebx = d_struct; 
+	  break;
+	}
+	case 12: {
+	  int_name="sys_chdir"; 
+	  data_ebx = d_const_char_p; 
+	  break;
+	}
+	case 13: {
+	  int_name="sys_time"; 
+	  data_ebx = d_int;
+	  break;
+	}
+	case 14: {
+	  int_name="sys_mknod"; break;
+	}
+	case 15: {
+	  int_name="sys_chmod"; break;
+	}
+	case 16: {
+	  int_name="sys_lchown"; break;
+	}
+	case 18: {
+	  int_name="sys_stat"; break;
+	}
+	case 19: {
+	  int_name="sys_lseek"; break;
+	}
+	case 20: {
+	  int_name="sys_getpid"; break;
+	}
+	case 21: {
+	  int_name="sys_mount"; break;
+	}
+	case 22: {
+	  int_name="sys_oldumount"; break;
+	}
+	case 23: {
+	  int_name="sys_setuid"; break;
+	}
+	case 24: {
+	  int_name="sys_getuid"; break;
+	}
+	case 25: {
+	  int_name="sys_stime"; break;
+	}
+	case 26: {
+	  int_name="sys_ptrace"; break;
+	}
+	case 27: {
+	  int_name="sys_alarm"; break;
+	}
+	case 28: {
+	  int_name="sys_fstat"; break;
+	}
+	case 29: {
+	  int_name="sys_pause"; break;
+	}
+	case 30: {
+	  int_name="sys_utime"; break;
+	}
+	case 33: {
+	  int_name="sys_access"; break;
+	}
+	case 34: {
+	  int_name="sys_nice"; break;
+	}
+	case 36: {
+	  int_name="sys_sync"; break;
+	}
+	case 37: {
+	  int_name="sys_kill"; break;
+	}
+	case 38: {
+	  int_name="sys_rename"; break;
+	}
+	case 39: {
+	  int_name="sys_mkdir"; break;
+	}
+	case 40: {
+	  int_name="sys_rmdir"; break;
+	}
+	case 41: {
+	  int_name="sys_dup"; break;
+	}
+	case 42: {
+	  int_name="sys_pipe"; break;
+	}
+	case 43: {
+	  int_name="sys_times"; break;
+	}
+	case 45: {
+	  int_name="sys_brk"; break;
+	}
+	case 46: {
+	  int_name="sys_setgid"; break;
+	}
+	case 47: {
+	  int_name="sys_getgid"; break;
+	}
+	case 48: {
+	  int_name="sys_signal"; break;
+	}
+	case 49: {
+	  int_name="sys_geteuid"; break;
+	}
+	case 50: {
+	  int_name="sys_getegid"; break;
+	}
+	case 51: {
+	  int_name="sys_acct"; break;
+	}
+	case 52: {
+	  int_name="sys_umount"; break;
+	}
+	case 54: {
+	  int_name="sys_ioctl"; break;
+	}
+	case 55: {
+	  int_name="sys_fcntl"; break;
+	}
+	case 57: {
+	  int_name="sys_setpgid"; break;
+	}
+	case 59: {
+	  int_name="sys_olduname"; break;
+	}
+	case 60: {
+	  int_name="sys_umask"; break;
+	}
+	case 61: {
+	  int_name="sys_chroot"; break;
+	}
+	case 62: {
+	  int_name="sys_ustat"; break;
+	}
+	case 63: {
+	  int_name="sys_dup2"; break;
+	}
+	case 64: {
+	  int_name="sys_getppid"; break;
+	}
+	case 65: {
+	  int_name="sys_getpgrp"; break;
+	}
+	case 66: {
+	  int_name="sys_setsid"; break;
+	}
+	case 67: {
+	  int_name="sys_sigaction"; break;
+	}
+	case 68: {
+	  int_name="sys_sgetmask"; break;
+	}
+	case 69: {
+	  int_name="sys_ssetmask"; break;
+	}
+	case 70: {
+	  int_name="sys_setreuid"; break;
+	}
+	case 71: {
+	  int_name="sys_setregid"; break;
+	}
+	case 72: {
+	  int_name="sys_sigsuspend"; break;
+	}
+	default:
+	  break;
+	}
+	return int_name;
+}
+
+std::string
+InterruptAnalysis::getIntCallName_Linux64bit(uint64_t rax,
+						    DataTypes& data_ebx,
+						    DataTypes& data_ecx,
+						    DataTypes& data_edx,
+						    vector<uint64_t>& val_rbx, 
+						    vector<uint64_t>& val_rcx, 
+						    vector<uint64_t>& val_rdx,
+						    std::vector<uint64_t>& pos_rbx,
+						    std::vector<uint64_t>& pos_rcx,
+						    std::vector<uint64_t>& pos_rdx,
+						    uint64_t fpos_rbx, uint64_t fpos_rcx, uint64_t fpos_rdx) {
+  string int_name = "unknown";
+  // linux system calls for kernel 2.6 - 64bit
+  // check in linux src : uinstd.h and syscalls.h
+	switch (rax) {
+	case 0: {
+	  int_name="sys_read"; 
+	  data_ebx = d_uint; 
+	  data_ecx = d_char_p; 
+	  data_edx = d_size_t; 
+	  break;
+	}
+	case 1: {
+	  int_name="sys_write"; 
+	  data_ebx = d_uint; 
+	  data_ecx = d_const_char_p; 
+	  data_edx = d_size_t; 
+	  break;
+	}
+	case 2: {
+	  int_name="sys_open"; 
+	  data_ebx = d_const_char_p; 
+	  data_ecx = d_int;
+	  data_edx = d_int; 
+	  break;
+	}
+	case 3: {
+	  int_name="sys_close"; 
+	  data_ebx = d_uint; 
+	  break;
+	}
+	case 4: {
+	  int_name="sys_newstat"; break;
+	  data_ebx = d_const_char_p; 
+	  data_ecx = d_struct;
+	}
+	case 5: {
+	  int_name="sys_newfstat"; break;
+	  data_ebx = d_uint; 
+	  data_ecx = d_struct;
+	}
+	case 6: {
+	  int_name="sys_newlstat"; break;
+	  data_ebx = d_const_char_p; 
+	  data_ecx = d_struct;
+	}
+	case 7: {
+	  int_name="sys_poll"; break;
+	  data_ebx = d_struct; 
+	  data_ecx = d_uint;
+	  data_edx = d_long;
+	}
+	default:
+	  break;
+	}
+	return int_name;
+}
+
+
+void
+InterruptAnalysis::getValueForDefinition(std::vector<uint64_t>& vec,
+						std::vector<uint64_t>& positions,
+						uint64_t& fpos,
+						SgDirectedGraphNode* node,
+                                                std::pair<X86RegisterClass, int> reg ) {
+  set <SgDirectedGraphNode*> defNodeSet = getDefFor(node, reg);
+  if (RoseBin_support::DEBUG_MODE()) 
+    cout << "    size of found NodeSet = " << defNodeSet.size() <<endl;
+  set <SgDirectedGraphNode*>::const_iterator it = defNodeSet.begin();
+  for (;it!=defNodeSet.end();++it) {
+    SgDirectedGraphNode* defNode = *it;
+    if (RoseBin_support::DEBUG_MODE() && defNode) 
+      cout << "    investigating ... " << defNode->get_name() <<endl;
+    ROSE_ASSERT(defNode);
+    SgAsmx86Instruction* inst = isSgAsmx86Instruction(defNode->get_SgNode());
+    ROSE_ASSERT(inst);
+    positions.push_back(inst->get_address());
+    // the right hand side of the instruction is either a use or a value
+    bool memRef = false;
+    std::pair<X86RegisterClass, int> regRight =
+      check_isRegister(defNode, inst, true, memRef);
+
+    if (RoseBin_support::DEBUG_MODE()) {
+      string regName = unparseX86Register(reg.first, reg.second, x86_regpos_qword);
+      string regNameRight = unparseX86Register(regRight.first, regRight.second, x86_regpos_qword);
+      cout << " VarAnalysis: getValueForDef . " << regName << "  right hand : " << regNameRight <<endl;
+    }
+    if (regRight.first == x86_regclass_unknown) {
+      // it is either a memref or a value
+      if (!memRef) {
+	// get value of right hand side instruction
+	uint64_t val = getValueOfInstr(inst, true);
+	vec.push_back(val);
+	fpos = inst->get_address();
+	if (RoseBin_support::DEBUG_MODE()) 
+      	  cout << "    found  valueOfInst = " << RoseBin_support::ToString(val) <<endl;
+      }
+    } else {
+      // it is a register reference. I.e we need to follow the usage edge to find the 
+      // definition of that node
+      SgDirectedGraphNode* usageNode = vizzGraph->getDefinitionForUsage(defNode);
+      if (usageNode && usageNode!=node) {
+	if (RoseBin_support::DEBUG_MODE() && usageNode) 
+      	  cout << "    following up usage for " << usageNode->get_name() <<endl;
+	getValueForDefinition(vec, positions, fpos, usageNode, regRight);
+      } else {
+	// we look at the same node.
+	cout << " ERROR :: Either following usage to itself or usageNode = NULL. " << usageNode << endl;
+      }
+    }
+  }
+}
+
+
+bool 
+InterruptAnalysis::run(string& name, SgDirectedGraphNode* node,
+			      SgDirectedGraphNode* previous){
+  // check known function calls and resolve variables
+  ROSE_ASSERT(node);
+  vector<uint64_t> val_rax, val_rbx, val_rcx, val_rdx ;
+  std::vector<uint64_t> pos_rax, pos_rbx, pos_rcx, pos_rdx;
+  uint64_t fpos_rax, fpos_rbx, fpos_rcx, fpos_rdx=0xffffffff;
+
+  SgAsmx86Instruction* asmNode = isSgAsmx86Instruction(node->get_SgNode());
+  if (asmNode) {
+    //    cerr << " Interrupt Analysis :: checking node " << RoseBin_support::HexToString(asmNode->get_address())
+    //	 << "  - " << toString(asmNode->get_kind()) << endl;
+    // ANALYSIS 1 : INTERRUPT DETECTION -------------------------------------------
+
+    // verify all interrupts and make sure they do what one expects them to do.
+    if (asmNode->get_kind() == x86_int) {
+      if (RoseBin_support::DEBUG_MODE()) 
+	cout << "    " << name << " : found int call " << endl;
+      // need to resolve rax, rbx, rcx, rdx
+      // therefore get the definition for each
+      getValueForDefinition(val_rax, pos_rax, fpos_rax, node, std::make_pair(x86_regclass_gpr, x86_gpr_ax));
+      getValueForDefinition(val_rbx, pos_rbx, fpos_rbx, node, std::make_pair(x86_regclass_gpr, x86_gpr_bx));
+      getValueForDefinition(val_rcx, pos_rcx, fpos_rcx, node, std::make_pair(x86_regclass_gpr, x86_gpr_cx));
+      getValueForDefinition(val_rdx, pos_rdx, fpos_rdx, node, std::make_pair(x86_regclass_gpr, x86_gpr_dx));
+
+      string int_name = "unknown ";
+
+      DataTypes data_ebx = unknown;
+      DataTypes data_ecx = unknown;
+      DataTypes data_edx = unknown;
+
+      bool ambigious_inst=false;
+      if (val_rax.size()>1)
+	ambigious_inst = true;
+      else
+      if (val_rax.size()==1) {
+	uint64_t rax = *(val_rax.begin());
+	int_name = getIntCallName(rax, data_ebx, data_ecx, data_edx,
+				  val_rbx, val_rcx, val_rdx, 
+				  pos_rbx, pos_rcx, pos_rdx,
+				  fpos_rbx, fpos_rcx, fpos_rdx);
+	ambigious_inst = false;
+      }
+
+      if (ambigious_inst) {      
+	string value = "";
+	vector<uint64_t>::iterator it = val_rax.begin();
+	for (;it!=val_rax.end();++it) {
+	  string i_name = getIntCallName(*it, data_ebx, data_ecx, data_edx,
+					 val_rbx, val_rcx, val_rdx, 
+					 pos_rbx, pos_rcx, pos_rdx,
+					 fpos_rbx, fpos_rcx, fpos_rdx);
+	  value +="rAX:"+RoseBin_support::HexToString(*it)+" "+i_name+" ";
+	  //	  createVariable(fpos_rax, pos_rax, "rax", data_ebx, "rax", 0, val_rax,false); 
+	}
+
+	cerr << " DataFlow::VariableAnalysis . Ambigious INT call: " <<
+	  vizzGraph->getProperty(RoseBin_Def::name, node) << " - " << value << endl;
+	value = "PROBLEM: " + value; 
+	node->append_properties(RoseBin_Def::dfa_unresolved_func,value);
+
+      } else {
+	// we know what INT instruction it is
+	string t_ebx = RoseBin_support::getTypeName(data_ebx);
+	string t_ecx = RoseBin_support::getTypeName(data_ecx);
+	string t_edx = RoseBin_support::getTypeName(data_edx);
+
+	int_name += " ("+t_ebx+","+t_ecx+","+t_edx+")";
+	//if (RoseBin_support::DEBUG_MODE()) 
+	// cout << " found INT call : " << value << " .. " << int_name << endl;
+	node->append_properties(RoseBin_Def::dfa_variable,int_name);
+      }
+    }
+  }
+  return false;
+}
+
+
+
+void
+InterruptAnalysis::run() {
+  BinQGUI *instance = QROSE::cbData<BinQGUI *>();
+
+  RoseBin_Graph* graph=NULL;
+  ROSE_ASSERT(isSgProject(instance->fileA));
+  SgBinaryFile* binaryFile = isSgBinaryFile(isSgProject(instance->fileA)->get_fileList()[0]);
+  SgAsmFile* file = binaryFile != NULL ? binaryFile->get_binaryFile() : NULL;
+  ROSE_ASSERT(file);
+
+  VirtualBinCFG::AuxiliaryInformation* info = new VirtualBinCFG::AuxiliaryInformation(file);
+
+  // call graph analysis  *******************************************************
+  instance->analysisTab->setCurrentIndex(1);
+  QString res = QString("Creating dataflow graph ");
+  instance->analysisResult->append(res);  
+  
+  bool dot=true;
+  bool forward=true;
+  bool edges=true;
+  bool mergedEdges=true;
+  bool interprocedural=false;
+  string dfgFileName = "dfg.dot";
+  graph= new RoseBin_DotGraph(info);
+  if (dot==false) {
+    dfgFileName = "dfg.gml";
+    graph= new RoseBin_GMLGraph(info);
+  }
+
+  SgAsmInterpretation* interp = SageInterface::getMainInterpretation(file);
+  RoseBin_DataFlowAnalysis* dfanalysis = 
+    new RoseBin_DataFlowAnalysis(interp->get_global_block(), forward, new RoseObj(), info);
+  ROSE_ASSERT(dfanalysis);
+  dfanalysis->init(interprocedural, edges);
+  dfanalysis->run(graph, dfgFileName, mergedEdges);
+
+  res = QString("nr of nodes visited %1. nr of edges visited %2. ")
+    .arg(dfanalysis->nodesVisited())
+    .arg(dfanalysis->edgesVisited());
+    
+  instance->analysisResult->append(res);  
+
+  res = QString("Running InterruptAnalysis detection... ");
+  instance->analysisResult->append(res);  
+
+  vector<SgDirectedGraphNode*> rootNodes;
+  dfanalysis->getRootNodes(rootNodes);
+
+  res = QString("Graph has Rootnodes : %1 ")
+    .arg(rootNodes.size());
+  instance->analysisResult->append(res);  
+
+  dfanalysis->init();
+  res = QString("Initializing ... ");
+  instance->analysisResult->append(res);  
+  init(graph);
+  res = QString("Traversing ... ");
+  instance->analysisResult->append(res);  
+  dfanalysis->traverseGraph(rootNodes, this, interprocedural);
+  
+  res = QString("Done. ");
+  instance->analysisResult->append(res);  
+  
+
+  
+}

Copied: branches/testonly/projects/BinQ/InterruptAnalysis.h (from rev 128, trunk/projects/BinQ/InterruptAnalysis.h)
===================================================================
--- branches/testonly/projects/BinQ/InterruptAnalysis.h	                        (rev 0)
+++ branches/testonly/projects/BinQ/InterruptAnalysis.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,77 @@
+#ifndef INTERRUPTANALYSIS_R_H
+#define INTERRUPTANALYSIS_R_H
+#include "rose.h"
+
+#include <iostream>
+#include <list>
+#include "BinAnalyses.h"
+#include "RoseBin_DataFlowAbstract.h"
+#include "RoseBin_DefUseAnalysis.h"
+
+
+class InterruptAnalysis : public BinAnalyses,  RoseBin_DataFlowAbstract {
+ public:
+  InterruptAnalysis(){};
+  virtual ~InterruptAnalysis(){};
+  void run();
+  std::string name();
+  std::string getDescription();
+
+  bool run(std::string& name, SgDirectedGraphNode* node,
+	   SgDirectedGraphNode* previous);
+
+
+ private:
+  
+  void init(RoseBin_Graph* vg) {
+    vizzGraph = vg;
+  }
+  bool runEdge(SgDirectedGraphNode* node, SgDirectedGraphNode* next) {
+    return false;
+  }
+
+
+  void getValueForDefinition(std::vector<uint64_t>& vec,
+			     std::vector<uint64_t>& positions,
+			     uint64_t& fpos,
+			     SgDirectedGraphNode* node,
+                             std::pair<X86RegisterClass, int> reg );
+
+  std::string getIntCallName_Linux32bit(uint64_t rax,RoseBin_DataTypes::DataTypes& data_ebx,
+					RoseBin_DataTypes::DataTypes& data_ecx,
+					RoseBin_DataTypes::DataTypes& data_edx,
+					std::vector<uint64_t>& val_rbx, 
+					std::vector<uint64_t>& val_rcx, 
+					std::vector<uint64_t>& val_rdx,
+					std::vector<uint64_t>& pos_ebx,
+					std::vector<uint64_t>& pos_ecx,
+					std::vector<uint64_t>& pos_edx,
+					uint64_t fpos_rbx, uint64_t fpos_rcx, uint64_t fpos_rdx);
+  std::string getIntCallName_Linux64bit(uint64_t rax,RoseBin_DataTypes::DataTypes& data_ebx,
+					RoseBin_DataTypes::DataTypes& data_ecx,
+					RoseBin_DataTypes::DataTypes& data_edx,
+					std::vector<uint64_t>& val_rbx, 
+					std::vector<uint64_t>& val_rcx, 
+					std::vector<uint64_t>& val_rdx,
+					std::vector<uint64_t>& pos_ebx,
+					std::vector<uint64_t>& pos_ecx,
+					std::vector<uint64_t>& pos_edx,
+					uint64_t fpos_rbx, uint64_t fpos_rcx, uint64_t fpos_rdx);
+  std::string getIntCallName(uint64_t rax,RoseBin_DataTypes::DataTypes& data_ebx,
+			     RoseBin_DataTypes::DataTypes& data_ecx,
+			     RoseBin_DataTypes::DataTypes& data_edx,
+			    std::vector<uint64_t>& val_rbx, 
+			    std::vector<uint64_t>& val_rcx, 
+			    std::vector<uint64_t>& val_rdx,
+			     std::vector<uint64_t>& pos_ebx,
+			     std::vector<uint64_t>& pos_ecx,
+			     std::vector<uint64_t>& pos_edx,
+			     uint64_t fpos_rbx, uint64_t fpos_rcx, uint64_t fpos_rdx);
+
+
+
+};
+
+
+
+#endif

Copied: branches/testonly/projects/BinQ/Item.h (from rev 128, trunk/projects/BinQ/Item.h)
===================================================================
--- branches/testonly/projects/BinQ/Item.h	                        (rev 0)
+++ branches/testonly/projects/BinQ/Item.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,33 @@
+#ifndef ITEM_R_H
+#define ITEM_R_H
+#include "rose.h"
+
+class Item {
+ public:
+  Item(rose_addr_t addr, SgNode* statement,
+       int resolvedColor, int row, int length, int pos,
+       std::string comment, int lineNr):
+    addr(addr),statement(statement),
+    resolvedColor(resolvedColor),
+    row(row),length(length),pos(pos),
+    comment(comment),lineNr(lineNr){
+    fg = QColor(128,128,128);
+    bg = QColor(128,128,128);
+}
+
+  rose_addr_t addr;
+  SgNode* statement;
+  int resolvedColor;
+  int row;
+  int length;
+  int pos;
+  std::string comment;
+  int lineNr;
+  QColor bg;
+  QColor fg;
+
+};
+
+
+
+#endif

Copied: branches/testonly/projects/BinQ/LCS.C (from rev 128, trunk/projects/BinQ/LCS.C)
===================================================================
--- branches/testonly/projects/BinQ/LCS.C	                        (rev 0)
+++ branches/testonly/projects/BinQ/LCS.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,146 @@
+#include "LCS.h"
+#include "BinQSupport.h"
+
+#include <boost/algorithm/string.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace LCS;
+#if 0
+  std::string
+LCS::unparseInstrFast(SgAsmInstruction* iA)
+{
+   std::map<SgAsmInstruction*,std::string> strMap;
+
+  std::map<SgAsmInstruction*,std::string>::iterator iItr =
+    strMap.find(iA);
+  std::string value = "";
+  if(iItr == strMap.end() )
+  {
+
+    // Unparse the normalized forms of the instructions
+    string mne = iA->get_mnemonic();
+    boost::to_lower(mne);
+
+    value += mne;
+    const SgAsmExpressionPtrList& operands = getOperands(iA);
+    // Add to total for this variant
+    // Add to total for each kind of operand
+    size_t operandCount = operands.size();
+
+    for (size_t i = 0; i < operandCount; ++i) {
+      SgAsmExpression* operand = operands[i];
+      value += (  isSgAsmRegisterReferenceExpression(operand) ? " R" : isSgAsmMemoryReferenceExpression(operand) ? " M" : " V");
+    }
+
+    strMap[iA] = value;
+  }else
+    value = iItr->second;
+  return value;
+};
+#endif
+  
+std::string
+LCS::unparseInstrFast(SgAsmInstruction* iA)
+{
+
+  std::string value;
+  // Unparse the normalized forms of the instructions
+  value += iA->get_mnemonic();
+  const SgAsmExpressionPtrList& operands = getOperands(iA);
+  // Add to total for this variant
+  // Add to total for each kind of operand
+  size_t operandCount = operands.size();
+
+  for (size_t i = 0; i < operandCount; ++i) {
+    SgAsmExpression* operand = operands[i];
+    value += (  isSgAsmRegisterReferenceExpression(operand) ? " R" : isSgAsmMemoryReferenceExpression(operand) ? " M" : " V");
+  }
+
+  return value;
+};
+
+
+  bool
+LCS::isEqual(SgNode* A, SgNode* B)
+{
+  if(A==NULL || B == NULL) return false;
+  SgAsmInstruction* iA = isSgAsmx86Instruction(A);
+  SgAsmInstruction* iB = isSgAsmx86Instruction(B);
+  SgAsmFunctionDeclaration* fA = isSgAsmFunctionDeclaration(A);
+  SgAsmFunctionDeclaration* fB = isSgAsmFunctionDeclaration(B);
+
+  bool isTheSame = false;
+  if(iA != NULL && iB != NULL)
+    isTheSame = unparseInstrFast(iA) == unparseInstrFast(iB) ? true : false;
+  if(fA != NULL && fB != NULL)
+    isTheSame = fA->get_name() == fB->get_name() ? true : false;
+
+  return isTheSame;
+}
+
+
+  void 
+LCS::LCSLength( scoped_array<scoped_array<size_t> >& C  ,vector_start_at_one<SgNode*>& A, vector_start_at_one<SgNode*>& B )
+{
+  int m = A.size()+1;
+  int n = B.size()+1;
+  C.reset(new scoped_array<size_t>[m]);
+
+  for (int i = 0 ; i < m; i++)
+    C[i].reset(new size_t[n]);
+
+  for (size_t i = 0 ; i <= A.size() ; i++)
+    C[i][0]=0;
+  for (size_t i = 0 ; i <= B.size() ; i++)
+    C[0][i]=0;
+
+  for (size_t i = 1 ; i <= A.size() ; i++)
+    for (size_t j = 1 ; j <= B.size() ; j++)
+    {
+      if(isEqual(A[i],B[j]))
+        C[i][j] = C[i-1][j-1]+1;
+      else
+        C[i][j] = C[i][j-1] > C[i-1][j] ? C[i][j-1] : C[i-1][j];
+
+    }
+
+}
+
+
+void 
+printDiff( scoped_array<scoped_array<size_t> >& C,
+    vector_start_at_one<SgNode*>& A, vector_start_at_one<SgNode*>& B, int i, int j,
+    std::vector<pair<int,int> >& addInstr, std::vector<pair<int,int> >& minusInstr
+    )
+{
+  if(i> 0 && j > 0 && isEqual(A[i],B[j]))
+  {
+    printDiff(C,A,B,i-1,j-1,addInstr, minusInstr);
+    //print " " + X[i]
+  }else if( j > 0 && (i == 0 || C[i][j-1] >= C[i-1][j]))
+  {
+    printDiff(C,A,B,i,j-1,addInstr, minusInstr);
+    //print "+ " + B[j]
+    std::cout << "+ " << j << " " << unparseInstrFast( (SgAsmInstruction*) B[j]) <<std::endl;
+    addInstr.push_back(pair<int,int>(i,j));
+  }else  if(i > 0 && (j == 0 || C[i][j-1] < C[i-1][j]))
+  {
+    printDiff(C, A, B, i-1, j,addInstr, minusInstr);
+    //   print "- " + X[i]
+    std::cout << "- " << i << " " << unparseInstrFast((SgAsmInstruction*)A[i]) << std::endl;
+    minusInstr.push_back(pair<int,int>(i,j));
+  }
+}
+
+
+void 
+LCS::printDiff( vector_start_at_one<SgNode*>& A, vector_start_at_one<SgNode*>& B, 
+       std::vector<std::pair<int,int> >& addInstr, std::vector<std::pair<int,int> >& minusInst
+      )
+{
+  scoped_array<scoped_array<size_t> > C;
+  LCSLength(C,A,B);
+  printDiff(C,A, B,A.size(),B.size(),addInstr,minusInst);
+};
+

Copied: branches/testonly/projects/BinQ/LCS.h (from rev 128, trunk/projects/BinQ/LCS.h)
===================================================================
--- branches/testonly/projects/BinQ/LCS.h	                        (rev 0)
+++ branches/testonly/projects/BinQ/LCS.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,42 @@
+#include <boost/smart_ptr.hpp>
+#include <vector>
+#include <rose.h>
+#include <string>
+#include <map>
+namespace LCS{
+  template <typename T>
+    class vector_start_at_one {
+      std::vector<T> sa;
+      size_t theSize;
+
+      public:
+      vector_start_at_one(): sa(), theSize(0) {}
+
+      size_t size() const {return sa.size();}
+      T* get() const {return sa.get();}
+
+      void push_back(T v){ sa.push_back(v); }
+      T& operator[](size_t i) {return sa[i-1];}
+      const T& operator[](size_t i) const {return sa[i];}
+
+      private:
+      vector_start_at_one(const vector_start_at_one<T>&); // Not copyable
+    };
+
+
+  
+  bool
+    isEqual(SgNode* A, SgNode* B);
+
+  void LCSLength( boost::scoped_array<boost::scoped_array<size_t> >& C  ,vector_start_at_one<SgNode*>& A, vector_start_at_one<SgNode*>& B );
+
+
+   void printDiff( vector_start_at_one<SgNode*>& A, vector_start_at_one<SgNode*>& B, 
+       std::vector<std::pair<int,int> >& addInstr, std::vector<std::pair<int,int> >& minusInst
+      );
+
+  std::string unparseInstrFast(SgAsmInstruction* iA);
+  
+
+};
+

Modified: branches/testonly/projects/BinQ/Makefile.am
===================================================================
--- branches/testonly/projects/BinQ/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/BinQ/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -8,31 +8,58 @@
 
 BinQ_SOURCES = \
 	BinQMain.C \
-        BinQGui.C \
-	BinQSupport.C
+	BinQSupport.C \
+	BinQGui.C \
+	slide.C \
+        LCS.C   \
+	Clone.C \
+        FunctionDiff.C \
+	AlignFunctions.C \
+	BinCallGraph.C \
+	BinControlFlowAnalysis.C \
+	BinDataFlowAnalysis.C \
+	BufferOverflow.C \
+	InterruptAnalysis.C
 
-      
+
+
+
 BinQ_LDADD = $(ROSE_LIBS) $(QT_LDFLAGS) $(QROSE_LDFLAGS) -lrt
 
 INCLUDES = $(ROSE_INCLUDES) $(BOOST_CPPFLAGS) -I.
 
 
 check-local:
+	./BinQ --fileA $(srcdir)/buffer2.bin --fileB $(srcdir)/buffer2b.bin --test 
+	./BinQ --fileA $(srcdir)/buffer2.bin --fileB $(srcdir)/buffer2-tsv --test 
+	./BinQ --fileA $(srcdir)/buffer2.bin --fileB $(srcdir)/buffer2.c --test 
 	@echo "************************************************************************************"
 	@echo "*** ROSE/projects/AstEquivalence: make check rule complete (terminated normally) ***"
 	@echo "************************************************************************************"
 
+
 CLEANFILES = 
 
 
 clean:
-	rm -f *.o BinQ
+	rm -f *.o BinQ *.s *.dump
 
 endif
 
 EXTRA_DIST = BinQGui.h \
              BinQSupport.h \
+             AlignFunctions.h \
+             BinAnalyses.h \
+             slide.h \
              disks.xpm  \
              folder.xpm \
-             icons.h
+             icons.h \
+             Item.h \
+             Clone.h \
+             LCS.h \
+             BinCallGraph.h \
+             BinControlFlowAnalysis.h \
+             BinDataFlowAnalysis.h \
+             BufferOverflow.h \
+             InterruptAnalysis.h
 

Copied: branches/testonly/projects/BinQ/slide.C (from rev 128, trunk/projects/BinQ/slide.C)
===================================================================
--- branches/testonly/projects/BinQ/slide.C	                        (rev 0)
+++ branches/testonly/projects/BinQ/slide.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,230 @@
+#include "rose.h"
+#include <QPainter>
+#include <QMouseEvent>
+#include "slide.h"
+
+using namespace Qt;
+using namespace std;
+
+Slide::Slide(BinQGUI* g,
+	     QWidget *parent)
+  //  : QWidget(parent)
+{
+  lastStringA=QString("  ");
+  lastRowA=-1;
+  lastStringB=QString("  ");
+  lastRowB=-1;
+  gui = g;
+  setPalette(QPalette(QColor(250, 250, 250)));
+  setAutoFillBackground(true);
+  posX=0;
+  posY=0;
+}
+
+void
+Slide::colorize() {
+  ROSE_ASSERT(gui);
+  update();
+}
+
+void Slide::paintEvent(QPaintEvent * /* event */)
+{
+  QPainter painter(this);
+  painter.setPen(Qt::NoPen);
+  ROSE_ASSERT(gui);
+  std::vector<Item*> ite = gui->itemsFileA;
+  std::vector<Item*>::const_iterator it=gui->itemsFileA.begin();
+  int pos=0;
+  for (;it!=gui->itemsFileA.end();++it) {
+    Item* item = *it;
+    if (item) {
+    int pos = item->pos;
+    int length=item->length;
+    int color = item->resolvedColor;
+    if (color==0)   painter.setBrush(Qt::black);
+    if (color==1)   painter.setBrush(Qt::blue);
+    if (color==2)   painter.setBrush(Qt::green);
+    if (color==3)   painter.setBrush(Qt::red);
+    if (color==4)   painter.setBrush(Qt::gray);
+    if (color==5)   painter.setBrush(Qt::white);
+    painter.drawRect(QRect(pos, 0, length, 15));
+    }
+  }
+
+  ite = gui->itemsFileB;
+  it=gui->itemsFileB.begin();
+  pos=0;
+  for (;it!=gui->itemsFileB.end();++it) {
+    Item* item = *it;
+    if (item) {
+    int pos = item->pos;
+    int length=item->length;
+    int color = item->resolvedColor;
+    if (color==0)   painter.setBrush(Qt::black);
+    if (color==1)   painter.setBrush(Qt::blue);
+    if (color==2)   painter.setBrush(Qt::green);
+    if (color==3)   painter.setBrush(Qt::red);
+    if (color==4)   painter.setBrush(Qt::gray);
+    if (color==5)   painter.setBrush(Qt::white);
+    painter.drawRect(QRect(pos, 15, length, 15));
+    }
+  }
+
+  painter.setPen(Qt::white);
+  painter.setBrush(Qt::NoBrush);
+  painter.drawRect(QRect(posX, 0, (1), 30));
+
+}
+
+
+void Slide::mouseMoveEvent( QMouseEvent *mevt )
+{
+  posX=mevt->pos().x();
+  posY=mevt->pos().y();
+  int selected = posX;
+  Item* item = gui->byteItemFileA[selected];
+  Item* item2 = gui->byteItemFileB[selected];
+  ROSE_ASSERT(gui);
+
+  if (item) {
+    SgAsmNode* stmt=isSgAsmNode(item->statement);
+    if (stmt) {
+      if (isSgAsmFunctionDeclaration(stmt)) {
+	QString res = QString("FILE_A: selected Function  %1    pos:%2")
+	  .arg(isSgAsmFunctionDeclaration(stmt)->get_name().c_str())
+	  .arg(selected);
+	if (lastStringA!=res) {
+	  lastStringA = res;
+	  gui->console->append(res);
+	}
+      } else if (isSgAsmBlock(stmt)) {
+	QString res = QString("FILE_A: selected Block");
+	if (lastStringA!=res) {
+	  lastStringA = res;
+	  gui->console->append(res);
+	}
+      } else if (isSgAsmElfSection(stmt)) {
+	QString res = QString("FILE_A: selected Section %1")
+	.arg(isSgAsmElfSection(stmt)->get_name()->get_string().c_str());
+	if (lastStringA!=res) {
+	  lastStringA = res;
+	  gui->console->append(res);
+	  int row = item->row;
+	  //cerr << "Selected row: " << row << "   lastRowA:" << lastRowA << endl;
+	  if (row>=0) {
+	    if (lastRowA!=row) {
+	      gui->unhighlightInstructionRow(lastRowA, true);
+	      gui->highlightInstructionRow(row, true);
+	      lastRowA=row;
+	    }
+	  }
+	}
+      } else if (isSgAsmInstruction(stmt)) {
+	//cerr << " selected Byte: " << isSgAsmInstruction(stmt)->get_mnemonic() << endl;
+	QString res = QString("FILE_A: selected Byte  %1: %2  size %3  pos: %4")
+	  .arg(RoseBin_support::HexToString((isSgAsmx86Instruction(stmt))->get_address()).c_str() )
+	  .arg(	unparseInstruction(isSgAsmInstruction(stmt)).c_str())
+	  .arg(isSgAsmInstruction(stmt)->get_raw_bytes().size())
+	  .arg(selected);
+	if (lastStringA!=res) {
+	  lastStringA = res;
+	  gui->console->append(res);
+	  int row = item->row;
+	  //cerr << "Selected row: " << row << "   lastRowA:" << lastRowA << endl;
+	  if (row>=0) {
+	    if (lastRowA!=row) {
+	      gui->unhighlightInstructionRow(lastRowA, true);
+	      gui->highlightInstructionRow(row, true);
+	      lastRowA=row;
+	    }
+	  }
+	}
+      } // if
+    } //if stmt
+  }
+
+  if (item2) {
+    SgNode* stmt=item2->statement;
+    if (stmt) {
+      if (isSgAsmFunctionDeclaration(stmt)) {
+	QString res = QString("FILE_B: selected Function  %1    pos:%2")
+	  .arg(isSgAsmFunctionDeclaration(stmt)->get_name().c_str())
+	  .arg(selected);
+	if (lastStringB!=res) {
+	  lastStringB = res;
+	  gui->console->append(res);
+	}
+      } else if (isSgAsmBlock(stmt)) {
+	QString res = QString("FILE_B: selected Block");
+	if (lastStringB!=res) {
+	  lastStringB = res;
+	  gui->console->append(res);
+	}
+      } else if (isSgFunctionDeclaration(stmt)) {
+	QString res = QString("FILE_B: Func selected");
+	if (lastStringB!=res) {
+	  lastStringB = res;
+	  gui->console->append(res);
+	}
+      } else if (isSgStatement(stmt)) {
+	//	cerr << " selected statement!! " << endl;
+	QString res = QString("FILE_B: selected Byte  %1: %2  size %3  pos: %4")
+	  .arg(QString(" ") )
+	  .arg(	isSgStatement(stmt)->class_name().c_str())
+	  .arg(QString(" "))
+	  .arg(selected);
+	if (lastStringB!=res) {
+	  lastStringB = res;
+	  gui->console->append(res);
+	  int row = item2->row;
+	  //cerr << "Selected row: " << row << "   lastRowB:" << lastRowB << endl;
+	  if (row>=0) {
+	    if (lastRowB!=row) {
+	      gui->unhighlightInstructionRow(lastRowB, false);
+	      gui->highlightInstructionRow(row, false);
+	      lastRowB=row;
+	    }
+	  }
+	}
+      }else if (isSgAsmElfSection(stmt)) {
+	QString res = QString("FILE_B: selected Section %1")
+	.arg(isSgAsmElfSection(stmt)->get_name()->get_string().c_str());
+	if (lastStringB!=res) {
+	  lastStringB = res;
+	  gui->console->append(res);
+	  int row = item2->row;
+	  //cerr << "Selected row: " << row << "   lastRowA:" << lastRowA << endl;
+	  if (row>=0) {
+	    if (lastRowB!=row) {
+	      gui->unhighlightInstructionRow(lastRowB, false);
+	      gui->highlightInstructionRow(row, false);
+	      lastRowB=row;
+	    }
+	  }
+	}
+      } else if (isSgAsmInstruction(stmt)) {
+	//cerr << " selected Byte: " << isSgAsmInstruction(stmt)->get_mnemonic() << endl;
+	QString res = QString("FILE_B: selected Byte  %1: %2  size %3  pos: %4")
+	  .arg(RoseBin_support::HexToString((isSgAsmx86Instruction(stmt))->get_address()).c_str() )
+	  .arg(	unparseInstruction(isSgAsmInstruction(stmt)).c_str())
+	  .arg(isSgAsmInstruction(stmt)->get_raw_bytes().size())
+	  .arg(selected);
+	if (lastStringB!=res) {
+	  lastStringB = res;
+	  gui->console->append(res);
+	  int row = item2->row;
+	  //cerr << "Selected row: " << row << "   lastRowB:" << lastRowB << endl;
+	  if (row>=0) {
+	    if (lastRowB!=row) {
+	      gui->unhighlightInstructionRow(lastRowB, false);
+	      gui->highlightInstructionRow(row, false);
+	      lastRowB=row;
+	    }
+	  }
+	}
+      } // if
+    } //if stmt
+  }
+
+  update();
+}

Copied: branches/testonly/projects/BinQ/slide.h (from rev 128, trunk/projects/BinQ/slide.h)
===================================================================
--- branches/testonly/projects/BinQ/slide.h	                        (rev 0)
+++ branches/testonly/projects/BinQ/slide.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,34 @@
+#ifndef CANNONFIELD_H
+#define CANNONFIELD_H
+
+#include "rose.h"
+#include <QWidget>
+
+#include "Item.h"
+#include "BinQGui.h"
+//class BinQGUI;
+
+class Slide : public QWidget
+{
+  //     Q_OBJECT
+
+ public:
+  Slide(BinQGUI* gui, QWidget *parent = 0);
+  void colorize();
+
+ protected:
+  void paintEvent(QPaintEvent *event);
+  void mouseMoveEvent( QMouseEvent *mevt );
+
+  
+ private:
+  int posX;
+  int posY;
+  BinQGUI* gui;
+  QString lastStringA;
+  int lastRowA;
+  QString lastStringB;
+  int lastRowB;
+};
+
+#endif

Modified: branches/testonly/projects/BinaryCloneDetection/gui/binaryCloneGui.C
===================================================================
--- branches/testonly/projects/BinaryCloneDetection/gui/binaryCloneGui.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/BinaryCloneDetection/gui/binaryCloneGui.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -319,7 +319,7 @@
 
     try {
       eltCount = boost::lexical_cast<size_t>(con.executestring("select max(row_number) from largest_clones"));
-    } catch (exception& e) { 
+    } catch (std::exception& e) { 
       eAssert(0, ("internal error: No largest_clones table found -- invalid database?!"));
     }
 
@@ -429,7 +429,7 @@
         row++;
       }
     }
-    catch(exception& e) {
+    catch(std::exception& e) {
 	//cout << e.what() << "\n";
   }
 
@@ -534,25 +534,8 @@
   return std::pair<std::string,std::string>(line,offset);
 }  ;
 
-class FindInstructionsVisitor: public std::binary_function<SgNode*, std::vector<SgAsmx86Instruction *>* , void* >
-{
-  public:
-    void* operator()(first_argument_type node, std::vector<SgAsmx86Instruction*>* insns ) const{
-      if (isSgAsmx86Instruction(node)) insns->push_back(isSgAsmx86Instruction(node));
-      return NULL;
-    }
-};
 
-class FindAsmFunctionsVisitor: public std::binary_function<SgNode*, std::vector<SgAsmFunctionDeclaration *>* , void* >
-{
-  public:
-    void* operator()(first_argument_type node, std::vector<SgAsmFunctionDeclaration*>* insns ) const{
-      if (isSgAsmFunctionDeclaration(node)) insns->push_back(isSgAsmFunctionDeclaration(node));
-      return NULL;
-    }
-};
 
-
 enum ExpressionCategory {ec_reg = 0, ec_mem = 1, ec_val = 2};
 
 static const size_t numberOfInstructionKinds = x86_last_instruction;

Modified: branches/testonly/projects/Makefile.am
===================================================================
--- branches/testonly/projects/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -3,6 +3,7 @@
 # Add Projects that are associated with capabilities that belong to ROSE here
 SUBDIRS = \
      AstEquivalence \
+     autoParallelization \
      BinQ \
      compass \
      BinaryCloneDetection \
@@ -28,10 +29,8 @@
      runtimeErrorCheck \
      bugSeeding \
      binaryVisualization \
-     UpcTranslation \
-     OpenMP_Parser
+     UpcTranslation
 
-
 #AS(3/12/2008) the  NameConsistancyChecker is now part of compass
 #     NameConsistancyChecker 
 

Modified: branches/testonly/projects/OpenMP_Translator/ompTranslator.C
===================================================================
--- branches/testonly/projects/OpenMP_Translator/ompTranslator.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/OpenMP_Translator/ompTranslator.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -85,6 +85,9 @@
   static int setForLoopTripleValues(int valuetype,SgForStatement* forstmt, SgExpression* exp);
   static SgInitializedName * getLoopIndexVar(SgForStatement* forstmt);
   static bool isLoopIndexVarRef(SgForStatement* forstmt, SgVarRefExp *varref);
+  // Check if node1 is an ancester of node2 (parent of parent of.. node 2)
+  // a reliable way to compare two scopes: 
+  static bool isAncester(SgNode* node1, SgNode* node2); 
 };
 
 //--------------------------------------------------------------
@@ -634,9 +637,10 @@
           for (Rose_STL_Container<SgNode*>::iterator i=used_variables.begin();i!=used_variables.end();i++)
              {
             // only care the used variables from the same scope and outer scope
-            // interestingly, outer scope is 'smaller'
+            // interestingly, outer scope is 'smaller' currentscope >= orig_scope
                SgInitializedName* initname= isSgVarRefExp(*i)->get_symbol()->get_declaration();
-               if ( currentscope >= isSgScopeStatement(ASTtools::get_scope(initname)) )
+	       SgScopeStatement* orig_scope=isSgScopeStatement(ASTtools::get_scope(initname));
+               if (( currentscope == orig_scope)||ASTtools::isAncester(orig_scope,currentscope) )
                     all_var_list.push_back(initname);
              } //end for
 
@@ -871,7 +875,9 @@
         // only care the used variables from the same scope and outer scope
         // interestingly, outer scope is 'smaller'
          SgInitializedName* initname= isSgVarRefExp(*i)->get_symbol()->get_declaration();
-         if ( currentscope >= isSgScopeStatement(ASTtools::get_scope(initname)) )
+         //if ( currentscope >= isSgScopeStatement(ASTtools::get_scope(initname)) )
+         SgScopeStatement* orig_scope = isSgScopeStatement(ASTtools::get_scope(initname));
+         if (( currentscope==orig_scope) || ASTtools::isAncester(orig_scope,currentscope))
             all_var_list.push_back(initname);
        } //end for
 
@@ -1413,6 +1419,23 @@
 }
 
 //-------------
+//check if node1 is an ancester of node 2
+bool ASTtools::isAncester(SgNode* node1, SgNode* node2)
+{
+  ROSE_ASSERT(node1&&node2);
+  SgNode* curnode= node2;
+  if (node1==node2)
+    return false;
+  do {
+      curnode= curnode->get_parent();
+  } while( (curnode!=NULL)&&(curnode!=node1));
+
+  if (curnode==node1)
+   return true;
+  else 
+    return false;
+}
+
 // what if the current node is already the outmost scope??
 SgNode* ASTtools::get_scope(SgNode* astNode)
   {
@@ -1721,7 +1744,8 @@
        if (( ((ompattribute->isInClause(initname,e_private))||
 	      (ompattribute->isInClause(initname,e_firstprivate))||
 	      (ompattribute->isInClause(initname,e_lastprivate)))
-		&&(currentscope >= varscope))                         ||
+//		&&(currentscope >= varscope))                         ||
+		&&((currentscope==varscope)|| ASTtools::isAncester(varscope,currentscope)))                         ||
            (ompattribute->isInClause(initname,e_reduction_plus)))
        { 
         //cout<<"debug:private:"<<(initname->get_name()).getString()<<endl;
@@ -1819,7 +1843,8 @@
       SgExpression * lhs = NULL;
       SgExpression * rhs = NULL;
   
-      if (varscope<currentscope)
+//      if (varscope<currentscope) // I thought higher scope was smaller
+      if (ASTtools::isAncester(varscope,currentscope))
          {
             lhs = buildVarRefExp(initname,bBlock1);
             rhs = buildVarRefExp(name1,bBlock1);
@@ -1905,7 +1930,7 @@
           appendExpression(exp_list_exp,arg2);
         }
  //&gi for reduction variables from higher scope or for all orphaned case
-      else if (((ompattribute->isOrphaned==false)&&(currentscope>varscope))||\
+      else if (((ompattribute->isOrphaned==false)&&(ASTtools::isAncester(varscope,currentscope)))||\
 		(ompattribute->isOrphaned==true))
         {
          SgName varName2(myname.getString());
@@ -2237,7 +2262,8 @@
         SgName varname1_name(myname.getString()); 
         SgName initname2_name("_pp_"+myname.getString());
 
-      if (varscope<currentscope)  
+//      if (varscope<currentscope)  
+      if (ASTtools::isAncester(varscope,currentscope))  
       {   
         // reusing initname directly will have weird behavior during runtime.
         // so build varname1 from scratch!!

Deleted: branches/testonly/projects/arrayOptimization/ArrayAnnot.C
===================================================================
--- branches/testonly/projects/arrayOptimization/ArrayAnnot.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/arrayOptimization/ArrayAnnot.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,492 +0,0 @@
-#include <ArrayAnnot.h>
-#include <fstream>
-#include <CommandOptions.h>
-#include <iostream>
-
-bool DebugArrayAnnot()
-{
-  static int r = 0;
-  if (r == 0) {
-     if (CmdOptions::GetInstance()->HasOption("-debugarrayannot"))
-         r = 1;
-     else
-         r = -1;
-  }
-  return r == 1;
-}
-
-
-bool ArrayShapeDescriptor:: get_dimension( int& val) const
-{ 
-   SymbolicVal dimval = dimension.get_val();
-   return dimval.isConstInt( val);
-}
-
-
-bool ArrayShapeDescriptor::read( std::istream& in)
-{
-  return ReadContainer<ArrayShapeDescriptor, ReadSymbolicFunctionDeclaration,
-                        ';', '{','}'>::
-    read(*this, in);
-}
-
-bool ArrayElemDescriptor::read( std::istream& in)
-{
-  return ReadContainer<ArrayElemDescriptor, ReadSymbolicFunctionDeclaration,';', '{','}'>::
-    read(*this, in);
-}
-
-bool ArrayDescriptor::read( std::istream& in)
-{
-  return ReadContainer<ArrayDescriptor, ReadSymbolicFunctionDeclaration,';', '{','}'>::
-    read(*this, in);
-}
-
-void ArrayShapeDescriptor:: push_back( const ReadSymbolicFunctionDeclaration& cur)
-  {
-    std::string annot = cur.first.first;
-    if (annot == "dimension") {
-        assert(cur.first.second.size() == 0);
-        dimension = cur.second;
-    }
-    else if (annot == "length") {
-        length.push_back( SymbolicFunctionDeclaration( cur.first.second, cur.second) );
-    }
-    else {
-      std::cerr << "Error: non-recognized annotation: " << annot << std::endl;
-      assert(false);
-    }
-  }
-
-void ArrayElemDescriptor:: push_back( const ReadSymbolicFunctionDeclaration& cur)
-{
-  std::string annot = cur.first.first;
-  if (annot == "elem") {
-    elem.push_back( SymbolicFunctionDeclaration( cur.first.second, cur.second) );
-  }
-  else{
-      std::cerr << "Error: non-recognized annotation: " << annot << std::endl;
-      assert(false);
-    }
-
-}
-  
-void ArrayDescriptor:: push_back( const ReadSymbolicFunctionDeclaration& cur)
-{
-  std::string annot = cur.first.first;
-  if (annot == "elem") {
-     ArrayElemDescriptor::push_back( cur);
-  }
-  else 
-    ArrayShapeDescriptor::push_back(cur) ;
-}
-void ArrayShapeDescriptor::write( std::ostream& out) const
-{
-  out << "dimension=";
-  dimension.write(out); 
-  out << ";  length=" ;
-  length.write(out);
-}
-
-void ArrayShapeDescriptor :: Dump() const
-{
-  write(std::cerr);
-}
-
-void ArrayElemDescriptor::write( std::ostream& out) const
-{
-  out << ";  elem=";
-  elem.write(out);
-}
-
-void ArrayElemDescriptor :: Dump() const
-{
-  write(std::cerr);
-}
-
-void ArrayDescriptor::write( std::ostream& out) const
-{
-  out << "{";
-  ArrayShapeDescriptor::write(out);
-  ArrayElemDescriptor::write(out);
-  out << " } ";
-}
-
-void ArrayDescriptor :: Dump() const
-{
-  write(std::cerr);
-}
-
-void ArrayDefineDescriptor ::
-replace_var(  const std::string& varname, const SymbolicVal& repl)
-{ 
-  ArrayDescriptor::replace_var( varname, repl);
-  reshape.replace_var( varname, repl);
-}
-
-void ArrayDefineDescriptor ::
-replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
-{ 
-  ArrayDescriptor :: replace_val(repl);
-  reshape.replace_val(repl);
-}
-
-void ArrayDefineDescriptor::push_back( const ReadSymbolicFunctionDeclaration& cur)
-{
-  std::string annot = cur.first.first;
-  if (annot == "reshape")  {
-    if ( cur.first.second.size() > 1) {
-      cur.Dump();
-      assert(false);
-    }
-    reshape.push_back( SymbolicFunctionDeclaration( cur.first.second, cur.second) );
-  }
-  else
-     ArrayDescriptor::push_back(cur);
-}
-
-bool ArrayDefineDescriptor :: read( std::istream& in)
-{
-  return ReadContainer< ArrayDefineDescriptor, ReadSymbolicFunctionDeclaration,';', '{','}'>::
-               read(*this, in);
-}
-
-void ArrayDefineDescriptor :: write( std::ostream& out) const
-{ 
-  ArrayDescriptor::write(out);
-  out << "reshape = ";
-  reshape.write(out);
-}
-
-void ArrayDefineDescriptor :: Dump() const
-{
-  write(std::cerr);
-}
-
-
-bool ArrayOptDescriptor :: read( std::istream& in)
-{
-  read_ch(in, '{');
-  if (peek_id(in) == "define") { 
-     read_id(in,"define");
-     defs.read(in);
-  }
-  return ReadContainer< ArrayDescriptor, ReadSymbolicFunctionDeclaration,';', 0,'}'>::
-               read(*this, in);
-}
-
-void ArrayOptDescriptor :: write( std::ostream& out) const
-{ 
-  defs.write(out);
-  ArrayDescriptor::write(out);
-}
-
-void ArrayOptDescriptor :: 
-replace_var(  const std::string& varname, const SymbolicVal& repl)
-{ 
-  ArrayDescriptor::replace_var( varname, repl);
-  for (DefContainer::iterator p = defs.begin();
-       p != defs.end(); ++p) {
-    DefineVariableDescriptor& cur = *p;
-    cur.replace_var(varname, repl);
-  }
-}
-
-void ArrayOptDescriptor :: 
-replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
-{ 
-  ArrayDescriptor :: replace_val(repl);
-  for (DefContainer::iterator p = defs.begin();
-       p != defs.end(); ++p) {
-    DefineVariableDescriptor& cur = *p;
-    cur.replace_val(repl);
-  }
-}
-
-void ArrayOptDescriptor :: Dump() const
-{
-  write(std::cerr);
-}
-
-ArrayAnnotation* ArrayAnnotation::inst = 0;
-ArrayAnnotation* ArrayAnnotation::get_inst()
-{
-  if (inst == 0)
-    inst = new ArrayAnnotation();
-  return inst;
-}
-
-void ArrayAnnotation:: register_annot()
-{
-   OperatorSideEffectAnnotation::get_inst()->register_annot();
-   OperatorInlineAnnotation::get_inst()->register_annot();
-   OperatorAliasAnnotation::get_inst()->register_annot();
-   ValueAnnotation::get_inst()->register_annot();
-   ReadAnnotation* op = ReadAnnotation::get_inst();
-   op->add_TypeCollection(&arrays);
-   op->add_TypeCollection(&arrayopt);
-   op->add_OperatorCollection(&arrayConstruct);
-   op->add_OperatorCollection(&arrayModify);
-}
-
-void ArrayAnnotation :: Dump() const
-{
-   OperatorSideEffectAnnotation::get_inst()->Dump();
-   OperatorAliasAnnotation::get_inst()->Dump();
-   ValueAnnotation::get_inst()->Dump();
-   arrays.Dump();
-   arrayopt.Dump();
-   arrayConstruct.Dump();
-   arrayModify.Dump();
-}
-
-bool ArrayAnnotation ::
-known_array_type( CPPAstInterface& fa, const AstNodeType& type, ArrayDefineDescriptor* r)
-{
-  return arrays.known_type( fa, type, r);
-}
-
-bool ArrayAnnotation ::
-known_array( CPPAstInterface& fa, const AstNodePtr& array, ArrayDefineDescriptor* r)
-{
-  return arrays.known_type( fa, array, r);
-}
-
-bool ArrayAnnotation ::
-has_array_opt( CPPAstInterface& fa, const AstNodePtr array, ArrayOptDescriptor* r)
-{
-  return arrayopt.known_type( fa, array, r);
-}
-
-bool ArrayAnnotation::
-is_array_mod_op( CPPAstInterface& fa, const AstNodePtr& arrayExp,
-                 AstNodePtr* arrayp, ArrayDescriptor* descp, bool* reshape,
-                 ReplaceParams* repl)
-{
-  CPPAstInterface::AstNodeList args;
-  ArrayModifyDescriptor desc;
-  if (!arrayModify.known_operator( fa, arrayExp, &args, &desc, true)) {
-     if (DebugArrayAnnot()) {
-        std::cerr << "NOT mod-array operator: ";
-        std::cerr << AstToString(arrayExp);
-        std::cerr << std::endl;
-     }
-    return false;
-  }
-
-  if (arrayp != 0) {
-    if (!desc.first.get_val().isAstWrap(*arrayp))
-       assert( false);
-  }
-  if (descp != 0) {
-    *descp = desc.second;
-  }
-
-  if (reshape != 0) {
-    *reshape = !desc.second.get_dimension().is_top() || desc.second.get_length().size();
-  }
-
-  if (DebugArrayAnnot()) {
-     std::cerr << "recognized mod-array operator: ";
-     std::cerr << AstToString(arrayExp);
-     std::cerr << std::endl;
-
-     return true;
-  }
-  return true;
-}
-
-bool ArrayAnnotation::
-is_array_construct_op( CPPAstInterface& fa, const AstNodePtr& arrayExp, CPPAstInterface::AstNodeList* alias,
-                       ArrayDescriptor* descp, ReplaceParams* repl)
-{
-  CPPAstInterface::AstNodeList args;
-  ArrayConstructDescriptor desc;
-  if (!arrayConstruct.known_operator( fa, arrayExp, &args, &desc, true))
-    return false;
-
-  if (descp != 0) {
-    *descp = desc.second;
-  }
-  if (alias != 0) {
-    for (std::list<SymbolicValDescriptor>::const_iterator p = desc.first.begin(); 
-         p != desc.first.end(); ++p) {
-       SymbolicValDescriptor cur = *p;
-       AstNodePtr curarg;
-       if (!cur.get_val().isAstWrap(curarg))
-           assert(false);
-       alias->push_back(curarg);
-    }
-  }
-  return true;
-}
-
-AstNodePtr ArrayAnnotation::
-create_access_array_elem( CPPAstInterface& fa, const AstNodePtr& array,
-			  const AstInterface::AstNodeList& args)
-{
-  return arrays.create_known_member_function( fa, array, "elem", args);
-}
-
-SymbolicVal  ArrayAnnotation ::
-create_access_array_elem( const AstNodePtr& array, const SymbolicFunction::Arguments& args)
-{
-  return arrays.create_known_member_function( array, "elem", args);
-}
-
-AstNodePtr ArrayAnnotation ::
-create_reshape_array( CPPAstInterface& fa, const AstNodePtr& array,
-			  const CPPAstInterface::AstNodeList& args)
-{
-  return arrays.create_known_member_function( fa, array, "reshape", args);
-}
-
-SymbolicVal ArrayAnnotation::
-create_access_array_length( const AstNodePtr& array, const SymbolicVal& dim)
-{
-  SymbolicFunction::Arguments args;
-  args.push_back( dim);
-  return arrays.create_known_member_function( array, "length", args);
-}
-
-AstNodePtr ArrayAnnotation::
-create_access_array_length( CPPAstInterface& fa, const AstNodePtr& array, 
-			    int dim)
-{
-  CPPAstInterface::AstNodeList args;
-  args.push_back( fa.CreateConstInt(dim));
-  return arrays.create_known_member_function( fa, array, "length", args);
-}
-
-bool ArrayAnnotation ::
-is_access_array_length( CPPAstInterface& fa, const SymbolicVal& orig, 
-                         AstNodePtr* arrayp, SymbolicVal *dim)
-{
-  SymbolicFunction::Arguments args;
-  if (arrays.is_known_member_function( fa,orig, arrayp, &args) == "length") {
-     assert(args.size() == 1);
-     if (dim != 0)
-        *dim = args.front();
-     return true;
-  }
-  return false;
-}
-//! Check if a node is a known member function of an array to access the length of one dimension
-// If true, return the array node 'arrayp', function parameter 'dimAst', 
-// and the integer value of the prameter 'dim'
-bool ArrayAnnotation ::
-is_access_array_length( CPPAstInterface& fa, const AstNodePtr& orig, AstNodePtr* arrayp,
-                        AstNodePtr* dimAst, int *dim)
-{
-   CPPAstInterface::AstNodeList args;
-   if (arrays.is_known_member_function( fa, orig, arrayp, &args) == "length") {
-      assert (args.size() == 1);
-      AstNodePtr cur = *args.begin();
-      if (dimAst != 0)
-            *dimAst = cur;
-      if (dim != 0) {
-          if (!fa.IsConstInt(cur, dim))
-              assert(false);
-      }
-      return true;
-   }
-   return false;
-}
-
-bool ArrayAnnotation ::
-is_access_array_elem( CPPAstInterface& fa, const SymbolicVal& orig, AstNodePtr* array, SymbolicFunction::Arguments* args)
-{
-  if (arrays.is_known_member_function( fa, orig, array, args) == "elem") {
-    return true;
-  }
-  return false;
-}
-
-bool ArrayAnnotation ::
-is_access_array_elem( CPPAstInterface& fa, const AstNodePtr& orig, 
-                      AstNodePtr* arrayp,
-                      CPPAstInterface::AstNodeList* args)
-{
-  if (arrays.is_known_member_function( fa, orig, arrayp, args) == "elem") {
-    return true;
-  }
-  return false;
-}
-
-bool ArrayAnnotation ::
-is_reshape_array( CPPAstInterface& fa, const AstNodePtr& orig, 
-                  AstNodePtr* arrayp,
-                  CPPAstInterface::AstNodeList* args)
-{
-  return arrays.is_known_member_function( fa, orig, arrayp, args) == "reshape" ;
-}
-
-bool ArrayAnnotation ::
-may_alias(AstInterface& _fa, const AstNodePtr& fc, const AstNodePtr& result,
-                         CollectObject< std::pair<AstNodePtr, int> >& collectalias)
-{
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-  if (is_access_array_elem( fa, fc) || is_access_array_length(fa, fc) ||
-      is_reshape_array( fa, fc))
-      return true;
-  return OperatorAliasAnnotation::get_inst()->may_alias(fa, fc, result, collectalias);
-}
-
-bool ArrayAnnotation ::
-allow_alias(AstInterface& fa, const AstNodePtr& fc, 
-                         CollectObject< std::pair<AstNodePtr, int> >& collectalias)
-{
-  return OperatorAliasAnnotation::get_inst()->allow_alias(fa, fc, collectalias);
-}
-
-bool ArrayAnnotation ::
-get_modify(AstInterface& _fa, const AstNodePtr& fc,
-                               CollectObject<AstNodePtr>* collect)
-{
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-   if ( is_access_array_elem(fa, fc) || is_access_array_length(fa, fc)) 
-      return true;
-   AstNodePtr array;
-   if (is_reshape_array( fa,fc, &array)) {
-      if (collect != 0)
-         (*collect)(array);
-      return true;
-   } 
-   return OperatorSideEffectAnnotation::get_inst()->get_modify(fa, fc, collect);
-}
-
-bool ArrayAnnotation ::
-get_read(AstInterface& _fa, const AstNodePtr& fc, CollectObject<AstNodePtr>* collect)
-{
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-   AstNodePtr dim;
-   if (is_access_array_length( fa, fc, 0, &dim)) {
-       if (collect != 0)
-           (*collect)(dim);
-       return true;
-   }
-   CPPAstInterface::AstNodeList args;
-   if (is_access_array_elem( fa, fc, 0, &args)) {
-      if (collect != 0) {
-           for (CPPAstInterface::AstNodeList::iterator p = args.begin();
-                  p != args.end(); ++p) 
-              (*collect)(*p);
-      }
-      return true;
-   }
-   return OperatorSideEffectAnnotation::get_inst()->get_read(fa, fc, collect);
-}
-
-
-#define TEMPLATE_ONLY
-#include <TypeAnnotation.C>
-#include <OperatorDescriptors.C>
-template class TypeCollection<ArrayModifyDescriptor>;
-template class TypeCollection<ArrayConstructDescriptor>;
-template class OperatorAnnotCollection<ArrayModifyDescriptor>;
-template class OperatorAnnotCollection<ArrayConstructDescriptor>;
-template class TypeAnnotCollection<ArrayDefineDescriptor>;
-template class TypeAnnotCollection<ArrayOptDescriptor>;
-#include <AnnotDescriptors.C>
-template class CollectPair<TypeDescriptor, ArrayDescriptor, 0>;
-

Deleted: branches/testonly/projects/arrayOptimization/ArrayAnnot.h
===================================================================
--- branches/testonly/projects/arrayOptimization/ArrayAnnot.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/arrayOptimization/ArrayAnnot.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,284 +0,0 @@
-#ifndef ARRAY_ANNOT_H
-#define ARRAY_ANNOT_H
-
-#include <AnnotExpr.h>
-#include <AnnotCollect.h>
-#include <OperatorDescriptors.h>
-#include <CPPAnnotation.h>
-#include <ValuePropagate.h>
-#include <list>
-
-
-class ArrayShapeDescriptor {
-  SymbolicValDescriptor dimension;
-  SymbolicFunctionDeclarationGroup length;
- public:
-  void push_back( const ReadSymbolicFunctionDeclaration& cur);
-  void write(std::ostream& out) const;
-  void Dump() const;
-  bool read( std::istream& in);
-
-  const SymbolicValDescriptor& get_dimension() const { return dimension; }
-  SymbolicValDescriptor& get_dimension() { return dimension; }
-  bool get_dimension( int& val) const ;
-
-  void set_length( const SymbolicFunctionDeclarationGroup v) { length = v; }
-  SymbolicFunctionDeclarationGroup get_length() const { return length; }
-  bool get_length( int dim, SymbolicVal& result) const 
-    {
-       std::vector<SymbolicVal> args;
-       args.push_back( SymbolicConst(dim));
-       return length.get_val(args, result);
-    }
-
-  void replace_var(  const std::string& varname, const SymbolicVal& repl)
-   { 
-     dimension.replace_var( varname, repl);
-     length.replace_var(varname, repl);
-   }
-  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
-   { 
-     dimension.replace_val(repl);
-     length.replace_val(repl);
-   }
-};
-
-class ArrayElemDescriptor 
-{
-  SymbolicFunctionDeclarationGroup elem;
- public:
-  void push_back( const ReadSymbolicFunctionDeclaration& cur);
-  void Dump() const;
-  void write(std::ostream& out) const;
-  bool read(std::istream& in);
-  void replace_var(  const std::string& varname, const SymbolicVal& repl)
-   { 
-     elem.replace_var( varname, repl);
-   }
-  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
-   { 
-     elem.replace_val(repl);
-   }
-
-  const SymbolicFunctionDeclarationGroup& get_elem()  const { return elem; }
-};
-
-class ArrayDescriptor 
-: public ArrayShapeDescriptor, public ArrayElemDescriptor
-{
- public:
-  void push_back( const ReadSymbolicFunctionDeclaration& cur);
-  bool read( std::istream& in) ;
-  void write(std::ostream& out) const;
-  void Dump() const;
-  void replace_var(  const std::string& varname, const SymbolicVal& repl)
-   { 
-     ArrayShapeDescriptor::replace_var( varname, repl);
-     ArrayElemDescriptor::replace_var( varname, repl);
-   }
-  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
-   { 
-     ArrayShapeDescriptor :: replace_val(repl);
-     ArrayElemDescriptor :: replace_val(repl);
-   }
-};
-
-class ArrayDefineDescriptor : public ArrayDescriptor
-{
-  SymbolicFunctionDeclarationGroup reshape;
- public:
-  void push_back( const ReadSymbolicFunctionDeclaration& cur);
-  bool read( std::istream& in) ;
-  void write(std::ostream& out) const;
-  void Dump() const;
-  void replace_var(  const std::string& varname, const SymbolicVal& repl);
-  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl);
-
-  SymbolicFunctionDeclarationGroup get_reshape() const 
-    {
-      return reshape;
-    }
-  
-};
-
-class ArrayOptDescriptor : public ArrayDescriptor
-{
-  typedef ContainerDescriptor <std::list<DefineVariableDescriptor>, 
-                               DefineVariableDescriptor, ';', '{', '}'> DefContainer;
-  DefContainer defs;
- public:
-  typedef std::list<DefineVariableDescriptor>::iterator InitVarIterator;
-  
-  InitVarIterator init_var_begin() 
-    {
-      return defs.begin();
-    }
-  InitVarIterator init_var_end()
-    {
-      return defs.end();
-    }
-  
-      
-
-  bool read( std::istream& in) ;
-  void write(std::ostream& out) const;
-  void Dump() const;
-  void replace_var(  const std::string& varname, const SymbolicVal& repl);
-  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl);
-};
-
-class ArrayConstructDescriptor 
-: public OPDescriptorTemp
-          < CollectPair< ContainerDescriptor<std::list<SymbolicValDescriptor>,
-                                             SymbolicValDescriptor, ',', '(', ')'>,
-                         ArrayDescriptor, 0 > >
-{
-  typedef OPDescriptorTemp
-          < CollectPair< ContainerDescriptor<std::list<SymbolicValDescriptor>, 
-                                             SymbolicValDescriptor, ',', '(', ')'>,
-                         ArrayDescriptor, 0 > 
-          > BaseClass;
- public:
-  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
-   {
-     for (std::list<SymbolicValDescriptor>::iterator p = first.begin(); p != first.end(); ++p) { 
-         (*p).replace_val(repl);
-     }
-     second.replace_val(repl);
-   }
-};
-
-class ArrayModifyDescriptor : 
-public OPDescriptorTemp < CollectPair< CloseDescriptor<SymbolicValDescriptor, '(', ')'>, 
-                         ArrayDescriptor,0> > 
-{
-  typedef OPDescriptorTemp
-    < CollectPair< CloseDescriptor<NameDescriptor, '(', ')'>, 
-                         ArrayDescriptor,0> >  BaseClass;
- public:
-  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
-   {
-     first.replace_val(repl);
-     second.replace_val(repl);
-   }
-};
-
-class ArrayCollection 
-  : public TypeAnnotCollection< ArrayDefineDescriptor>,
-    public CPPTypeCollection< ArrayDefineDescriptor>
-{
-   typedef TypeAnnotCollection< ArrayDefineDescriptor > BaseClass;
-  virtual bool read_annot_name( const std::string& annotName) const 
-    { return annotName == "array"; }
- public:
-  ArrayCollection() : CPPTypeCollection<ArrayDefineDescriptor>(this) {}
-  void Dump() const 
-    { std::cerr << "arrays: \n"; BaseClass::Dump(); }
-};
-
-class ArrayOptCollection : public TypeAnnotCollection< ArrayOptDescriptor>
-{
-  typedef TypeAnnotCollection< ArrayOptDescriptor > BaseClass;
-  virtual bool read_annot_name( const std::string& annotName) const 
-    { return annotName == "array_optimize"; }
- public:
-  void Dump() const 
-    { std::cerr << "array optimizations: \n"; BaseClass::Dump(); }
-};
-
-class ArrayConstructOpCollection
-: public OperatorAnnotCollection<ArrayConstructDescriptor>
-{
-  virtual bool read_annot_name( const std::string& annotName) const
-    { return annotName == "construct_array"; }
- public:
-  void Dump() const
-    {
-      std::cerr << "construct_array: \n";
-      OperatorAnnotCollection<ArrayConstructDescriptor>::Dump();
-    }
-};
-
-class ArrayModifyOpCollection : public OperatorAnnotCollection<ArrayModifyDescriptor>
-{
-  virtual bool read_annot_name( const std::string& annotName) const
-    { return annotName == "modify_array"; }
- public:
-  void Dump() const
-    { 
-      std::cerr << "modify_array: \n"; 
-      OperatorAnnotCollection<ArrayModifyDescriptor>::Dump(); 
-    }
-};
-//! Array annotations contains semantics for 
-// * types/classes:    array attributes: dimension, length, 
-// * operators/functions: side effects such as mod/read; and alias information
-// Please refer to the following paper for details
-// Yi, Qing, and Dan Quinlan, \u201cApplying Loop Optimizations to Object-oriented Abstractions
-// Through General Classification of Array Semantics\u201d, the 17th International Workshop on
-// Languages and Compilers for Parallel Computing, West Lafayette, Indiana, USA. Sep. 2004.
-class ArrayAnnotation 
-    : public FunctionSideEffectInterface,
-      public FunctionAliasInterface
-{
-  //map <std::string, OperatorDeclaration> decl;
-  ArrayCollection arrays;
-  ArrayOptCollection arrayopt;
-  ArrayModifyOpCollection arrayModify;
-  ArrayConstructOpCollection arrayConstruct;
-  
-  static ArrayAnnotation* inst;
-
-  virtual bool may_alias(AstInterface& fa, const AstNodePtr& fc, 
-                         const AstNodePtr& result,
-                         CollectObject< std::pair<AstNodePtr, int> >& collectalias);
-  virtual bool allow_alias(AstInterface& fa, const AstNodePtr& fc, 
-                         CollectObject< std::pair<AstNodePtr, int> >& collectalias);
-  virtual bool get_modify(AstInterface& fa, const AstNodePtr& fc,
-                               CollectObject<AstNodePtr>* collect = 0);
-  virtual bool get_read(AstInterface& fa, const AstNodePtr& fc,
-                               CollectObject<AstNodePtr>* collect = 0);
-  ArrayAnnotation() {}
- public:
-  static ArrayAnnotation* get_inst();
-
-  void register_annot(); 
-  void Dump() const;
-
-  bool known_array( CPPAstInterface& fa, const AstNodePtr& array, ArrayDefineDescriptor* d = 0);
-  bool known_array_type(CPPAstInterface& fa,  const AstNodeType& array, ArrayDefineDescriptor* d = 0);
-  bool has_array_opt( CPPAstInterface& fa, const AstNodePtr array, ArrayOptDescriptor* d = 0);
-
-  bool is_array_mod_op( CPPAstInterface& fa, const AstNodePtr& arrayExp,
-                        AstNodePtr* modArray = 0, ArrayDescriptor* desc = 0, 
-                        bool* reshapeArray = 0, ReplaceParams* repl = 0);
-  bool is_array_construct_op( CPPAstInterface& fa, const AstNodePtr& arrayExp,
-                              CPPAstInterface::AstNodeList* alias = 0,
-                              ArrayDescriptor* desc = 0, ReplaceParams* repl = 0);
-  //! Check if a node 'orig' is a reference to an array element
-  // If true, return the array node 'array', and the list of subscripts 'args'
-  bool is_access_array_elem( CPPAstInterface& fa, const AstNodePtr& orig,
-                          AstNodePtr* array=0, CPPAstInterface::AstNodeList* args=0);
-  bool is_access_array_length( CPPAstInterface& fa, const AstNodePtr& orig,
-                            AstNodePtr* array=0, AstNodePtr* dimast = 0, int* dim =0);
-  bool is_access_array_elem( CPPAstInterface& fa, const SymbolicVal& orig,
-                    AstNodePtr* array=0, SymbolicFunction::Arguments* args=0);
-  bool is_access_array_length( CPPAstInterface& fa, const SymbolicVal& orig, AstNodePtr* array=0, SymbolicVal *dim = 0);
-
-  SymbolicVal create_access_array_elem( const AstNodePtr& array, 
-                           const SymbolicFunction::Arguments& args);
-  SymbolicVal create_access_array_length( const AstNodePtr& array, const SymbolicVal& dim);
-  AstNodePtr create_access_array_elem( CPPAstInterface& fa, 
-                                        const AstNodePtr& array,
-				  const CPPAstInterface::AstNodeList& args);
-  AstNodePtr create_access_array_length( CPPAstInterface& fa, const AstNodePtr& array, 
-					 int dim);
-
-  bool is_reshape_array( CPPAstInterface& fa, const AstNodePtr& orig,
-			AstNodePtr* array=0, CPPAstInterface::AstNodeList* args=0);
-  AstNodePtr create_reshape_array( CPPAstInterface& fa, const AstNodePtr& array,
-				  const CPPAstInterface::AstNodeList& args);
-};
-
-#endif
-

Deleted: branches/testonly/projects/arrayOptimization/ArrayInterface.C
===================================================================
--- branches/testonly/projects/arrayOptimization/ArrayInterface.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/arrayOptimization/ArrayInterface.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,482 +0,0 @@
-#include <ArrayInterface.h>
-#include <CPPAstInterface.h>
-
-extern bool DebugAliasAnal();
-
-void ArrayInterface::
-initialize( AstInterface& fa, const AstNodePtr& h)
-{
-   aliasCollect(fa, h);
-   valueCollect.build( fa, h, *this, ArrayAnnotation::get_inst());
-}
-
-void ArrayInterface::observe( AstInterface& fa) 
-{
-  fa.AttachObserver( &valueCollect.get_value_map());
-  fa.AttachObserver(this);
-}
-
-void ArrayInterface::
-ObserveCopyAst( AstInterfaceImpl& fa, const AstNodePtr& orig, const AstNodePtr& copy)
-{
-  std::map <AstNodePtr, int>::const_iterator p1 = dimmap.find(orig);
-  if (p1 != dimmap.end())
-    dimmap[copy] = (*p1).second;
-  std::map <AstNodePtr, SymbolicFunctionDeclarationGroup>::const_iterator p2 = lenmap.find(orig);
-  if (p2 != lenmap.end())
-    lenmap[copy] = (*p2).second;
-}
-
-void ArrayInterface :: 
-stop_observe( AstInterface& fa) 
-{
-  fa.DetachObserver( &valueCollect.get_value_map());
-  fa.DetachObserver(this);
-}
-
-bool ArrayInterface ::
-may_alias(AstInterface& _fa, const AstNodePtr& r1, const AstNodePtr& r2)
-{
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-  AstNodePtr array1, array2;
-  ArrayAnnotation* annot = ArrayAnnotation::get_inst();
-  bool elem1 = annot->is_access_array_elem( fa, r1, &array1) ;
-  bool len1 = annot->is_access_array_length( fa, r1, &array1);
-  bool elem2 = annot->is_access_array_elem( fa, r2, &array2);
-  bool len2 = annot->is_access_array_length( fa, r2, &array2);
-
-  if ( (elem1 && len2) || (len1 && elem2))  {
-     return false;
-  } 
-  else if ( (elem1 && elem2)  || (len1 && len2)) {
-     if (may_alias(fa, array1, array2)) {
-        if (DebugAliasAnal())
-            std::cerr << "has alias between " << AstToString(r1) << " and " << AstToString(r2) << std::endl;
-        return true;
-     }
-  }
-  else if (elem1 || len1) {
-     if (may_alias(fa, array1, r2)) {
-        if (DebugAliasAnal())
-            std::cerr << "has alias between " << AstToString(r1) << " and " << AstToString(r2) << std::endl;
-        return true;
-     }
-  }
-  else if (elem2 || len2) {
-     if (may_alias(fa, r1, array2)) {
-        if (DebugAliasAnal())
-            std::cerr << "has alias between " << AstToString(r1) << " and " << AstToString(r2) << std::endl;
-        return true;
-     }
-  }
-  else {
-     AstInterface::AstNodeList args;
-     if (annot->is_array_construct_op( fa, r1, &args)) {
-        for (AstInterface::AstNodeList::iterator p = args.begin();
-             p != args.end(); ++p) {
-          AstNodePtr cur = *p;
-          if (may_alias( fa, cur, r2)) {
-            if (DebugAliasAnal())
-               std::cerr << "has alias between " << AstToString(r1) << " and " << AstToString(r2) << std::endl;
-             return true;
-          }
-        }
-        return false;    
-     }
-     else if (annot->is_array_construct_op( fa, r2, &args)) {
-        for (AstInterface::AstNodeList::iterator p = args.begin();
-             p != args.end(); ++p) {
-          AstNodePtr cur = *p;
-          if (may_alias( fa, cur, r1)) {
-            if (DebugAliasAnal())
-               std::cerr << "has alias between " << AstToString(r1) << " and " << AstToString(r2) << std::endl;
-             return true;
-          }
-        }
-        return false;
-     }
-     return aliasCollect.may_alias( fa, r1, r2);
-  }
-  return false;
-}
-
-bool ArrayInterface::
-get_array_opt(CPPAstInterface& fa, const AstNodePtr& array, ArrayOptDescriptor& r)
-{
-  std::string name;
-  if (!fa.IsVarRef(array, 0, &name))
-    return false;
-  
-  std::map <std::string, ArrayOptDescriptor>::const_iterator p = optmap.find(name);
-  if (p != optmap.end()) 
-  {
-    r = (*p).second;
-    return true;
-  }
-  ArrayOptDescriptor desc;
-  if (!ArrayAnnotation::get_inst()->has_array_opt( fa, array, &desc))
-    return false;
-  
-  for (ArrayOptDescriptor::InitVarIterator p = desc.init_var_begin();
-       p != desc.init_var_end(); ++p) {
-    DefineVariableDescriptor& cur = *p;
-    ExtendibleParamDescriptor &par = cur.get_var();
-    std::string parname = par.get_param_name();
-    par.get_param() = SymbolicVar( name + parname, AST_NULL);
-    SymbolicVal newpar = new SymbolicVar(name + parname, AST_NULL);
-    desc.replace_var(parname, newpar);
-  }
-  optmap[name] = desc;
-  r = desc;
-  return true;
-}
-  
-void ArrayInterface ::
-set_array_dimension( const AstNodePtr& arrayexp, int dim)
-{
-  std::map <AstNodePtr, int>::const_iterator p = dimmap.find(arrayexp);
-  if (p != dimmap.end()) {
-     int olddim = (*p).second;
-     assert(olddim == dim);
-  }
-  else
-     dimmap[arrayexp] = dim;
-}
-
-bool ArrayInterface :: 
-is_array_exp( CPPAstInterface& fa, const AstNodePtr& array, 
-	      int *dimp, SymbolicFunctionDeclarationGroup *lenp, bool *changep)
-{
-  ArrayDefineDescriptor desc;
-  if (!ArrayAnnotation::get_inst()->known_array( fa, array, &desc))
-    return false;
-  if (lenp != 0) 
-  {
-    std::map <AstNodePtr, SymbolicFunctionDeclarationGroup>::const_iterator p = lenmap.find(array);
-    if (p != lenmap.end()) 
-    {
-      *lenp = (*p).second;
-      lenp = 0;
-    }
-  }
-  int dim=0;
-  if (dimp != 0 || lenp != 0) 
-  {
-    std::map <AstNodePtr, int>::const_iterator p = dimmap.find(array);
-    if (p != dimmap.end()) 
-    {
-      dim = (*p).second;
-      if (dimp != 0) {
-         *dimp = dim;
-         dimp = 0;
-      }
-    }
-  }
-  if (dimp == 0 && lenp == 0) 
-  {
-    assert( changep == 0);
-    return true;
-  }
-    
-  if (changep != 0)
-    *changep = true;
-  HasValueDescriptor valdesc;
-  bool hasval =  valueCollect.known_value( array, &valdesc, changep);
-  if (changep != 0 && !fa.IsVarRef(array))
-    *changep = false; 
-    
-  if (dim == 0) 
-  {
-    SymbolicValDescriptor dimval;
-    if (!hasval || !valdesc.has_value("dimension", &dimval)  
-        || dimval.get_val().GetValType() != VAL_CONST 
-	|| dimval.get_val().GetTypeName() != "int")  {
-      dimval = desc.get_dimension();
-    }
-    if (!dimval.get_val().isConstInt(dim))
-        assert(false);
-    if (dimp != 0)
-      *dimp = dim;
-    dimmap[array] = dim;
-  }
-  if (lenp != 0) 
-  {
-    SymbolicFunctionDeclarationGroup len;
-    char buf[20];
-    for (int i = 0; i < dim; ++i) {
-      sprintf(buf, "length_%d", i);
-      SymbolicValDescriptor parval(i);
-      ExtendibleParamDescriptor par_i(parval);
-      SymbolicValDescriptor tmp;
-      if (hasval && valdesc.has_value( std::string(buf), &tmp)
-	  && !tmp.is_bottom() && !tmp.is_top()) 
-	len.push_back( SymbolicFunctionDeclaration( par_i, tmp));
-    }
-    len.insert(len.end(), lenp->begin(), lenp->end());
-    *lenp = len;
-    lenmap[array] = len;
-  }
-  return true;
-}
-
-bool ArrayInterface::
-is_array_mod_op( CPPAstInterface& fa, const AstNodePtr& arrayExp, AstNodePtr* arrayp, int *dimp, 
-		 SymbolicFunctionDeclarationGroup *len, SymbolicFunctionDeclarationGroup* elem, 
-		 bool *reshape)
-{
-  AstNodePtr array;
-  ArrayDescriptor desc;
-  if (!ArrayAnnotation::get_inst()->is_array_mod_op( fa, arrayExp, &array, &desc, reshape)) 
-    return false;
-  HasValueMapReplace repl( fa, valueCollect.get_value_map(), true);
-  desc.replace_val(repl);
-
-  if (arrayp != 0)
-    *arrayp = array;
-
-  int dim = 0, dim1 = 0;
-  if (elem != 0 && dimp == 0)
-     dimp = &dim;
-  if ( dimp != 0 && desc.get_dimension(*dimp)) {
-      dim1 = *dimp;
-  }
-  if (len != 0)
-    *len = desc.get_length();
-  if (dimp != 0 || len != 0) 
-  {
-    if (!is_array_exp( fa, array, dimp, len, reshape))
-      assert(false);
-    if (dimp != 0 && dim1 != 0 && *dimp > dim1)
-       *dimp = dim1;
-  }
-  else
-    assert( reshape == 0);
-  if (elem != 0) {
-    assert( dimp != 0);
-    *elem = desc.get_elem();
-    elem->replace_var("dimension", *dimp);
-  }
-  return true;
-}
-
-bool ArrayInterface::
-is_array_construct_op( CPPAstInterface& fa, const AstNodePtr& arrayExp, 
-                       AstInterface::AstNodeList* alias,int *dimp, 
- 			      SymbolicFunctionDeclarationGroup *len, SymbolicFunctionDeclarationGroup* elem)
-{
-  ArrayDescriptor desc;
-  if (ArrayAnnotation::get_inst()->is_array_construct_op( fa, arrayExp, alias, &desc) ) {
-    HasValueMapReplace repl( fa, valueCollect.get_value_map(), true);
-    desc.replace_val(repl);
-
-    int dim = 0, dim1 = 0;
-    if (elem != 0 && dimp == 0)
-       dimp = &dim;
-    if ( dimp != 0 && desc.get_dimension(*dimp)) {
-      dim1 = *dimp;
-    }
-
-    if (len != 0)
-      *len = desc.get_length();
-    if (dimp != 0 || len != 0)
-    {
-      if (!is_array_exp( fa, arrayExp, dimp, len))
-	assert(false);
-      if (dimp != 0 && dim1 != 0 && *dimp > dim1)
-        *dimp = dim1;
-    }
-    if (elem != 0)  {
-      assert( dimp != 0);
-      *elem = desc.get_elem();
-      elem->replace_var("dimension", *dimp);
-    }
-    return true;
-  } 
-  return false;
-}
-
-
-AstNodePtr ArrayInterface::
-impl_array_opt_init( CPPAstInterface& fa, const AstNodePtr& array, bool insertInit)
-{
-  ArrayOptDescriptor desc;
-
-  if (!get_array_opt( fa, array, desc))
-    return AST_NULL;  
-
-  int dim;
-  if (!is_array_exp( fa, array, &dim))
-    assert(false);
-  AstNodePtr result = insertInit? AST_NULL : fa.CreateBlock();
-  for (ArrayOptDescriptor::InitVarIterator p = desc.init_var_begin();
-       p != desc.init_var_end(); ++p) {
-    DefineVariableDescriptor& cur = *p;
-    cur.replace_var( "this", SymbolicAstWrap(array));
-    cur.replace_var( "dimension", dim);
-
-    const ExtendibleParamDescriptor& par = cur.get_var();
-    std::string extname = par.get_extend_var();
-    std::string parname = par.get_param_name();
-    int lb = -1, ub = -1;
-    par.get_extension( lb, ub);
-    std::string vartype = cur.get_var_type();
-    for (int i = lb; i <= ub; ++i) {
-      std::string varname = parname;
-      SymbolicValDescriptor initval = cur.get_var_init();
-      if (i >= 0) {
-	varname = SymbolicExtendVar::get_varname( varname, i);
-	initval.replace_var(extname, i); 
-      }
-      AstNodePtr init = initval.get_val().CodeGen(fa);
-      if (insertInit) {
-	std::string varname1 = fa.NewVar( fa.GetType(vartype), varname, false, AST_NULL, init);
-	assert( varname1 == varname);
-      }
-      else {
-	std::string varname1 = fa.NewVar( fa.GetType(vartype), varname);
-	assert( varname1 == varname);
-	AstNodePtr var = fa.CreateVarRef( varname);
-	AstNodePtr assign = fa.CreateAssignment( var, init);
-	fa.BlockAppendStmt(result, assign);
-      }
-    }
-  }
-  return result;
-}
-
-AstNodePtr ArrayInterface::
-impl_reshape_array( CPPAstInterface& fa, 
-		    const AstNodePtr& array,
-		    AstInterface::AstNodeList& ivarAst)
-{
-  ArrayDefineDescriptor desc;
-  if (!ArrayAnnotation::get_inst()->known_array( fa, array, &desc))
-    return AST_NULL;
-
-  SymbolicFunctionDeclarationGroup reshape = desc.get_reshape();
-  reshape.replace_var( "this", SymbolicAstWrap(array));
-  reshape.replace_var( "dimension", ivarAst.size());
-
-  AstNodePtr r;
-  if (!reshape.get_val( fa, ivarAst, r)) {
-     std::cerr << "Error: cannot extract value from reshape spec: \n";
-     reshape.write(std::cerr);
-     std::cerr << std::endl;
-     assert(false);
-  }
-  return r;
-}
-
-
-AstNodePtr ArrayInterface::
-impl_access_array_elem (CPPAstInterface& fa, const AstNodePtr& array,
-			   AstInterface::AstNodeList& ivarAst)
-{
-  SymbolicFunctionDeclarationGroup elem;
-
-  ArrayOptDescriptor desc;
-  if (get_array_opt(fa, array, desc)) 
-  {
-    elem = desc.get_elem();
-  }
-  else 
-  {
-    ArrayDefineDescriptor desc1;
-    if (!ArrayAnnotation::get_inst()->known_array( fa, array, &desc1))
-      assert(false);
-    elem = desc1.get_elem();
-  }
-  elem.replace_var("this", SymbolicAstWrap(array));
-  elem.replace_var( "dimension", ivarAst.size());
-  AstNodePtr r;
-  if (! elem.get_val(fa, ivarAst, r))
-     assert(false);
-  return r;
-}
-
-
-AstNodePtr ArrayInterface::
-impl_access_array_length( CPPAstInterface& fa, const AstNodePtr& array,
-			 int dim, int plus)
-{
-  SymbolicVal rval;
-  ArrayOptDescriptor desc;
-  if (get_array_opt(fa, array, desc)) 
-  {
-    if (!desc.get_length(dim, rval))
-      assert(false);
-    
-  }
-  else 
-  {
-    ArrayDefineDescriptor desc1;
-    if (!ArrayAnnotation::get_inst()->known_array( fa, array, &desc1))
-      return AST_NULL;
-    if (! desc1.get_length(dim, rval))
-      assert(false);
-  }
-  ReplaceVal(rval, SymbolicVar("this",AST_NULL), SymbolicAstWrap(array));
-  if (plus != 0)
-     rval = rval + plus;
-  return rval.CodeGen(fa);
-}
-
-bool ArrayInterface ::
-IsArray( CPPAstInterface& fa, const AstNodePtr& s)
-{ 
-  if ( ArrayAnnotation::get_inst()->known_array( fa, s))
-     return true;
-  return false;
-}
-
-bool ArrayInterface ::
-IsArrayRef( CPPAstInterface& fa, const AstNodePtr& t)
-{
-  if ( ArrayAnnotation::get_inst()->known_array_type(fa, fa.GetExpressionType(t)))
-     return true;
-  return false;
-}
-bool ArrayInterface :: 
-IsArrayAccess( AstInterface& _fa, const AstNodePtr& s, AstNodePtr* arrayp,
-                                 AstInterface::AstNodeList* index)
-{  
-   CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-   AstNodePtr array;
-   if ( ArrayAnnotation::get_inst()->is_access_array_elem( fa, s, &array, index)) {
-     if (arrayp != 0)
-        *arrayp = array; 
-     return true;
-   }
-   return false;
-}
-
-AstNodePtr ArrayInterface::
-CreateArrayAccess(AstInterface& _fa, const AstNodePtr& arr, 
-                          AstInterface::AstNodeList& index)
-{
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-  return impl_access_array_elem(  fa, arr, index); 
-}
-
-bool ArrayInterface ::
-GetArrayBound( AstInterface& _fa, const AstNodePtr& array,
-                                 int dim, int &lb, int &ub) 
-{ 
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-  SymbolicFunctionDeclarationGroup len;
-  if (!is_array_exp( fa, array, 0, &len))
-    assert(false);
-
-  std::vector<SymbolicVal> pars;
-  pars.push_back( SymbolicConst(dim));
-
-  SymbolicVal rval;
-  if (!len.get_val( pars, rval)) 
-     return false;
-  if (!rval.isConstInt(ub))
-     return false;
-  lb = 0;
-  return true;
-}
-
-

Deleted: branches/testonly/projects/arrayOptimization/ArrayInterface.h
===================================================================
--- branches/testonly/projects/arrayOptimization/ArrayInterface.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/arrayOptimization/ArrayInterface.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,62 +0,0 @@
-#ifndef ARRAY_INTERFACE_H
-#define ARRAY_INTERFACE_H
-
-#include <ArrayAnnot.h>
-#include <AstInterface.h>
-#include <StmtInfoCollect.h>
-#include <ValuePropagate.h>
-#include <LoopTransformInterface.h>
-
-class ArrayInterface 
-  : public AstObserver, public AliasAnalysisInterface, public ArrayAbstractionInterface
-{
-  StmtVarAliasCollect aliasCollect;
-  ValuePropagate valueCollect;
-  std::map <AstNodePtr, int> dimmap;
-  std::map <AstNodePtr, SymbolicFunctionDeclarationGroup> lenmap;
-  std::map <std::string, ArrayOptDescriptor> optmap;
-  void ObserveCopyAst( AstInterfaceImpl& fa, const AstNodePtr& orig, const AstNodePtr& copy);
-
-  virtual bool IsArrayRef( CPPAstInterface& fa, const AstNodePtr& t);
-  bool IsArray( CPPAstInterface& fa, const AstNodePtr& s) ;
-  virtual bool IsArrayAccess( AstInterface& fa,
-                                 const AstNodePtr& s, AstNodePtr* array = 0,
-                                 AstInterface::AstNodeList* index = 0) ;
-  virtual bool GetArrayBound( AstInterface& fa,
-                                 const AstNodePtr& array,
-                                 int dim, int &lb, int &ub) ;
-
-  virtual AstNodePtr CreateArrayAccess(AstInterface& fa, 
-                                       const AstNodePtr& arr, 
-                                       AstInterface::AstNodeList& index);
-  bool get_array_opt(CPPAstInterface& fa, const AstNodePtr& array, ArrayOptDescriptor& d);
- public:
-  ArrayInterface( ArrayAnnotation& a) : aliasCollect(&a) {}
-  void initialize( AstInterface& fa, const AstNodePtr& h);
-  void observe( AstInterface& fa) ;
-  void stop_observe( AstInterface& fa) ;
-  bool may_alias(AstInterface& fa, const AstNodePtr& r1, const AstNodePtr& r2);
-
-  bool is_array_exp( CPPAstInterface& fa, const AstNodePtr& array, 
-                     int *dimp = 0, SymbolicFunctionDeclarationGroup *len = 0, 
-		     bool *changeshape = 0);
-  void set_array_dimension( const AstNodePtr& arrayexp, int dim);
-  bool is_array_mod_op( CPPAstInterface& fa, const AstNodePtr& arrayExp, 
-                        AstNodePtr* modArray = 0, int *dimp = 0, 
-			SymbolicFunctionDeclarationGroup *len = 0, SymbolicFunctionDeclarationGroup* elem = 0, 
-			bool *reshape = 0);
-  bool is_array_construct_op( CPPAstInterface& fa, const AstNodePtr& arrayExp, 
-                              AstInterface::AstNodeList* alias = 0,
-			      int *dimp = 0, SymbolicFunctionDeclarationGroup *len = 0, SymbolicFunctionDeclarationGroup* elem = 0);
- 
-  AstNodePtr impl_array_opt_init( CPPAstInterface& fa, const AstNodePtr& array, 
-				  bool insertinit = false);
-  AstNodePtr impl_access_array_length(  CPPAstInterface& fa, const AstNodePtr& array, int dim,
-					int plus = 0);
-  AstNodePtr impl_access_array_elem(  CPPAstInterface& fa, const AstNodePtr& array, 
-				      AstInterface::AstNodeList& args );
-  AstNodePtr impl_reshape_array(  CPPAstInterface& fa, const AstNodePtr& array, 
-				  AstInterface::AstNodeList& args );
-};
-
-#endif

Modified: branches/testonly/projects/arrayOptimization/ArrayProcessor.C
===================================================================
--- branches/testonly/projects/arrayOptimization/ArrayProcessor.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/arrayOptimization/ArrayProcessor.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,4 +1,3 @@
-
 #include <sage3.h>
 #include <CPPAstInterface.h>
 #include <ArrayAnnot.h>
@@ -10,57 +9,50 @@
 #include <AstInterface_ROSE.h>
 
 using namespace std;
+using namespace CommandlineProcessing;
 
 void PrintUsage( const string& name)
 {
   std::cerr << name << " <options> " << "<program name>" << "\n";
-  std::cerr << "-toarrayonly : rewrite to array form \n";
+  std::cerr << "-dumpannot: dump all annotations read from files \n";
+  std::cerr << "-norawarray : don't rewrite to C-style raw array form \n";
+  std::cerr << "-noobj: don't enable the backend compiler \n";
   std::cerr << ReadAnnotation::OptionString();
   PrintLoopTransformUsage(std::cerr);
 }
 
-bool GenerateObj()
-{
-  return CmdOptions::GetInstance()->HasOption("-gobj");
-}
-
-extern bool DebugAnnot();
-
-bool ToArrayOnly( const vector<string>& argv )
-{
-  for (size_t i = 1; i < argv.size(); ++i) {
-    if ( argv[i] == "-toarrayonly")
-        return true;
-  }
-  return false;
-}
-
 int
 main ( int argc,  char * argv[] )
    {
-
      if (argc <= 1) {
          PrintUsage(argv[0]);
          return 1;
      }
     vector<string> argvList(argv, argv + argc);
-    SetLoopTransformOptions( argvList);
+   // Read and set loop transformation specific options, such as -fs2 
+    SetLoopTransformOptions(argvList);
+
+    // Save -annot file .. etc, used internally in ReadAnnotation
     CmdOptions::GetInstance()->SetOptions(argvList);
-    bool toOnly = ToArrayOnly(argvList);
+    // Handle and remove other custom options 
+    bool noRawArray= isOption(argvList,"","-norawarray",true);
+    bool noObj = isOption(argvList,"","-gobj",true);
+    bool dumpAnnot = isOption(argvList,"","-dumpannot",true);
 
+    // Read into all annotation files 
     ArrayAnnotation* annot = ArrayAnnotation::get_inst();
     annot->register_annot();
     ReadAnnotation::get_inst()->read();
-    if (DebugAnnot())
-        annot->Dump();
-    if (CmdOptions::GetInstance()->HasOption("-dumpannot"))
+    if (dumpAnnot)    
        annot->Dump();
 
+    // Strip off custom options and their values to enable backend compiler 
+    removeArgsWithParameters(argvList,"-annot");
+
+    // ROSE part
     SgProject* sageProject = new SgProject( argvList);
     int filenum = sageProject->numberOfFiles();
    for (int i = 0; i < filenum; ++i) {
-  // SgSourceFile &sageFile = isSgSourceFile(sageProject->get_fileList()[i]);
-  // SgGlobal *root = sageFile.get_root();
      SgSourceFile* sageFile = isSgSourceFile(sageProject->get_fileList()[i]);
      SgGlobal *root = sageFile->get_globalScope();
      SgDeclarationStatementPtrList& declList = root->get_declarations ();
@@ -75,30 +67,45 @@
          SgBasicBlock* body = defn->get_body();
          AstInterfaceImpl scope(body);
          CPPAstInterface fa(&scope);
-
+         // Replace operators with their equivalent counterparts defined 
+         // in "inline" annotations
          OperatorInlineRewrite()( fa, AstNodePtrImpl(body));
-
+         
+	 // Pass annotations to arrayInterface  
          ArrayInterface anal(*annot);
          anal.initialize(fa, AstNodePtrImpl(defn));
          anal.observe(fa);
 
-         RewriteToArrayAst toArray( anal);
-         RewriteFromArrayAst fromArray( anal); 
+	 // Write collective operations into explicit loops with 
+	 // array element accesses using element access member functions
+         RewriteToArrayAst toArray(anal);
          AstNodePtr r = TransformAstTraverse( fa, AstNodePtrImpl(body), toArray);
          fa.SetRoot(r);
+         
+	 // Conduct loop transformation as requested 
+	 // LoopTransformTraverse( AstInterface& fa, 
+	 //			   const AstNodePtr& head, 
+         //                        AliasAnalysisInterface& aliasInfo,       // provided by ArrayInterface
+         //                        FunctionSideEffectInterface* funcInfo=0, // provided by ArrayAnnotation
+         //                        ArrayAbstractionInterface* arrayInfo = 0);// provided by ArrayInterface
          r = LoopTransformTraverse( fa, r, anal, annot, &anal);
          fa.SetRoot(r);
-         if (!toOnly) {
+
+         // Replace high level array class object reference with 
+         // equivalent C-style raw array accesses
+         if (!noRawArray) {
+            RewriteFromArrayAst fromArray( anal); 
              TransformAstTraverse( fa, AstNodePtrImpl(defn), fromArray);
           }
      }
    }
-
   // Generate the final C++ source code from the potentially modified SAGE AST
-  if (!GenerateObj())
+ if (noObj)
+  { 
      sageProject->unparse();
+     return 0;
+  }  
   else
-     return backend(sageProject);
-  return 0;
+    return backend(sageProject);
 }
 

Deleted: branches/testonly/projects/arrayOptimization/ArrayRewrite.C
===================================================================
--- branches/testonly/projects/arrayOptimization/ArrayRewrite.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/arrayOptimization/ArrayRewrite.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,335 +0,0 @@
-
-#include <ArrayRewrite.h>
-#include <AstInterface.h>
-#include <DepInfoAnal.h>
-#include <DomainInfo.h>
-
-bool RecognizeArrayOp( CPPAstInterface& fa, ArrayInterface& anal,
-                      const AstNodePtr& orig)
-{
-  if (!fa.IsFunctionCall(orig))  {
-      return false;
-  }
-  if (anal.is_array_mod_op( fa, orig)) {
-    std::cerr << "recognized array mod op: " << AstToString(orig) << "\n";
-    return true;
-  }
-  else if ( anal.is_array_construct_op( fa, orig)) {
-    std::cerr << "recognized array construct op: " << AstToString(orig) << "\n";
-    return true;
-  }
-  else  {
-    std::cerr << "not recognize array op: " << AstToString(orig) << "\n";
-  }
-  return false;
-}
-
-class HasDependence : public CollectObject<DepInfo>
-{
-  bool result;
- public:
-  HasDependence() : result(false) {}
-  virtual bool operator()( const DepInfo& info) 
-   { result = true; return true; }
-  bool& get_result() { return result; }
-};
-
-class RewriteModArrayAccess : public CreateTmpArray, public TransformAstTree
-{
-  // rewrite reads of modified array by creating explicit temperaries
-  AstNodePtr stmt, lhs, modarray;
-  size_t size;
-  LoopTransformInterface la;
-  DepInfoAnal depAnal;
-  ArrayInterface& anal;
-public:
-  RewriteModArrayAccess( CPPAstInterface& ai, ArrayInterface& a, 
-                         const AstNodePtr& _stmt, const AstNodePtr& _lhs,
-                         std::map<std::string, AstNodePtr>& _varmap,
-                         std::list<AstNodePtr>& _newstmts)
-    : CreateTmpArray(_varmap, _newstmts),
-      stmt(_stmt), lhs(_lhs),
-      la( ai, a, ArrayAnnotation::get_inst(), &a),
-      depAnal(la), anal(a)
-     { 
-        AstInterface::AstNodeList subs;
-        if (!ArrayAnnotation::get_inst()->is_access_array_elem( ai, lhs, &modarray, &subs))
-           assert(false);
-        size = subs.size();
-      }
-  bool operator() (AstInterface& _fa, const AstNodePtr& orig, AstNodePtr& result)
- {
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-  AstNodePtr array;
-  AstInterface::AstNodeList subs;
-  if (!ArrayAnnotation::get_inst()->is_access_array_elem(fa, orig, &array, &subs) || subs.size() == 0)
-     return false;
-  HasDependence test;
-  if (fa.IsSameVarRef( array, modarray)) {
-     assert(size == subs.size());
-     DomainCond domain(size);
-     DepInfoAnal::StmtRefDep ref = depAnal.GetStmtRefDep(la,stmt,orig, stmt,lhs);
-     depAnal.ComputeArrayDep( la, ref,DEPTYPE_NONE,test, test);
-  }
-  else 
-     test.get_result() = la.IsAliasedRef(array, modarray);
-  if (test.get_result()) {
-      std::string splitname = fa.GetVarName(array) + "_tmp";
-      result = create_tmp_array( fa, array, splitname);
-      AstInterface::AstNodeList subscopy;
-      for (AstInterface::AstNodeList::iterator p = subs.begin(); 
-           p != subs.end(); ++p) {
-         subscopy.push_back( fa.CopyAstTree(*p));
-      }   
-      result = ArrayAnnotation::get_inst()->create_access_array_elem( fa, result, subscopy);
-      return true;
-  }
-  return false;
- }
-};
-
-bool RewriteConstructArrayAccess:: 
-rewritable( const SymbolicVal& orig)
-{
-  AstNodePtr arrayExp;
-  if (ArrayAnnotation::get_inst()->is_access_array_elem( fa, orig, &arrayExp) ||
-      ArrayAnnotation::get_inst()->is_access_array_length( fa, orig, &arrayExp)) {
-      if (ArrayAnnotation::get_inst()->is_array_construct_op( fa, arrayExp) 
-          || fa.IsVarRef(arrayExp))
-          return true;
-  }
-  return false;
-}
-
-AstNodePtr CreateTmpArray::
-create_tmp_array( AstInterface& fa, const AstNodePtr& arrayExp, const std::string name)
-{
-  std::string expname;
-  if (!fa.IsVarRef(arrayExp,0,&expname))
-      assert(false);
-  AstNodePtr& split = varmap[expname];
-  if (split == 0) {
-     AstNodeType t =  fa.GetExpressionType(arrayExp);
-     std::string tname;
-     fa.GetTypeInfo( t, 0, &tname);
-     std::string splitname = fa.NewVar( fa.GetType(tname), name, true );
-     if (model == 0) {
-        split = fa.CreateVarRef(splitname);
-     }
-     else {
-        split = fa.CreateVarRef(splitname);
-     }
-     AstNodePtr splitStmt = fa.CreateAssignment( split, fa.CopyAstTree( arrayExp));
-     newStmts.push_back(splitStmt); 
-     return split;
-  }
-  else {
-     AstNodePtr r = fa.CopyAstTree(split);
-     return r;
-  }
-}
-
-SymbolicVal RewriteConstructArrayAccess :: 
-operator()( const SymbolicVal& orig)
-{
-  SymbolicVal result;
-  SymbolicVal dim;
-  std::vector<SymbolicVal> args;
-  AstNodePtr arrayExp;
-  if (ArrayAnnotation::get_inst()->is_access_array_elem( fa, orig, &arrayExp, &args)) {
-    anal.set_array_dimension( arrayExp, args.size());
-    SymbolicFunctionDeclarationGroup elem;
-    if (anal.is_array_construct_op( fa, arrayExp, 0, 0, 0, &elem)) {
-      if (! elem.get_val( args, result))
-	assert(false);
-      result = ReplaceVal( result, *this);
-    }
-    else if (!fa.IsVarRef(arrayExp)) {
-      AstNodePtr split = create_tmp_array( fa, arrayExp, "array");
-      result = ArrayAnnotation::get_inst()->create_access_array_elem( split, args);
-    }
-  }
-  else if (ArrayAnnotation::get_inst()->is_access_array_length( fa, orig, &arrayExp, &dim)) {
-    SymbolicFunctionDeclarationGroup len;
-    if (anal.is_array_construct_op(fa, arrayExp, 0, 0, &len)) {
-      args.clear();
-      args.push_back(dim);
-      if (! len.get_val( args, result))
-	assert(false);
-      result = ReplaceVal( result, *this);
-    }
-    else if (!fa.IsVarRef(arrayExp)) {
-      AstNodePtr split = create_tmp_array( fa, arrayExp, "array");
-      result = ArrayAnnotation::get_inst()->create_access_array_length( split, dim);
-    }
-  }
-  return result;
-}
-
-bool CollectArrayRef( CPPAstInterface& fa, ArrayInterface& anal, 
-                      const AstNodePtr& array, AstInterface::AstNodeList& col)
-{
-    if (fa.IsVarRef(array)) {
-       col.push_back(array);
-       return true;
-    }
-    AstInterface::AstNodeList cur;
-    if (!anal.is_array_construct_op( fa, array, &cur))
-       return false;
-    for (AstInterface::AstNodeList::iterator p = cur.begin();
-         p != cur.end(); ++p) {
-        if (!CollectArrayRef(fa, anal, *p, col))
-             return false;
-    }
-    return true;
-}
-
-bool RewriteArrayModOp::
-operator () ( AstInterface& _fa, const AstNodePtr& orig, AstNodePtr& result)
-{
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-  if (!fa.IsStatement(orig)) {
-    return false;
-  }
-  
-  AstNodePtr modArray;
-  int dimension = 0;
-  SymbolicFunctionDeclarationGroup len, elem;
-  bool reshape = false;
-  if (!anal.is_array_mod_op( fa, orig, &modArray, &dimension, &len, &elem, &reshape)) 
-    return false;
-
-  SymbolicFunction::Arguments ivarList;
-  for (int i = 0; i < dimension; ++i ) {
-      AstNodeType t= fa.GetType("int");
-      std:: string ivarname = fa.NewVar( t);
-      AstNodePtr ivar = fa.CreateVarRef( ivarname);
-      ivarList.push_back( SymbolicAstWrap(ivar));
-  }
-  SymbolicVal rhs;
-  if (!elem.get_val( ivarList, rhs))
-    assert(false);
-
-  std::map<std::string,AstNodePtr> varmap;
-  std::list<AstNodePtr> newStmts;
-  RewriteConstructArrayAccess constructArrayRewrite(fa, anal, varmap, newStmts);
-  if (!constructArrayRewrite.rewritable( rhs ))
-       return false;
-
-  SymbolicVal lhs = ArrayAnnotation::get_inst()->create_access_array_elem( modArray, ivarList);
-  if (!fa.IsVarRef(modArray)) 
-      lhs = ReplaceVal(lhs, constructArrayRewrite);
-  rhs = ReplaceVal( rhs, constructArrayRewrite);
-
-  AstNodePtr lhsast = lhs.CodeGen(fa);
-  AstNodePtr rhsast = rhs.CodeGen(fa);
-  AstNodePtr stmt = fa.CreateAssignment(lhsast, rhsast), body = stmt;
-  SymbolicFunction::Arguments lenlist;
-  for (int i = 0; i < dimension; ++i ) {
-    SymbolicFunction::Arguments args;
-    args.push_back( SymbolicConst(i));
-    SymbolicVal ubval;
-    if (!len.get_val(args, ubval))
-      assert(false);
-    ubval = ReplaceVal( ubval, constructArrayRewrite);
-    ubval = ubval -1;
-    lenlist.push_back(ubval);
-    AstNodePtr ub = ubval.CodeGen(fa);
-    AstNodePtr lb = fa.CreateConstInt(0), step = fa.CreateConstInt(1);
-    AstNodePtr ivarAst;
-    if (! ivarList[i].isAstWrap(ivarAst))
-        assert(false);
-    body = fa.CreateLoop( ivarAst, lb, ub, step, body, false);
-  }
-
-  RewriteModArrayAccess modArrayRewrite( fa, anal, stmt, lhsast, varmap, newStmts);
-  TransformAstTraverse( fa, rhsast, modArrayRewrite);
-
-  if (!reshape && newStmts.size() == 0) 
-      result = body;
-  else {
-      result = fa.CreateBlock();
-      for (std::list<AstNodePtr>::iterator p = newStmts.begin(); p != newStmts.end();
-           ++p) {
-         AstNodePtr cur = (*p);
-         AstNodePtr ncur = cur;
-         if (operator()(fa, cur, ncur))
-	     fa.BlockAppendStmt( result, ncur);
-         else
-	     fa.BlockAppendStmt( result, cur);
-      }
-      if (reshape) {
-         AstInterface::AstNodeList argList;
-         for (int i = 0; i < dimension; ++i) {
-	   AstNodePtr curlen = lenlist[i].CodeGen(fa);
-	   argList.push_back( curlen);
-         }
-         AstNodePtr reshapeStmt = ArrayAnnotation::get_inst()->create_reshape_array(fa,modArray, argList);
-         fa.BlockAppendStmt(result, reshapeStmt);
-      }
-      fa.BlockAppendStmt(result, body);
-  }
-std::cerr << "modarray rewrite: result = " << AstToString(result) << "\n";
-   return true;
-}
-
-bool RewriteToArrayAst::
-operator() ( AstInterface& fa, const AstNodePtr& orig, AstNodePtr& result)
-{
-  RewriteArrayModOp op1(anal);
-  if (op1(fa, orig, result))
-       return true;
- 
-  return false;  
-}
-
-bool RewriteFromArrayAst::
-operator() ( AstInterface& _fa, const AstNodePtr& orig, AstNodePtr& result)
-{
-  AstNodePtr array;
-  AstNodePtr decl, body;
-  int  dim;
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-  AstInterface::AstNodeList args, vars;
-  if (fa.IsVariableDecl( orig, &vars)) {
-     for (AstInterface::AstNodeList::iterator pv = vars.begin();
-           pv!= vars.end(); ++pv) {
-        AstNodePtr cur = *pv;
-        if (! ArrayAnnotation::get_inst()->known_array( fa, cur))
-           break; 
-        AstNodePtr initdefs = anal.impl_array_opt_init(fa, cur);
-        fa.InsertStmt( orig, initdefs, false, true);
-     }
-   }
-   else  if (fa.IsFunctionDefinition( orig, 0, &vars,0, &body) && body !=0) {
-      for (AstInterface::AstNodeList::iterator pv = vars.begin();
-           pv!=vars.end(); ++pv) {
-        AstNodePtr cur = *pv;
-        if (! ArrayAnnotation::get_inst()->known_array( fa, cur))
-           break; 
-        anal.impl_array_opt_init(fa, cur, true);
-      }
-  }
-  else if (ArrayAnnotation::get_inst()->is_access_array_elem( fa, orig, &array, &args )) {
-     result = anal.impl_access_array_elem( fa, array, args);
-     return true;
-  }
-  else if (ArrayAnnotation::get_inst()->is_reshape_array( fa, orig, &array, &args) ) {
-    assert(fa.IsVarRef(array));
-    AstNodePtr reshape = anal.impl_reshape_array( fa, array, args);
-    reshape = TransformAstTraverse( fa, reshape, *this);
-    result = fa.CreateBlock();
-    fa.BlockAppendStmt( result, reshape);
-    AstNodePtr initdefs = anal.impl_array_opt_init(fa, array);
-    fa.BlockAppendStmt( result, initdefs);
-    return true;
-  }
-  else if (ArrayAnnotation::get_inst()->is_access_array_length( fa, orig, &array, 0, &dim)) {
-    assert(fa.IsVarRef(array));
-    result = anal.impl_access_array_length( fa, array, dim);
-    return true;
-  }
-  return false;
-}
-
-

Deleted: branches/testonly/projects/arrayOptimization/ArrayRewrite.h
===================================================================
--- branches/testonly/projects/arrayOptimization/ArrayRewrite.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/arrayOptimization/ArrayRewrite.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,64 +0,0 @@
-#ifndef ARRAY_REWRITE_H
-#define ARRAY_REWRITE_H
-
-#include <ArrayInterface.h>
-#include <AstInterface.h>
-
-class CreateTmpArray
-{
-  std::map<std::string, AstNodePtr>& varmap;
-  std::list<AstNodePtr>& newStmts;
-  AstNodePtr model;
- public:
-  CreateTmpArray( std::map<std::string, AstNodePtr>& _varmap, std::list<AstNodePtr>& _newstmts) 
-     :  varmap(_varmap), newStmts(_newstmts), model() {} 
-  AstNodePtr create_tmp_array( AstInterface& fa, const AstNodePtr& arrayExp, const std::string name);
-  void set_model_array( const AstNodePtr& mod) { model = mod; }
-};
-
-class RewriteConstructArrayAccess 
-   : public CreateTmpArray, public MapObject<SymbolicVal, SymbolicVal>
-{
-  // rewrite reads of construct_array ops to remove implicit array temperaries 
-  // rewrite reads of unknown array ops by creating explicit temperaries
-  ArrayInterface& anal;
-  CPPAstInterface& fa;
-public:
-  RewriteConstructArrayAccess( CPPAstInterface& _fa, ArrayInterface& a,
-                               std::map<std::string, AstNodePtr>& _varmap,
-                               std::list<AstNodePtr>& _newstmts)
-      : CreateTmpArray(_varmap, _newstmts), anal(a), fa(_fa) {}
-  bool rewritable( const SymbolicVal& head);
-  SymbolicVal operator()( const SymbolicVal& orig);
-};
-
-class RewriteArrayModOp : public TransformAstTree
-{
-  ArrayInterface& anal;
-
- public:
-  RewriteArrayModOp( ArrayInterface &_op) : anal(_op) {}
-  bool operator()(AstInterface& fa, const AstNodePtr& head, AstNodePtr& result);
-};
-
-class RewriteToArrayAst : public TransformAstTree
-{
-  ArrayInterface& anal;
-
- public:
-  RewriteToArrayAst( ArrayInterface &_op) : anal(_op) {}
-  bool operator()(AstInterface& fa, const AstNodePtr& head, AstNodePtr& result);
-};
-
-class RewriteFromArrayAst : public TransformAstTree
-{
-  ArrayInterface& anal;
- public:
-  RewriteFromArrayAst( ArrayInterface &_op) : anal(_op) {}
-  bool operator()(AstInterface& fa, const AstNodePtr& head, AstNodePtr& result);
-};
-
-#endif
-
-
-

Modified: branches/testonly/projects/arrayOptimization/Makefile.am
===================================================================
--- branches/testonly/projects/arrayOptimization/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/arrayOptimization/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,37 +1,37 @@
 include $(top_srcdir)/config/Makefile.for.ROSE.includes.and.libs
 
-# DQ (12/7/2004): Commented out since we don't currently pass this test!
 SUBDIRS = test
 
 INCLUDES = \
-     $(ROSE_INCLUDES) \
-     -I$(top_srcdir)/src/util \
-     -I$(top_srcdir)/src/util/support \
-     -I$(top_srcdir)/src/util/graphs \
-     -I$(top_srcdir)/src/midend/astUtil \
-     -I$(top_srcdir)/src/midend/astUtil/astInterface \
-     -I$(top_srcdir)/src/midend/astUtil/astSupport \
-     -I$(top_srcdir)/src/midend/astUtil/symbolicVal \
-     -I$(top_srcdir)/src/midend/astUtil/annotation \
-     -I$(top_srcdir)/src/midend/programAnalysis \
-     -I$(top_srcdir)/src/midend/programAnalysis/CFG \
-     -I$(top_srcdir)/src/midend/programAnalysis/dataflowAnalysis \
-     -I$(top_srcdir)/src/midend/programAnalysis/valuePropagation \
-     -I$(top_srcdir)/src/midend/programAnalysis/CFG \
-     -I$(top_srcdir)/src/midend/loopProcessing/driver \
-     -I$(top_srcdir)/src/midend/loopProcessing/depInfo
+     $(ROSE_INCLUDES) 
+#     -I$(top_srcdir)/src/util \
+#     -I$(top_srcdir)/src/util/support \
+#     -I$(top_srcdir)/src/util/graphs \
+#     -I$(top_srcdir)/src/midend/astUtil \
+#     -I$(top_srcdir)/src/midend/astUtil/astInterface \
+#     -I$(top_srcdir)/src/midend/astUtil/astSupport \
+#     -I$(top_srcdir)/src/midend/astUtil/symbolicVal \
+#     -I$(top_srcdir)/src/midend/astUtil/annotation \
+#     -I$(top_srcdir)/src/midend/programAnalysis \
+#     -I$(top_srcdir)/src/midend/programAnalysis/CFG \
+#     -I$(top_srcdir)/src/midend/programAnalysis/dataflowAnalysis \
+#     -I$(top_srcdir)/src/midend/programAnalysis/valuePropagation \
+#     -I$(top_srcdir)/src/midend/programAnalysis/CFG \
+#     -I$(top_srcdir)/src/midend/loopProcessing/driver \
+#     -I$(top_srcdir)/src/midend/loopProcessing/depInfo
 
-lib_LIBRARIES = libarrayOptimization.a
+#lib_LIBRARIES = libarrayOptimization.a
 
 ## The grammar generator (ROSETTA) should use its own template repository
-CXX_TEMPLATE_REPOSITORY_PATH = .
+#CXX_TEMPLATE_REPOSITORY_PATH = .
 
-libarrayOptimization_a_SOURCES = ArrayAnnot.C  ArrayInterface.C  ArrayRewrite.C 
+#libarrayOptimization_a_SOURCES = ArrayAnnot.C  ArrayInterface.C  ArrayRewrite.C 
 
 bin_PROGRAMS = ArrayProcessor
 ArrayProcessor_SOURCES = ArrayProcessor.C
 
-LDADD = libarrayOptimization.a $(LIBS_WITH_RPATH) $(ROSE_LIBS)
+LDADD = $(LIBS_WITH_RPATH) $(ROSE_LIBS)
+#LDADD = libarrayOptimization.a $(LIBS_WITH_RPATH) $(ROSE_LIBS)
 
 clean-local:
 	rm -rf Templates.DB ii_files ti_files cxx_templates
@@ -40,5 +40,5 @@
 distclean-local:
 	rm -rf Templates.DB
 
-include_HEADERS =  ArrayAnnot.h  ArrayInterface.h  ArrayRewrite.h
+#include_HEADERS =  ArrayAnnot.h  ArrayInterface.h  ArrayRewrite.h
 

Modified: branches/testonly/projects/arrayOptimization/test/Makefile.am
===================================================================
--- branches/testonly/projects/arrayOptimization/test/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/arrayOptimization/test/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -2,11 +2,23 @@
 EXTRA_DIST = funcs.annot  interp1.C  redBlack1.C rose_redBlack1.C.save  rose_redBlack1_split.C.save \
              TestDriver floatArray.annot  Index.annot  rose_interp1.C.save  simpleA++.h
 
+ROSE_FLAGS=-I$(srcdir)
+#-fs2 means multi-level loop fusion for more reuses for loop translation
+rose_interp1.C: ../ArrayProcessor
+	../ArrayProcessor $(ROSE_FLAGS) -c -fs2 -annot $(srcdir)/floatArray.annot -annot $(srcdir)/funcs.annot -annot $(srcdir)/Index.annot $(srcdir)/interp1.C
+
+rose_redBlack1.C: ../ArrayProcessor
+	../ArrayProcessor $(ROSE_FLAGS) -c -fs2 -annot $(srcdir)/floatArray.annot -annot $(srcdir)/funcs.annot -annot $(srcdir)/Index.annot $(srcdir)/redBlack1.C
+
+../ArrayProcessor:
+	cd ..&&$(MAKE) 
+
 # to deactivate tests comment out check-local.
 check-local:
-	@echo "SKIPPING TEST CODES RUN BY \"make check\" rule in projects/arrayOptimization/test directory ..."
-#	$(MAKE) FORCE_TEST_CODES_TO_RUN
+	$(MAKE) FORCE_TEST_CODES_TO_RUN
 
-FORCE_TEST_CODES_TO_RUN:
-	$(srcdir)/TestDriver $(srcdir)
+FORCE_TEST_CODES_TO_RUN:../ArrayProcessor 
+	$(srcdir)/TestDriver $(srcdir) $(top_builddir)/projects/arrayOptimization
 
+clean-local:
+	rm -f *.o rose_*.[cC] 

Modified: branches/testonly/projects/arrayOptimization/test/TestDriver
===================================================================
--- branches/testonly/projects/arrayOptimization/test/TestDriver	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/arrayOptimization/test/TestDriver	2008-11-18 06:54:05 UTC (rev 129)
@@ -8,20 +8,21 @@
 
 DIFF="diff -U5"
 
-test1="$2/ArrayProcessor -fs2 -annot $srcdir/floatArray.annot -annot $srcdir/funcs.annot -annot $srcdir/Index.annot $srcdir/interp1.C"
+test1="$2/ArrayProcessor -c -fs2 -annot $srcdir/floatArray.annot -annot $srcdir/funcs.annot -annot $srcdir/Index.annot $srcdir/interp1.C"
 echo $test1
 $test1
-${DIFF} $srcdir/rose_interp1.C.save rose_interp1.C
-rm rose_interp1.C
+#${DIFF} $srcdir/rose_interp1.C.save rose_interp1.C
+#rm rose_interp1.C
 
-test2="$2/ArrayProcessor -fs2 -annot $srcdir/floatArray.annot -annot $srcdir/funcs.annot -annot $srcdir/Index.annot $srcdir/redBlack1.C"
+test2="$2/ArrayProcessor -c -fs2 -annot $srcdir/floatArray.annot -annot $srcdir/funcs.annot -annot $srcdir/Index.annot $srcdir/redBlack1.C"
 echo $test2
 $test2
-${DIFF} $srcdir/rose_redBlack1.C.save rose_redBlack1.C
-rm rose_redBlack1.C
+#${DIFF} $srcdir/rose_redBlack1.C.save rose_redBlack1.C
+#rm rose_redBlack1.C
 
-test3="$2/ArrayProcessor -fs2 -annot $srcdir/floatArray.annot -annot $srcdir/funcs.annot -annot $srcdir/Index.annot -splitloop $srcdir/redBlack1.C"
-echo $test3
-$test3
-${DIFF} $srcdir/rose_redBlack1_split.C.save rose_redBlack1.C
-rm rose_redBlack1.C
+# Infinite running for some reason
+#test3="$2/ArrayProcessor -c -fs2 -annot $srcdir/floatArray.annot -annot $srcdir/funcs.annot -annot $srcdir/Index.annot -splitloop $srcdir/redBlack1.C"
+#echo $test3
+#$test3
+#${DIFF} $srcdir/rose_redBlack1_split.C.save rose_redBlack1.C
+#rm rose_redBlack1.C

Modified: branches/testonly/projects/arrayOptimization/test/floatArray.annot
===================================================================
--- branches/testonly/projects/arrayOptimization/test/floatArray.annot	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/arrayOptimization/test/floatArray.annot	2008-11-18 06:54:05 UTC (rev 129)
@@ -28,12 +28,6 @@
                    inline { this.elem(index) };
               }
 
-operator floatArray::getLength( int dim) 
-              {
-                   modify none; read {dim}; alias none;
-                   inline { this.length(dim) };
-              }
-
 operator floatArray::operator() ( const InternalIndex& index) 
               {
                    modify none; read {this, index};
@@ -106,6 +100,13 @@
                        elem(i:dim:1:dimension) = val;
                    };
                }
+
+operator floatArray::getLength( int dim) 
+              {
+                   modify none; read {dim}; alias none;
+                   inline { this.length(dim) };
+              }
+
 operator floatArray::fill( float val) 
               {
                    modify {this}; read {val}; alias none;
@@ -122,6 +123,13 @@
                    modify {this}; read {cond, val}; alias none;
                }
 
+operator floatArray::floatArray (int len) 
+              { 
+                   modify none; read {len}; alias none;
+                   restrict_value {this = { dimension = 1; length_0 = len; } };
+                 construct_array (none) { dimension = 1; length(0) = len }; 
+               }
+
                                           
 operator operator+ (const floatArray& lhs, const floatArray& rhs) 
               {
@@ -361,10 +369,4 @@
                }
 
 
-operator floatArray::floatArray (int len) 
-              { 
-                   modify none; read {len}; alias none;
-                   restrict_value {this = { dimension = 1; length_0 = len; } };
-                 construct_array (none) { dimension = 1; length(0) = len }; 
-               }
 

Modified: branches/testonly/projects/arrayOptimization/test/simpleA++.h
===================================================================
--- branches/testonly/projects/arrayOptimization/test/simpleA++.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/arrayOptimization/test/simpleA++.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -250,6 +250,9 @@
           float* getDataPointer();
           int getLocalBase(int dim);
           int getLength( int dim);
+          //Liao, 11/12/2008. Add alias functions used in the annotation
+          int length(int i);
+          float & elem(int i);
 
           floatArray & redim ( floatArray & X );
           floatArray & resize ( int i );

Copied: branches/testonly/projects/autoParallelization (from rev 128, trunk/projects/autoParallelization)

Deleted: branches/testonly/projects/autoParallelization/Makefile.am
===================================================================
--- trunk/projects/autoParallelization/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,18 +0,0 @@
-include $(top_srcdir)/config/Makefile.for.ROSE.includes.and.libs
-
-# . is necessary to ensure building the translator before building the tests
-SUBDIRS = . tests
-
-INCLUDES = $(ROSE_INCLUDES) 
-
-bin_PROGRAMS = autoPar
-
-autoPar_SOURCES = autoPar.C
-
-LDADD = $(LIBS_WITH_RPATH) $(ROSE_LIBS) 
-
-EXTRA_DIST = README makefile.external
-
-clean-local:
-	rm -rf autoPar
-

Copied: branches/testonly/projects/autoParallelization/Makefile.am (from rev 128, trunk/projects/autoParallelization/Makefile.am)
===================================================================
--- branches/testonly/projects/autoParallelization/Makefile.am	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,18 @@
+include $(top_srcdir)/config/Makefile.for.ROSE.includes.and.libs
+
+# . is necessary to ensure building the translator before building the tests
+SUBDIRS = . tests
+
+INCLUDES = $(ROSE_INCLUDES) 
+
+bin_PROGRAMS = autoPar
+
+autoPar_SOURCES = autoPar.C
+
+LDADD = $(LIBS_WITH_RPATH) $(ROSE_LIBS) 
+
+EXTRA_DIST = README makefile.external
+
+clean-local:
+	rm -rf autoPar
+

Deleted: branches/testonly/projects/autoParallelization/README
===================================================================
--- trunk/projects/autoParallelization/README	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/README	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,4 +0,0 @@
-A project to automatically insert OpenMP directives based on
-* dependence analysis
-* liveness analysis
-* source code annotation

Copied: branches/testonly/projects/autoParallelization/README (from rev 128, trunk/projects/autoParallelization/README)
===================================================================
--- branches/testonly/projects/autoParallelization/README	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/README	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,4 @@
+A project to automatically insert OpenMP directives based on
+* dependence analysis
+* liveness analysis
+* source code annotation

Deleted: branches/testonly/projects/autoParallelization/autoPar.C
===================================================================
--- trunk/projects/autoParallelization/autoPar.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/autoPar.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,276 +0,0 @@
-/*
- * Automatic Parallelization using OpenMP 
- *
- * Input: sequential C/C++ code
- * Output: parallelized C/C++ code using OpenMP
- *
- * Algorithm:
- *   for all loops
- *     x. Conduct loop normalization
- *     x. Call dependence analysis from Qing's loop transformations
- *     x. Conduct liveness analysis and variable classification
- *     x. Judge if the loop is parallelizable
- *     x. Attach OmpAttribute if it is
- *     x. Insert OpenMP pragma accordingly
- *
- * By Chunhua Liao
- * Nov 3, 2008
- */
-#include "rose.h"
-#include "OmpAttribute.h"
-#include "CommandOptions.h"
-#include <vector>
-#include <string>
-#include <iostream>
-
-//Array Annotation headers
-#include <CPPAstInterface.h>
-#include <ArrayAnnot.h>
-#include <ArrayRewrite.h>
-
-//dependence graph headers
-#include <AstInterface_ROSE.h>
-#include <LoopTransformInterface.h>
-#include <AnnotCollect.h>
-#include <OperatorAnnotation.h>
-//#include <DepCompTransform.h>
-#include <LoopTreeDepComp.h>
-
-using namespace std;
-using namespace CommandlineProcessing;
-// new attribute support for 3.0 specification
-using namespace OmpSupport;
-using namespace SageInterface;
-
-int
-main (int argc, char *argv[])
-{
-  vector<string> argvList(argv, argv+argc);
-
-  //Save -debugdep, -annot file .. etc, 
-  // used internally in ReadAnnotation and Loop transformation
-  CmdOptions::GetInstance()->SetOptions(argvList);
-  bool dumpAnnot = isOption(argvList,"","-dumpannot",true);
-
-  //Read in annotations---------------------------- 
-  ArrayAnnotation* annot = ArrayAnnotation::get_inst();
-  annot->register_annot();
-  ReadAnnotation::get_inst()->read();
-  if (dumpAnnot)  
-    annot->Dump();
-
-  // Strip off custom options and their values to enable backend compiler 
-  removeArgsWithParameters(argvList,"-annot");
-
-  /* We use ArrayAnnotation now
-  OperatorSideEffectAnnotation *funcInfo =  OperatorSideEffectAnnotation::get_inst();
-  funcInfo->register_annot();
-  ReadAnnotation::get_inst()->read();
-  AssumeNoAlias aliasInfo;
-  */
-
-  SgProject *project = frontend (argvList);
-  ROSE_ASSERT (project != NULL);
-  
-  // For each source file in the project
-    SgFilePtrList & ptr_list = project->get_fileList();
-    for (SgFilePtrList::iterator iter = ptr_list.begin(); iter!=ptr_list.end();
-        iter++)
-   {
-     SgFile* sageFile = (*iter);
-     SgSourceFile * sfile = isSgSourceFile(sageFile);
-     ROSE_ASSERT(sfile);
-     SgGlobal *root = sfile->get_globalScope();
-     SgDeclarationStatementPtrList& declList = root->get_declarations ();
-     bool hasOpenMP= false; // flag to indicate if omp.h is needed
-
-    //For each function body in the file
-     for (SgDeclarationStatementPtrList::iterator p = declList.begin(); p != declList.end(); ++p) 
-     {
-        SgFunctionDeclaration *func = isSgFunctionDeclaration(*p);
-        if (func == 0)  continue;
-        SgFunctionDefinition *defn = func->get_definition();
-        if (defn == 0)  continue;
-        SgBasicBlock *body = defn->get_body();  
-
-        // Replace operators with their equivalent counterparts defined 
-        // in "inline" annotations
-        AstInterfaceImpl scope(body);
-        CPPAstInterface fa_body(&scope);
-        OperatorInlineRewrite()( fa_body, AstNodePtrImpl(body));
-         
-	 // Pass annotations to arrayInterface and use them to collect alias info. function info etc.  
-         ArrayInterface array_interface(*annot);
-         array_interface.initialize(fa_body, AstNodePtrImpl(defn));
-         array_interface.observe(fa_body);
-
-        // For each loop (For-loop for now)
-        Rose_STL_Container<SgNode*> loops = NodeQuery::querySubTree(defn,V_SgForStatement); 
-        if (loops.size()==0) continue;
-        
-  // Invoke loop transformation, dependence analysis only
-   
-        // 1. Loop normalization changes the original code, 
-        // may not be desired for s2s translation
-        // Loop normalization, starting from the parent BB  is fine
-        // Bridge pattern:  interface -- implementation grow independently
-        // Implementation side: attach to AST function body
-        AstInterfaceImpl faImpl_0 = AstInterfaceImpl(body);
-        // Build AST abstraction side, a reference to the implementation 
-        AstInterface fa_0(&faImpl_0);
-        NormalizeForLoop(fa_0, AstNodePtrImpl(body));
-        
-        //TODO working on first loop, how to get all first level loops?
-        // Prepare AstInterface: implementation and head pointer
-        AstInterfaceImpl faImpl = AstInterfaceImpl(loops[0]);
-        AstInterface fa(&faImpl);
-        AstNodePtr head = AstNodePtrImpl(loops[0]);
-        //AstNodePtr head = AstNodePtrImpl(body);
-        fa.SetRoot(head);
-
-        //2.  Call dependence analysis directly on a loop node
-        //LoopTransformInterface la (fa,aliasInfo,funcInfo); 
-        LoopTransformInterface la (fa,array_interface,annot, &array_interface); 
-        LoopTreeDepCompCreate comp(la,head);
-
-        // Retrieve dependence graph here!
-        cout<<"Dump the dependence graph for the loop in question:"<<endl; 
-        comp.DumpDep();
-        //LoopTreeNodeDepMap depmap = comp.GetTreeNodeMap();
-       
-       // Get the loop hierarchy :grab just a top one for now
-       // TODO consider complex loop nests like loop {loop, loop} and loop{loop {loop}}
-       LoopTreeNode * loop_root = comp.GetLoopTreeRoot();
-       ROSE_ASSERT(loop_root!=NULL);
-       //loop_root->Dump();
-
-       LoopTreeTraverseSelectLoop loop_nodes(loop_root, LoopTreeTraverse::PreOrder);
-       LoopTreeNode * cur_loop = loop_nodes.Current();
-
-       // three-level loop: i,j,k
-       AstNodePtr ast_ptr;
-       if (cur_loop)
-       {  
-         //cur_loop->Dump();
-         //loop_nodes.Advance();
-         //loop_nodes.Current()->Dump();
-         //loop_nodes.Advance();
-         //loop_nodes.Current()->Dump();
-         ast_ptr = cur_loop->GetOrigStmt2();
-        // cout<<AstToString(ast_ptr)<<endl;
-       }
-       else
-       {
-         ROSE_ASSERT(false);  
-       }
-
-       ROSE_ASSERT(ast_ptr!=NULL);
-       SgNode* sg_node = AstNodePtr2Sage(ast_ptr);
-       ROSE_ASSERT(sg_node);
-      // cout<<"-------------Dump the loops in question------------"<<endl; 
-      //   cout<<sg_node->class_name()<<endl;
-
-       //3. Judge if loops are parallelizable
-       // Algorithm, for each depInfo, 
-       //   commonlevel >=0, depInfo is within a loop
-       // simplest one first: 1 level loop only, 
-       // iterate dependence edges, 
-       // check if there is loop carried dependence at all 
-       // (Carry level ==0 for top level common loops)
-       bool isParallelizable = true;
-
-       vector<DepInfo>  remainingDependences;
-
-        LoopTreeDepGraph * depgraph =  comp.GetDepGraph(); 
-        LoopTreeDepGraph::NodeIterator nodes = depgraph->GetNodeIterator();
-        for (; !nodes.ReachEnd(); ++ nodes)
-        {
-          LoopTreeDepGraph::Node* curnode = *nodes;
-          LoopTreeDepGraph::EdgeIterator edges = depgraph->GetNodeEdgeIterator(curnode, GraphAccess::EdgeOut);
-          if (!edges.ReachEnd())
-          {
-             for (; !edges.ReachEnd(); ++edges)
-             { 
-               LoopTreeDepGraph::Edge *e= *edges;
-              // cout<<"dependence edge: "<<e->toString()<<endl;
-               DepInfo info =e->GetInfo();
-             
-               // eliminate dependence relationship if
-               // the variables are thread-local: (within the scope of the loop's scope)
-               SgScopeStatement * currentscope= getScope(sg_node);  
-               SgScopeStatement* varscope =NULL;
-               SgNode* src_node = AstNodePtr2Sage(info.SrcRef());
-               if (src_node)
-               {
-                 SgVarRefExp* var_ref = isSgVarRefExp(src_node);
-                 if (var_ref)
-                 {  
-                   varscope= var_ref->get_symbol()->get_scope();
-                   if (isAncestor(currentscope,varscope))
-                     continue;
-                 } //end if(var_ref)
-               } // end if (src_node)
-
-                // skip non loop carried dependencies: 
-                // TODO scalar issue, wrong CarryLevel
-                // loop independent dependencies: need privatization can eliminate most of them
-               if (info.CarryLevel()!=0) 
-                 continue;
-                
-               remainingDependences.push_back(info); 
-             } //end iterator edges for a node
-          } // end if 
-        } // end of iterate dependence graph 
-
-      //TODO liveness analysis to classify variables and further eliminate dependences
-      
-      // Set to unparallelizable if it has dependences which can not eliminated
-      if (remainingDependences.size()>0) isParallelizable = false;
-
-       comp.DetachDepGraph();// release resources here
-      //4.  Attach OmpAttribute to the loop node if it is parallelizable 
-       if (isParallelizable)
-       {  
-          // TODO add variable classification to set private,shared variables 
-          OmpAttribute* omp_attribute = buildOmpAttribute(e_parallel_for,sg_node);
-          addOmpAttribute(omp_attribute,sg_node);
-          hasOpenMP = true;
-        } 
-        else
-        {
-          cout<<"\n Unparallelizable loop at line:"<<sg_node->get_file_info()->get_line()<<
-               " due to the following dependencies:"<<endl;
-          for (vector<DepInfo>::iterator iter= remainingDependences.begin();     
-               iter != remainingDependences.end(); iter ++ )
-          {
-            cout<<(*iter).toString()<<endl;
-          }
-
-        } // end if 
-
-        // 5. Generate and insert #pragma omp parallel for 
-        // This phase is deliberately separated from buildOmpAttribute()
-        OmpAttribute* att = getOmpAttribute(sg_node); 
-        if(att)
-        {  
-            cout<<"\n Parallelizing a loop at line:"
-              <<sg_node->get_file_info()->get_line()<<endl;
-            string pragma_str= att->toOpenMPString();
-            SgPragmaDeclaration * pragma = SageBuilder::buildPragmaDeclaration(pragma_str); 
-            SageInterface::insertStatementBefore(isSgStatement(sg_node), pragma);
-        } // end inserting #pragma   
-
-     } // end for-loop for declarations
-     // insert omp.h if OpenMP directives have been inserted into the current file 
-     if (hasOpenMP)
-       SageInterface::insertHeader("omp.h",false,root);
-   } //end for-loop of files
-
-  // Qing's loop normalization is not robust enough to pass all tests
-  //AstTests::runAllTests(project);
-  
-  //we only unparse it to avoid -I path/to/omp.h
-   project->unparse();
-  //return backend (project);
-  return 0;
-}

Copied: branches/testonly/projects/autoParallelization/autoPar.C (from rev 128, trunk/projects/autoParallelization/autoPar.C)
===================================================================
--- branches/testonly/projects/autoParallelization/autoPar.C	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/autoPar.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,276 @@
+/*
+ * Automatic Parallelization using OpenMP 
+ *
+ * Input: sequential C/C++ code
+ * Output: parallelized C/C++ code using OpenMP
+ *
+ * Algorithm:
+ *   for all loops
+ *     x. Conduct loop normalization
+ *     x. Call dependence analysis from Qing's loop transformations
+ *     x. Conduct liveness analysis and variable classification
+ *     x. Judge if the loop is parallelizable
+ *     x. Attach OmpAttribute if it is
+ *     x. Insert OpenMP pragma accordingly
+ *
+ * By Chunhua Liao
+ * Nov 3, 2008
+ */
+#include "rose.h"
+#include "OmpAttribute.h"
+#include "CommandOptions.h"
+#include <vector>
+#include <string>
+#include <iostream>
+
+//Array Annotation headers
+#include <CPPAstInterface.h>
+#include <ArrayAnnot.h>
+#include <ArrayRewrite.h>
+
+//dependence graph headers
+#include <AstInterface_ROSE.h>
+#include <LoopTransformInterface.h>
+#include <AnnotCollect.h>
+#include <OperatorAnnotation.h>
+//#include <DepCompTransform.h>
+#include <LoopTreeDepComp.h>
+
+using namespace std;
+using namespace CommandlineProcessing;
+// new attribute support for 3.0 specification
+using namespace OmpSupport;
+using namespace SageInterface;
+
+int
+main (int argc, char *argv[])
+{
+  vector<string> argvList(argv, argv+argc);
+
+  //Save -debugdep, -annot file .. etc, 
+  // used internally in ReadAnnotation and Loop transformation
+  CmdOptions::GetInstance()->SetOptions(argvList);
+  bool dumpAnnot = isOption(argvList,"","-dumpannot",true);
+
+  //Read in annotations---------------------------- 
+  ArrayAnnotation* annot = ArrayAnnotation::get_inst();
+  annot->register_annot();
+  ReadAnnotation::get_inst()->read();
+  if (dumpAnnot)  
+    annot->Dump();
+
+  // Strip off custom options and their values to enable backend compiler 
+  removeArgsWithParameters(argvList,"-annot");
+
+  /* We use ArrayAnnotation now
+  OperatorSideEffectAnnotation *funcInfo =  OperatorSideEffectAnnotation::get_inst();
+  funcInfo->register_annot();
+  ReadAnnotation::get_inst()->read();
+  AssumeNoAlias aliasInfo;
+  */
+
+  SgProject *project = frontend (argvList);
+  ROSE_ASSERT (project != NULL);
+  
+  // For each source file in the project
+    SgFilePtrList & ptr_list = project->get_fileList();
+    for (SgFilePtrList::iterator iter = ptr_list.begin(); iter!=ptr_list.end();
+        iter++)
+   {
+     SgFile* sageFile = (*iter);
+     SgSourceFile * sfile = isSgSourceFile(sageFile);
+     ROSE_ASSERT(sfile);
+     SgGlobal *root = sfile->get_globalScope();
+     SgDeclarationStatementPtrList& declList = root->get_declarations ();
+     bool hasOpenMP= false; // flag to indicate if omp.h is needed
+
+    //For each function body in the file
+     for (SgDeclarationStatementPtrList::iterator p = declList.begin(); p != declList.end(); ++p) 
+     {
+        SgFunctionDeclaration *func = isSgFunctionDeclaration(*p);
+        if (func == 0)  continue;
+        SgFunctionDefinition *defn = func->get_definition();
+        if (defn == 0)  continue;
+        SgBasicBlock *body = defn->get_body();  
+
+        // Replace operators with their equivalent counterparts defined 
+        // in "inline" annotations
+        AstInterfaceImpl scope(body);
+        CPPAstInterface fa_body(&scope);
+        OperatorInlineRewrite()( fa_body, AstNodePtrImpl(body));
+         
+	 // Pass annotations to arrayInterface and use them to collect alias info. function info etc.  
+         ArrayInterface array_interface(*annot);
+         array_interface.initialize(fa_body, AstNodePtrImpl(defn));
+         array_interface.observe(fa_body);
+
+        // For each loop (For-loop for now)
+        Rose_STL_Container<SgNode*> loops = NodeQuery::querySubTree(defn,V_SgForStatement); 
+        if (loops.size()==0) continue;
+        
+  // Invoke loop transformation, dependence analysis only
+   
+        // 1. Loop normalization changes the original code, 
+        // may not be desired for s2s translation
+        // Loop normalization, starting from the parent BB  is fine
+        // Bridge pattern:  interface -- implementation grow independently
+        // Implementation side: attach to AST function body
+        AstInterfaceImpl faImpl_0 = AstInterfaceImpl(body);
+        // Build AST abstraction side, a reference to the implementation 
+        AstInterface fa_0(&faImpl_0);
+        NormalizeForLoop(fa_0, AstNodePtrImpl(body));
+        
+        //TODO working on first loop, how to get all first level loops?
+        // Prepare AstInterface: implementation and head pointer
+        AstInterfaceImpl faImpl = AstInterfaceImpl(loops[0]);
+        AstInterface fa(&faImpl);
+        AstNodePtr head = AstNodePtrImpl(loops[0]);
+        //AstNodePtr head = AstNodePtrImpl(body);
+        fa.SetRoot(head);
+
+        //2.  Call dependence analysis directly on a loop node
+        //LoopTransformInterface la (fa,aliasInfo,funcInfo); 
+        LoopTransformInterface la (fa,array_interface,annot, &array_interface); 
+        LoopTreeDepCompCreate comp(la,head);
+
+        // Retrieve dependence graph here!
+        cout<<"Dump the dependence graph for the loop in question:"<<endl; 
+        comp.DumpDep();
+        //LoopTreeNodeDepMap depmap = comp.GetTreeNodeMap();
+       
+       // Get the loop hierarchy :grab just a top one for now
+       // TODO consider complex loop nests like loop {loop, loop} and loop{loop {loop}}
+       LoopTreeNode * loop_root = comp.GetLoopTreeRoot();
+       ROSE_ASSERT(loop_root!=NULL);
+       //loop_root->Dump();
+
+       LoopTreeTraverseSelectLoop loop_nodes(loop_root, LoopTreeTraverse::PreOrder);
+       LoopTreeNode * cur_loop = loop_nodes.Current();
+
+       // three-level loop: i,j,k
+       AstNodePtr ast_ptr;
+       if (cur_loop)
+       {  
+         //cur_loop->Dump();
+         //loop_nodes.Advance();
+         //loop_nodes.Current()->Dump();
+         //loop_nodes.Advance();
+         //loop_nodes.Current()->Dump();
+         ast_ptr = cur_loop->GetOrigStmt2();
+        // cout<<AstToString(ast_ptr)<<endl;
+       }
+       else
+       {
+         ROSE_ASSERT(false);  
+       }
+
+       ROSE_ASSERT(ast_ptr!=NULL);
+       SgNode* sg_node = AstNodePtr2Sage(ast_ptr);
+       ROSE_ASSERT(sg_node);
+      // cout<<"-------------Dump the loops in question------------"<<endl; 
+      //   cout<<sg_node->class_name()<<endl;
+
+       //3. Judge if loops are parallelizable
+       // Algorithm, for each depInfo, 
+       //   commonlevel >=0, depInfo is within a loop
+       // simplest one first: 1 level loop only, 
+       // iterate dependence edges, 
+       // check if there is loop carried dependence at all 
+       // (Carry level ==0 for top level common loops)
+       bool isParallelizable = true;
+
+       vector<DepInfo>  remainingDependences;
+
+        LoopTreeDepGraph * depgraph =  comp.GetDepGraph(); 
+        LoopTreeDepGraph::NodeIterator nodes = depgraph->GetNodeIterator();
+        for (; !nodes.ReachEnd(); ++ nodes)
+        {
+          LoopTreeDepGraph::Node* curnode = *nodes;
+          LoopTreeDepGraph::EdgeIterator edges = depgraph->GetNodeEdgeIterator(curnode, GraphAccess::EdgeOut);
+          if (!edges.ReachEnd())
+          {
+             for (; !edges.ReachEnd(); ++edges)
+             { 
+               LoopTreeDepGraph::Edge *e= *edges;
+              // cout<<"dependence edge: "<<e->toString()<<endl;
+               DepInfo info =e->GetInfo();
+             
+               // eliminate dependence relationship if
+               // the variables are thread-local: (within the scope of the loop's scope)
+               SgScopeStatement * currentscope= getScope(sg_node);  
+               SgScopeStatement* varscope =NULL;
+               SgNode* src_node = AstNodePtr2Sage(info.SrcRef());
+               if (src_node)
+               {
+                 SgVarRefExp* var_ref = isSgVarRefExp(src_node);
+                 if (var_ref)
+                 {  
+                   varscope= var_ref->get_symbol()->get_scope();
+                   if (isAncestor(currentscope,varscope))
+                     continue;
+                 } //end if(var_ref)
+               } // end if (src_node)
+
+                // skip non loop carried dependencies: 
+                // TODO scalar issue, wrong CarryLevel
+                // loop independent dependencies: need privatization can eliminate most of them
+               if (info.CarryLevel()!=0) 
+                 continue;
+                
+               remainingDependences.push_back(info); 
+             } //end iterator edges for a node
+          } // end if 
+        } // end of iterate dependence graph 
+
+      //TODO liveness analysis to classify variables and further eliminate dependences
+      
+      // Set to unparallelizable if it has dependences which can not eliminated
+      if (remainingDependences.size()>0) isParallelizable = false;
+
+       comp.DetachDepGraph();// release resources here
+      //4.  Attach OmpAttribute to the loop node if it is parallelizable 
+       if (isParallelizable)
+       {  
+          // TODO add variable classification to set private,shared variables 
+          OmpAttribute* omp_attribute = buildOmpAttribute(e_parallel_for,sg_node);
+          addOmpAttribute(omp_attribute,sg_node);
+          hasOpenMP = true;
+        } 
+        else
+        {
+          cout<<"\n Unparallelizable loop at line:"<<sg_node->get_file_info()->get_line()<<
+               " due to the following dependencies:"<<endl;
+          for (vector<DepInfo>::iterator iter= remainingDependences.begin();     
+               iter != remainingDependences.end(); iter ++ )
+          {
+            cout<<(*iter).toString()<<endl;
+          }
+
+        } // end if 
+
+        // 5. Generate and insert #pragma omp parallel for 
+        // This phase is deliberately separated from buildOmpAttribute()
+        OmpAttribute* att = getOmpAttribute(sg_node); 
+        if(att)
+        {  
+            cout<<"\n Parallelizing a loop at line:"
+              <<sg_node->get_file_info()->get_line()<<endl;
+            string pragma_str= att->toOpenMPString();
+            SgPragmaDeclaration * pragma = SageBuilder::buildPragmaDeclaration(pragma_str); 
+            SageInterface::insertStatementBefore(isSgStatement(sg_node), pragma);
+        } // end inserting #pragma   
+
+     } // end for-loop for declarations
+     // insert omp.h if OpenMP directives have been inserted into the current file 
+     if (hasOpenMP)
+       SageInterface::insertHeader("omp.h",false,root);
+   } //end for-loop of files
+
+  // Qing's loop normalization is not robust enough to pass all tests
+  //AstTests::runAllTests(project);
+  
+  //we only unparse it to avoid -I path/to/omp.h
+   project->unparse();
+  //return backend (project);
+  return 0;
+}

Deleted: branches/testonly/projects/autoParallelization/makefile.external
===================================================================
--- trunk/projects/autoParallelization/makefile.external	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/makefile.external	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,42 +0,0 @@
-# A makefile if this project is compiled outside of the ROSE source tree
-#
-#ROSE_INS = /home/liao6/daily-test-rose/20080429_040001/install
-ROSE_INS = /home/liao/daily-test-rose/20081031_082744/install
-#BOOST_ROOT=/home/liao6/opt/boost_1_35_0
-BOOST_ROOT=/home/liao/opt/boost-1.35.0
-
-SRC_FILE=main.C
-
-#INPUT_CODE=doall.c
-#INPUT_CODE=inner_only.c
-#INPUT_CODE=matrixmultiply-kernel.c
-#INPUT_CODE=doall_l2.c
-#INPUT_CODE=both_levels.c
-#INPUT_CODE=pointers.cpp
-#INPUT_CODE=reduction.c
-#INPUT_CODE=shared.c
-#INPUT_CODE=output2.c
-#INPUT_CODE=output.c
-INPUT_CODE=output3.c
-#INPUT_CODE=private.c
-#INPUT_CODE=doall_vector.C
-#INPUT_CODE=jacobi_s.c
-#INPUT_CODE=test_1.C
-
-
-CPP_FLAG=-g3 -Wall
-
-.PHONY :clean test default
-all:clean test
-default: a.out test 
-OmpAttribute.o: OmpAttribute.C OmpAttribute.h
-	g++ -c $(CPP_FLAG)  $< -I $(BOOST_ROOT)/include/boost-1_35 -I $(ROSE_INS)/include -I/usr/include/libxml2
-main.o:$(SRC_FILE)
-	g++ -c $(CPP_FLAG) $^ -I $(BOOST_ROOT)/include/boost-1_35 -I $(ROSE_INS)/include -I/usr/include/libxml2 
-a.out:main.o OmpAttribute.o
-	g++ $(CPP_FLAG) $^ -I $(BOOST_ROOT)/include/boost-1_35 -I $(ROSE_INS)/include -I/usr/include/libxml2 -L$(ROSE_INS)/lib -lrose
-
-test: a.out
-	./a.out -c  -rose:verbose 0 -g3 $(INPUT_CODE) 
-clean:
-	rm -rf a.out *.o rose_*

Copied: branches/testonly/projects/autoParallelization/makefile.external (from rev 128, trunk/projects/autoParallelization/makefile.external)
===================================================================
--- branches/testonly/projects/autoParallelization/makefile.external	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/makefile.external	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,42 @@
+# A makefile if this project is compiled outside of the ROSE source tree
+#
+#ROSE_INS = /home/liao6/daily-test-rose/20080429_040001/install
+ROSE_INS = /home/liao/daily-test-rose/20081031_082744/install
+#BOOST_ROOT=/home/liao6/opt/boost_1_35_0
+BOOST_ROOT=/home/liao/opt/boost-1.35.0
+
+SRC_FILE=main.C
+
+#INPUT_CODE=doall.c
+#INPUT_CODE=inner_only.c
+#INPUT_CODE=matrixmultiply-kernel.c
+#INPUT_CODE=doall_l2.c
+#INPUT_CODE=both_levels.c
+#INPUT_CODE=pointers.cpp
+#INPUT_CODE=reduction.c
+#INPUT_CODE=shared.c
+#INPUT_CODE=output2.c
+#INPUT_CODE=output.c
+INPUT_CODE=output3.c
+#INPUT_CODE=private.c
+#INPUT_CODE=doall_vector.C
+#INPUT_CODE=jacobi_s.c
+#INPUT_CODE=test_1.C
+
+
+CPP_FLAG=-g3 -Wall
+
+.PHONY :clean test default
+all:clean test
+default: a.out test 
+OmpAttribute.o: OmpAttribute.C OmpAttribute.h
+	g++ -c $(CPP_FLAG)  $< -I $(BOOST_ROOT)/include/boost-1_35 -I $(ROSE_INS)/include -I/usr/include/libxml2
+main.o:$(SRC_FILE)
+	g++ -c $(CPP_FLAG) $^ -I $(BOOST_ROOT)/include/boost-1_35 -I $(ROSE_INS)/include -I/usr/include/libxml2 
+a.out:main.o OmpAttribute.o
+	g++ $(CPP_FLAG) $^ -I $(BOOST_ROOT)/include/boost-1_35 -I $(ROSE_INS)/include -I/usr/include/libxml2 -L$(ROSE_INS)/lib -lrose
+
+test: a.out
+	./a.out -c  -rose:verbose 0 -g3 $(INPUT_CODE) 
+clean:
+	rm -rf a.out *.o rose_*

Copied: branches/testonly/projects/autoParallelization/tests (from rev 128, trunk/projects/autoParallelization/tests)

Deleted: branches/testonly/projects/autoParallelization/tests/Index.annot
===================================================================
--- trunk/projects/autoParallelization/tests/Index.annot	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/Index.annot	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,32 +0,0 @@
-class InternalIndex { has_value { stride = this.stride; base = this.base; length = this.length; } }
-class Index { has_value { stride = this.stride; base = this.base; length = this.length; } }
-class Range { has_value { stride = this.stride; base = this.base; length = this.length; } }
-
-operator Index::Index( int lb, int l, int step) 
-      {
-       modify none; read {lb, l, step}; alias none; 
-       restrict_value { result = { base = lb; length = l; stride = step; } };
-      }
-operator Range::Range( int lb, int ub, int step) 
-      {
-       modify none; read {lb, ub, step}; alias none;
-       restrict_value { result = { base = lb; length = (ub-lb+1)/step; stride = step; } };
-      }
-operator InternalIndex::InternalIndex( int lb, int l, int step) 
-      {
-       modify none; read {lb, l, step}; alias none; 
-       restrict_value { result = { base = lb; length = l; stride = step; } };
-      }
-
-operator operator+ ( const InternalIndex & lhs, int x ) 
-      {
-       modify none; read {lhs, x}; alias none; 
-    restrict_value { result = {stride = lhs.stride; base = lhs.base + x; 
-                               length = lhs.length}; };
-      }
-operator operator- ( const InternalIndex & lhs, int x ) 
-      {
-       modify none; read {lhs, x}; alias none; 
-    restrict_value { result = {stride = lhs.stride; base = lhs.base - x; 
-                               length = lhs.length}; };
-      }

Copied: branches/testonly/projects/autoParallelization/tests/Index.annot (from rev 128, trunk/projects/autoParallelization/tests/Index.annot)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/Index.annot	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/Index.annot	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,32 @@
+class InternalIndex { has_value { stride = this.stride; base = this.base; length = this.length; } }
+class Index { has_value { stride = this.stride; base = this.base; length = this.length; } }
+class Range { has_value { stride = this.stride; base = this.base; length = this.length; } }
+
+operator Index::Index( int lb, int l, int step) 
+      {
+       modify none; read {lb, l, step}; alias none; 
+       restrict_value { result = { base = lb; length = l; stride = step; } };
+      }
+operator Range::Range( int lb, int ub, int step) 
+      {
+       modify none; read {lb, ub, step}; alias none;
+       restrict_value { result = { base = lb; length = (ub-lb+1)/step; stride = step; } };
+      }
+operator InternalIndex::InternalIndex( int lb, int l, int step) 
+      {
+       modify none; read {lb, l, step}; alias none; 
+       restrict_value { result = { base = lb; length = l; stride = step; } };
+      }
+
+operator operator+ ( const InternalIndex & lhs, int x ) 
+      {
+       modify none; read {lhs, x}; alias none; 
+    restrict_value { result = {stride = lhs.stride; base = lhs.base + x; 
+                               length = lhs.length}; };
+      }
+operator operator- ( const InternalIndex & lhs, int x ) 
+      {
+       modify none; read {lhs, x}; alias none; 
+    restrict_value { result = {stride = lhs.stride; base = lhs.base - x; 
+                               length = lhs.length}; };
+      }

Deleted: branches/testonly/projects/autoParallelization/tests/Makefile.am
===================================================================
--- trunk/projects/autoParallelization/tests/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,74 +0,0 @@
-include $(top_srcdir)/config/Makefile.for.ROSE.includes.and.libs
-
-# the code which can be parallelized or confirmed as not parallelizable now
-C_TESTCODES_REQUIRED_TO_PASS = \
-anti_dep.c \
-doall.c \
-scalar_privatization.c \
-true_dep.c \
-output_dep.c
-
-CXX_TESTCODES_REQUIRED_TO_PASS = 
-
-# the code which can not yet be parallelized now
-TESTCODE_CURRENTLY_FAILING = \
-doall_2.c \
-firstprivate.c \
-inner_only.c \
-jacobi_seq.c \
-lastprivate.c \
-matrixmultiply.c \
-output_dep2.c \
-output_dep3.c \
-pointer.c \
-private.c \
-reduction.c \
-shared.c \
-true_dep_2.c \
-true_l2.c \
-vectorize_1.c \
-doall_vector.C \
-vector_1.C \
-vector_2.C
-
-ALL_TESTCODES = \
-$(C_TESTCODES_REQUIRED_TO_PASS) \
-$(CXX_TESTCODES_REQUIRED_TO_PASS) \
-$(TESTCODE_CURRENTLY_FAILING)
-
-# ROSE_FLAGS = -rose:C_only -rose:verbose 2 --edg:restrict
-ROSE_FLAGS = --edg:no_warnings -w -rose:C -rose:verbose 0 --edg:restrict
-
-VALGRIND_OPTIONS = --tool=memcheck -v --num-callers=30 --leak-check=no --error-limit=no --show-reachable=yes
-# VALGRIND = /usr/apps/valgrind/new/bin/valgrind $(VALGRIND_OPTIONS)
-VALGRIND =
-
-C_TEST_Objects = ${C_TESTCODES_REQUIRED_TO_PASS:.c=.o}
-CXX_TEST_Objects = ${CXX_TESTCODES_REQUIRED_TO_PASS:.C=.o}
-
-$(C_TEST_Objects): ../autoPar $(@:.o=.c)
-	$(VALGRIND) ../autoPar $(ROSE_FLAGS) -c $(srcdir)/$(@:.o=.c)
-$(CXX_TEST_Objects): ../autoPar $(@:.o=.C)
-	$(VALGRIND) ../autoPar $(ROSE_FLAGS) -c $(srcdir)/$(@:.o=.C)
-rose_interp1_elem.C: ../autoPar interp1_elem.C
-	$(VALGRIND) ../autoPar -c -annot $(srcdir)/floatArray.annot -annot $(srcdir)/funcs.annot -annot $(srcdir)/Index.annot $(srcdir)/interp1_elem.C	
-
-rose_doall_vector.C: ../autoPar doall_vector.C
-	$(VALGRIND) ../autoPar -c -annot $(srcdir)/std_vector.annot $(srcdir)/doall_vector.C
-
-check-local:
-	@echo "Test for ROSE automatic parallelization."
-	@$(MAKE) $(C_TEST_Objects)
-	@$(MAKE) $(CXX_TEST_Objects)
-	@echo "***********************************************************************************************************"
-	@echo "****** ROSE/projects/autoParallelization/tests: make check rule complete (terminated normally) ******"
-	@echo "***********************************************************************************************************"
-
-EXTRA_DIST = $(ALL_TESTCODES) funcs.annot floatArray.annot Index.annot simpleA++.h interp1_elem.C
-
-clean-local:
-	rm -f *.o rose_*.[cC] 
-
-	
-
-

Copied: branches/testonly/projects/autoParallelization/tests/Makefile.am (from rev 128, trunk/projects/autoParallelization/tests/Makefile.am)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/Makefile.am	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,74 @@
+include $(top_srcdir)/config/Makefile.for.ROSE.includes.and.libs
+
+# the code which can be parallelized or confirmed as not parallelizable now
+C_TESTCODES_REQUIRED_TO_PASS = \
+anti_dep.c \
+doall.c \
+scalar_privatization.c \
+true_dep.c \
+output_dep.c
+
+CXX_TESTCODES_REQUIRED_TO_PASS = 
+
+# the code which can not yet be parallelized now
+TESTCODE_CURRENTLY_FAILING = \
+doall_2.c \
+firstprivate.c \
+inner_only.c \
+jacobi_seq.c \
+lastprivate.c \
+matrixmultiply.c \
+output_dep2.c \
+output_dep3.c \
+pointer.c \
+private.c \
+reduction.c \
+shared.c \
+true_dep_2.c \
+true_l2.c \
+vectorize_1.c \
+doall_vector.C \
+vector_1.C \
+vector_2.C
+
+ALL_TESTCODES = \
+$(C_TESTCODES_REQUIRED_TO_PASS) \
+$(CXX_TESTCODES_REQUIRED_TO_PASS) \
+$(TESTCODE_CURRENTLY_FAILING)
+
+# ROSE_FLAGS = -rose:C_only -rose:verbose 2 --edg:restrict
+ROSE_FLAGS = --edg:no_warnings -w -rose:C -rose:verbose 0 --edg:restrict
+
+VALGRIND_OPTIONS = --tool=memcheck -v --num-callers=30 --leak-check=no --error-limit=no --show-reachable=yes
+# VALGRIND = /usr/apps/valgrind/new/bin/valgrind $(VALGRIND_OPTIONS)
+VALGRIND =
+
+C_TEST_Objects = ${C_TESTCODES_REQUIRED_TO_PASS:.c=.o}
+CXX_TEST_Objects = ${CXX_TESTCODES_REQUIRED_TO_PASS:.C=.o}
+
+$(C_TEST_Objects): ../autoPar $(@:.o=.c)
+	$(VALGRIND) ../autoPar $(ROSE_FLAGS) -c $(srcdir)/$(@:.o=.c)
+$(CXX_TEST_Objects): ../autoPar $(@:.o=.C)
+	$(VALGRIND) ../autoPar $(ROSE_FLAGS) -c $(srcdir)/$(@:.o=.C)
+rose_interp1_elem.C: ../autoPar interp1_elem.C
+	$(VALGRIND) ../autoPar -c -annot $(srcdir)/floatArray.annot -annot $(srcdir)/funcs.annot -annot $(srcdir)/Index.annot $(srcdir)/interp1_elem.C	
+
+rose_doall_vector.C: ../autoPar doall_vector.C
+	$(VALGRIND) ../autoPar -c -annot $(srcdir)/std_vector.annot $(srcdir)/doall_vector.C
+
+check-local:
+	@echo "Test for ROSE automatic parallelization."
+	@$(MAKE) $(C_TEST_Objects)
+	@$(MAKE) $(CXX_TEST_Objects)
+	@echo "***********************************************************************************************************"
+	@echo "****** ROSE/projects/autoParallelization/tests: make check rule complete (terminated normally) ******"
+	@echo "***********************************************************************************************************"
+
+EXTRA_DIST = $(ALL_TESTCODES) funcs.annot floatArray.annot Index.annot simpleA++.h interp1_elem.C
+
+clean-local:
+	rm -f *.o rose_*.[cC] 
+
+	
+
+

Deleted: branches/testonly/projects/autoParallelization/tests/anti_dep.c
===================================================================
--- trunk/projects/autoParallelization/tests/anti_dep.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/anti_dep.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,11 +0,0 @@
-/*
- * An anti-dependence example
- */
-void foo()
-{
-  int i;
-  int a[100];
-
-  for (i=0;i<99;i++)
-    a[i]=a[i+1]+1;
-}  

Copied: branches/testonly/projects/autoParallelization/tests/anti_dep.c (from rev 128, trunk/projects/autoParallelization/tests/anti_dep.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/anti_dep.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/anti_dep.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,11 @@
+/*
+ * An anti-dependence example
+ */
+void foo()
+{
+  int i;
+  int a[100];
+
+  for (i=0;i<99;i++)
+    a[i]=a[i+1]+1;
+}  

Deleted: branches/testonly/projects/autoParallelization/tests/doall.c
===================================================================
--- trunk/projects/autoParallelization/tests/doall.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/doall.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,27 +0,0 @@
-void foo()
-{
-  int i, a[100];
-  for (i=0;i<100;i++) 
-    a[i]=a[i]+1;
-}  
-/*  
- *  ..= a[i]+1 // read
- *  a[i] == // write
- *  non-loop carried anti-dependence : Write-after-Read
- *
- dep SgExprStatement:a[i] =((a[i]) + 1); 
-     SgExprStatement:a[i] =((a[i]) + 1); 
-
-     1*1 ANTI_DEP; commonlevel = 1 CarryLevel = 1  Is precise 
-  SgPntrArrRefExp:(a[i])@5:11->SgPntrArrRefExp:a[i]@5:9 == 0;||::
- 
-  dependence edge: 1*1 ANTI_DEP; commonlevel = 1 CarryLevel = 1  Is precise 
-
-distance matrix: common loops surrounding two statement: 
-* common level: how many levels are shared loops?
-* carry level: loop dependence carry level: start from 0
-
-  SgPntrArrRefExp:(a[i])@5:11->SgPntrArrRefExp:a[i]@5:9 == 0;||::
-
- *
- */

Copied: branches/testonly/projects/autoParallelization/tests/doall.c (from rev 128, trunk/projects/autoParallelization/tests/doall.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/doall.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/doall.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,27 @@
+void foo()
+{
+  int i, a[100];
+  for (i=0;i<100;i++) 
+    a[i]=a[i]+1;
+}  
+/*  
+ *  ..= a[i]+1 // read
+ *  a[i] == // write
+ *  non-loop carried anti-dependence : Write-after-Read
+ *
+ dep SgExprStatement:a[i] =((a[i]) + 1); 
+     SgExprStatement:a[i] =((a[i]) + 1); 
+
+     1*1 ANTI_DEP; commonlevel = 1 CarryLevel = 1  Is precise 
+  SgPntrArrRefExp:(a[i])@5:11->SgPntrArrRefExp:a[i]@5:9 == 0;||::
+ 
+  dependence edge: 1*1 ANTI_DEP; commonlevel = 1 CarryLevel = 1  Is precise 
+
+distance matrix: common loops surrounding two statement: 
+* common level: how many levels are shared loops?
+* carry level: loop dependence carry level: start from 0
+
+  SgPntrArrRefExp:(a[i])@5:11->SgPntrArrRefExp:a[i]@5:9 == 0;||::
+
+ *
+ */

Deleted: branches/testonly/projects/autoParallelization/tests/doall_2.c
===================================================================
--- trunk/projects/autoParallelization/tests/doall_2.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/doall_2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,22 +0,0 @@
-int i,j;
-int a[100][100];
-
-void foo()
-{
-  for (i=0;i<100;i++)
-    for (j=0;j<100;j++)
-      a[i][j]=a[i][j]+1;
-}
-/*
- * final dependence graph:
-dep SgExprStatement:(a[i])[j] =(((a[i])[j]) + 1); 
-    SgExprStatement:(a[i])[j] =(((a[i])[j]) + 1); 
-2*2 ANTI_DEP; commonlevel = 2  +precise  CarryLevel = 2 //level =0,1,2 no loop carried dependence!!
-  SgPntrArrRefExp:((a[i])[j])
-  SgPntrArrRefExp:(a[i])[j]== 0;* 0;:* 0;== 0;:::
-
-Two accesses: distance =0, non loop-carried
-  write after read for a[i]: anti-dependence
-
- */
-

Copied: branches/testonly/projects/autoParallelization/tests/doall_2.c (from rev 128, trunk/projects/autoParallelization/tests/doall_2.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/doall_2.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/doall_2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,22 @@
+int i,j;
+int a[100][100];
+
+void foo()
+{
+  for (i=0;i<100;i++)
+    for (j=0;j<100;j++)
+      a[i][j]=a[i][j]+1;
+}
+/*
+ * final dependence graph:
+dep SgExprStatement:(a[i])[j] =(((a[i])[j]) + 1); 
+    SgExprStatement:(a[i])[j] =(((a[i])[j]) + 1); 
+2*2 ANTI_DEP; commonlevel = 2  +precise  CarryLevel = 2 //level =0,1,2 no loop carried dependence!!
+  SgPntrArrRefExp:((a[i])[j])
+  SgPntrArrRefExp:(a[i])[j]== 0;* 0;:* 0;== 0;:::
+
+Two accesses: distance =0, non loop-carried
+  write after read for a[i]: anti-dependence
+
+ */
+

Deleted: branches/testonly/projects/autoParallelization/tests/doall_vector.C
===================================================================
--- trunk/projects/autoParallelization/tests/doall_vector.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/doall_vector.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,9 +0,0 @@
-#include <vector>
-void foo ()
-{
-  int i;
-  std::vector <int> v1(100);
-//  for (i=0; i< v1.size(); i++)
-  for (i=0; i<100; i++)
-    v1[i] = v1[i] +1; 
-}

Copied: branches/testonly/projects/autoParallelization/tests/doall_vector.C (from rev 128, trunk/projects/autoParallelization/tests/doall_vector.C)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/doall_vector.C	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/doall_vector.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,9 @@
+#include <vector>
+void foo ()
+{
+  int i;
+  std::vector <int> v1(100);
+//  for (i=0; i< v1.size(); i++)
+  for (i=0; i<100; i++)
+    v1[i] = v1[i] +1; 
+}

Deleted: branches/testonly/projects/autoParallelization/tests/firstprivate.c
===================================================================
--- trunk/projects/autoParallelization/tests/firstprivate.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/firstprivate.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,21 +0,0 @@
-/*
- * dependence graph:
- */
-void foo()
-{
-  int i,x=1;
-  int a[100];
-  int b[100];
-// x should be recognized as a firstprivate variable during parallelization
-// Does it introduce any data dependencies ?
-// could be (as regular private variables )
-  for (i=0;i<100;i++) 
-  { 
-    b[i]=x+1;
-    // x=...
-    // ... =x
-  }  
-}  
-/*
- 
- */

Copied: branches/testonly/projects/autoParallelization/tests/firstprivate.c (from rev 128, trunk/projects/autoParallelization/tests/firstprivate.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/firstprivate.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/firstprivate.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,21 @@
+/*
+ * dependence graph:
+ */
+void foo()
+{
+  int i,x=1;
+  int a[100];
+  int b[100];
+// x should be recognized as a firstprivate variable during parallelization
+// Does it introduce any data dependencies ?
+// could be (as regular private variables )
+  for (i=0;i<100;i++) 
+  { 
+    b[i]=x+1;
+    // x=...
+    // ... =x
+  }  
+}  
+/*
+ 
+ */

Deleted: branches/testonly/projects/autoParallelization/tests/floatArray.annot
===================================================================
--- trunk/projects/autoParallelization/tests/floatArray.annot	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/floatArray.annot	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,372 +0,0 @@
-class floatArray {
-    array {
-      dimension = 6; 
-      length(i) =  this.Array_Descriptor.Array_Domain.Size[i];
-      elem(i:dim:1:dimension) = this(i$dim);
-      reshape(i:dim:1:dimension) = this.resize(i$dim);
-     };
-     array_optimize {
-      define {
-       float* _pointer = this.getDataPointer();
-       int _size:dim:1:dimension = this.Array_Descriptor.Array_Domain.Size[dim-1];
-       int _stride:dim:1:dimension = this.Array_Descriptor.Array_Domain.Stride[dim-1];
-       int _length:dim:1:dimension =  this.Array_Descriptor.Array_Domain.getLength(dim-1)
-      }
-      length(i) = _length$(i+1);
-      elem(i:dim:1:dimension) =
-           _pointer[i$1 + repeat(x,2,dimension, i$x * _stride$(x-1) * _size$(x-1))];
-     };
-     has_value { dimension = 6; length_0 = this.length(0); 
-                 length_1 = this.length(1); length_2 = this.length(2); };
-  }
-
-operator floatArray::operator() (int index) 
-              {
-                   modify none; read {index};
-                   alias none;
-                   restrict_value { this = { dimension = 1; } };
-                   inline { this.elem(index) };
-              }
-
-operator floatArray::operator() ( const InternalIndex& index) 
-              {
-                   modify none; read {this, index};
-                   alias { (result, this) };
-                   restrict_value 
-                       { this = { dimension = 1; }; 
-                         result = {dimension = 1; length_0 = index.length;}; };
-                   construct_array (this) { 
-                       dimension = 1;
-                       length(0) = index.length;
-                       elem(i) = this.elem(i * index.stride + index.base); 
-                   }; 
-               }
-operator floatArray::operator()(const InternalIndex& index1, 
-                                const InternalIndex& index2) 
-              {
-                   modify none; read {this, index1, index2};
-                   alias { (result, this) };
-                   restrict_value
-                       { this = { dimension = 2; };
-                         result = {dimension = 2; length_0 = index1.length; 
-                                   length_1 = index2.length}; 
-                       };
-                   construct_array (this) {
-                       dimension = 2;
-                       length(0) = index1.length; length(1) = index2.length;
-                       elem(i,j) = this.elem(i * index1.stride + index1.base,
-                                             j * index2.stride + index2.base);
-                   };
-               }
-operator floatArray::operator()(const InternalIndex& index1,
-                                const InternalIndex& index2,
-                                const InternalIndex& index3) 
-              {
-                   modify none; read {this, index1, index2, index3};
-                   alias { (result, this) };
-                   restrict_value
-                       { this = { dimension = 3; };
-                         result = {dimension = 3; length_0 = index1.length;
-                                   length_1 = index2.length; length_2 = index3.length; };
-                       };
-                   construct_array (this) {
-                       dimension = 3;
-                       length(0) = index1.length; length(1) = index2.length;
-                       length(2) = index3.length;
-                       elem(i,j,k) = this.elem(i * index1.stride + index1.base,
-                                             j * index2.stride + index2.base,
-                                             k * index3.stride + index3.base);
-                   };
-               }
-
-
-
-operator floatArray::operator= (const floatArray& that) 
-              { 
-                   modify {this}; read {that}; alias none;
-                   restrict_value {
-                      result = { dimension = that.dimension; length_0 = that.length_0;};
-                   };
-                   modify_array (this) { 
-                       dimension = that.dimension;
-                       length(i) = that.length(i);
-                       elem(i:dim:1:dimension) = that.elem(i$dim);
-                   }; 
-               }
-operator floatArray::operator= (float val) 
-              {
-                   modify {this}; read {val}; alias none;
-                   modify_array (this) {
-                       elem(i:dim:1:dimension) = val;
-                   };
-               }
-
-operator floatArray::getLength( int dim) 
-              {
-                   modify none; read {dim}; alias none;
-                   inline { this.length(dim) };
-              }
-
-operator floatArray::fill( float val) 
-              {
-                   modify {this}; read {val}; alias none;
-                   modify_array (this) {
-                       elem(i:dim:1:dimension) = val;
-                   };
-               }
-operator floatArray::replace( const intArray& cond, float val) 
-              {
-                   modify {this}; read {cond, val}; alias none;
-               }
-operator floatArray::replace( const intArray& cond, const floatArray& val) 
-              {
-                   modify {this}; read {cond, val}; alias none;
-               }
-
-operator floatArray::floatArray (int len) 
-              { 
-                   modify none; read {len}; alias none;
-                   restrict_value {this = { dimension = 1; length_0 = len; } };
-                 construct_array (none) { dimension = 1; length(0) = len }; 
-               }
-
-                                          
-operator operator+ (const floatArray& lhs, const floatArray& rhs) 
-              {
-                  modify none; read{lhs, rhs}; alias none;
-                   restrict_value {
-                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
-                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
-                   };
-                  construct_array (none) { 
-                       dimension = lhs.dimension;
-                       length(i) = lhs.length(i);
-                       elem(i:dim:1:dimension) = lhs.elem(i$dim) + rhs.elem(i$dim);
-                  } ; 
-               }
-operator operator+ ( float lhs, const floatArray & rhs) 
-              {
-                  modify none; read{lhs, rhs}; alias none;
-                   restrict_value {
-                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
-                   };
-                  construct_array (none) { 
-                       dimension = rhs.dimension;
-                       length(i) = rhs.length(i);
-                       elem(i:dim:1:dimension) = lhs + rhs.elem(i$dim);
-                  } ; 
-               }
-operator operator+ ( const floatArray & lhs, float rhs) 
-              {
-                  modify none; read{lhs, rhs}; alias none;
-                   restrict_value {
-                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
-                   };
-                  construct_array (none) { 
-                       dimension = lhs.dimension;
-                       length(i) = lhs.length(i);
-                       elem(i:dim:1:dimension) = lhs.elem(i$dim) + rhs;
-                  } ; 
-               }
-operator operator- ( const floatArray & lhs, const floatArray & rhs) 
-              {
-                  modify none; read{lhs, rhs}; alias none;
-                   restrict_value {
-                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
-                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
-                   };
-                  construct_array (none) { 
-                       dimension = lhs.dimension;
-                       length(i) = lhs.length(i);
-                       elem(i:dim:1:dimension) = lhs.elem(i$dim) - rhs.elem(i$dim);
-                  } ; 
-               }
-operator operator- ( const floatArray & lhs, float rhs) 
-              {
-                  modify none; read{lhs, rhs}; alias none;
-                   restrict_value {
-                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
-                   };
-                  construct_array (none) { 
-                       dimension = lhs.dimension;
-                       length(i) = lhs.length(i);
-                       elem(i:dim:1:dimension) = lhs.elem(i$dim) - rhs;
-                  } ; 
-               }
-operator operator* ( const floatArray & lhs, const floatArray & rhs) 
-              {
-                  modify none; read{lhs, rhs}; alias none;
-                   restrict_value {
-                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
-                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
-                   };
-                  construct_array (none) { 
-                       dimension = lhs.dimension;
-                       length(i) = lhs.length(i);
-                       elem(i:dim:1:dimension) = lhs.elem(i$dim) * rhs.elem(i$dim);
-                  } ; 
-               }
-operator operator* ( float lhs, const floatArray & rhs) 
-              {
-                  modify none; read{lhs, rhs}; alias none;
-                   restrict_value {
-                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
-                   };
-                  construct_array (none) { 
-                       dimension = rhs.dimension;
-                       length(i) = rhs.length(i);
-                       elem(i:dim:1:dimension) = lhs * rhs.elem(i$dim);
-                  } ; 
-               }
-operator operator* ( const floatArray & lhs, float rhs) 
-              {
-                  modify none; read{lhs, rhs}; alias none;
-                   restrict_value {
-                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
-                   };
-                  construct_array (none) { 
-                       dimension = lhs.dimension;
-                       length(i) = lhs.length(i);
-                       elem(i:dim:1:dimension) = lhs.elem(i$dim) * rhs;
-                  } ; 
-               }
-operator operator/ ( const floatArray & lhs, const floatArray & rhs) 
-              {
-                  modify none; read{lhs, rhs}; alias none;
-                   restrict_value {
-                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
-                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
-                   };
-                  construct_array (none) { 
-                       dimension = lhs.dimension;
-                       length(i) = lhs.length(i);
-                       elem(i:dim:1:dimension) = lhs.elem(i$dim) / rhs.elem(i$dim);
-                  } ; 
-               }
-operator operator/ ( const floatArray & lhs, float rhs) 
-              {
-                  modify none; read{lhs, rhs}; alias none;
-                   restrict_value {
-                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
-                   };
-                  construct_array (none) { 
-                       dimension = lhs.dimension;
-                       length(i) = lhs.length(i);
-                       elem(i:dim:1:dimension) = lhs.elem(i$dim) / rhs;
-                  } ; 
-               }
-operator operator/ ( float lhs, const floatArray & rhs) 
-              {
-                  modify none; read{lhs, rhs}; alias none;
-                   restrict_value {
-                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
-                   };
-                  construct_array (none) { 
-                       dimension = rhs.dimension;
-                       length(i) = rhs.length(i);
-                       elem(i:dim:1:dimension) = lhs / rhs.elem(i$dim);
-                  } ; 
-               }
-operator sqrt ( const floatArray & rhs) 
-              {
-                  modify none; read{rhs}; alias none;
-                   restrict_value {
-                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
-                   };
-                  construct_array (none) {
-                       dimension = rhs.dimension;
-                       length(i) = rhs.length(i);
-                       elem(i:dim:1:dimension) = sqrt( rhs.elem(i$dim));
-                  } ;
-               }
-operator pow (const floatArray& lhs, float rhs) 
-              {
-                  modify none; read{lhs, rhs}; alias none;
-                   restrict_value {
-                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
-                   };
-                  construct_array (none) { 
-                       dimension = lhs.dimension;
-                       length(i) = lhs.length(i);
-                       elem(i:dim:1:dimension) = pow(lhs.elem(i$dim), rhs);
-                  } ; 
-               }
-operator pow (const floatArray& lhs, const floatArray& rhs) 
-              {
-                  modify none; read{lhs, rhs}; alias none;
-                   restrict_value {
-                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
-                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
-                   };
-                  construct_array (none) { 
-                       dimension = lhs.dimension;
-                       length(i) = lhs.length(i);
-                       elem(i:dim:1:dimension) = pow(lhs.elem(i$dim),rhs.elem(i$dim));
-                  } ; 
-               }
-operator sin ( floatArray & rhs) 
-              {
-                  modify none; read{rhs}; alias none;
-                   restrict_value {
-                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
-                   };
-                  construct_array (none) {
-                       dimension = rhs.dimension;
-                       length(i) = rhs.length(i);
-                       elem(i:dim:1:dimension) = sin( rhs.elem(i$dim));
-                  } ;
-               }
-operator floatArray::operator- () 
-              {
-                  modify none; read{this}; alias none;
-                  restrict_value {
-                      result = { dimension = this.dimension; length_0 = this.length_0;};
-                   };
-                  construct_array (none) {
-                       dimension = this.dimension;
-                       length(i) = this.length(i);
-                       elem(i:dim:1:dimension) = -this.elem(i$dim);
-                  } ;
-               }
-operator operator<= ( const floatArray& lhs, float rhs) 
-              {
-                   modify none; read{lhs, rhs}; alias none;
-                   restrict_value {
-                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
-                   };
-               }
-operator operator<= ( float lhs, const floatArray& rhs) 
-              {
-                   modify none; read{lhs, rhs }; alias none;
-                   restrict_value {
-                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};                   };
-               }
-operator operator<= ( const floatArray& lhs, const floatArray& rhs) 
-              {
-                  modify none; read{lhs, rhs }; alias none;
-                   restrict_value {
-                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
-                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
-                   };
-               }
-operator operator>= ( const floatArray& lhs, float rhs) 
-              {
-                   modify none; read{lhs, rhs}; alias none;
-                   restrict_value {
-                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};                   };
-               }
-operator operator>= ( float lhs, const floatArray& rhs) 
-              {
-                   modify none; read{lhs, rhs }; alias none;
-                   restrict_value {
-                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};                   };
-               }
-operator operator>= ( const floatArray& lhs, const floatArray& rhs) 
-              {
-                   modify none; read{lhs, rhs }; alias none;
-                   restrict_value {
-                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};                   };
-               }
-
-
-

Copied: branches/testonly/projects/autoParallelization/tests/floatArray.annot (from rev 128, trunk/projects/autoParallelization/tests/floatArray.annot)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/floatArray.annot	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/floatArray.annot	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,372 @@
+class floatArray {
+    array {
+      dimension = 6; 
+      length(i) =  this.Array_Descriptor.Array_Domain.Size[i];
+      elem(i:dim:1:dimension) = this(i$dim);
+      reshape(i:dim:1:dimension) = this.resize(i$dim);
+     };
+     array_optimize {
+      define {
+       float* _pointer = this.getDataPointer();
+       int _size:dim:1:dimension = this.Array_Descriptor.Array_Domain.Size[dim-1];
+       int _stride:dim:1:dimension = this.Array_Descriptor.Array_Domain.Stride[dim-1];
+       int _length:dim:1:dimension =  this.Array_Descriptor.Array_Domain.getLength(dim-1)
+      }
+      length(i) = _length$(i+1);
+      elem(i:dim:1:dimension) =
+           _pointer[i$1 + repeat(x,2,dimension, i$x * _stride$(x-1) * _size$(x-1))];
+     };
+     has_value { dimension = 6; length_0 = this.length(0); 
+                 length_1 = this.length(1); length_2 = this.length(2); };
+  }
+
+operator floatArray::operator() (int index) 
+              {
+                   modify none; read {index};
+                   alias none;
+                   restrict_value { this = { dimension = 1; } };
+                   inline { this.elem(index) };
+              }
+
+operator floatArray::operator() ( const InternalIndex& index) 
+              {
+                   modify none; read {this, index};
+                   alias { (result, this) };
+                   restrict_value 
+                       { this = { dimension = 1; }; 
+                         result = {dimension = 1; length_0 = index.length;}; };
+                   construct_array (this) { 
+                       dimension = 1;
+                       length(0) = index.length;
+                       elem(i) = this.elem(i * index.stride + index.base); 
+                   }; 
+               }
+operator floatArray::operator()(const InternalIndex& index1, 
+                                const InternalIndex& index2) 
+              {
+                   modify none; read {this, index1, index2};
+                   alias { (result, this) };
+                   restrict_value
+                       { this = { dimension = 2; };
+                         result = {dimension = 2; length_0 = index1.length; 
+                                   length_1 = index2.length}; 
+                       };
+                   construct_array (this) {
+                       dimension = 2;
+                       length(0) = index1.length; length(1) = index2.length;
+                       elem(i,j) = this.elem(i * index1.stride + index1.base,
+                                             j * index2.stride + index2.base);
+                   };
+               }
+operator floatArray::operator()(const InternalIndex& index1,
+                                const InternalIndex& index2,
+                                const InternalIndex& index3) 
+              {
+                   modify none; read {this, index1, index2, index3};
+                   alias { (result, this) };
+                   restrict_value
+                       { this = { dimension = 3; };
+                         result = {dimension = 3; length_0 = index1.length;
+                                   length_1 = index2.length; length_2 = index3.length; };
+                       };
+                   construct_array (this) {
+                       dimension = 3;
+                       length(0) = index1.length; length(1) = index2.length;
+                       length(2) = index3.length;
+                       elem(i,j,k) = this.elem(i * index1.stride + index1.base,
+                                             j * index2.stride + index2.base,
+                                             k * index3.stride + index3.base);
+                   };
+               }
+
+
+
+operator floatArray::operator= (const floatArray& that) 
+              { 
+                   modify {this}; read {that}; alias none;
+                   restrict_value {
+                      result = { dimension = that.dimension; length_0 = that.length_0;};
+                   };
+                   modify_array (this) { 
+                       dimension = that.dimension;
+                       length(i) = that.length(i);
+                       elem(i:dim:1:dimension) = that.elem(i$dim);
+                   }; 
+               }
+operator floatArray::operator= (float val) 
+              {
+                   modify {this}; read {val}; alias none;
+                   modify_array (this) {
+                       elem(i:dim:1:dimension) = val;
+                   };
+               }
+
+operator floatArray::getLength( int dim) 
+              {
+                   modify none; read {dim}; alias none;
+                   inline { this.length(dim) };
+              }
+
+operator floatArray::fill( float val) 
+              {
+                   modify {this}; read {val}; alias none;
+                   modify_array (this) {
+                       elem(i:dim:1:dimension) = val;
+                   };
+               }
+operator floatArray::replace( const intArray& cond, float val) 
+              {
+                   modify {this}; read {cond, val}; alias none;
+               }
+operator floatArray::replace( const intArray& cond, const floatArray& val) 
+              {
+                   modify {this}; read {cond, val}; alias none;
+               }
+
+operator floatArray::floatArray (int len) 
+              { 
+                   modify none; read {len}; alias none;
+                   restrict_value {this = { dimension = 1; length_0 = len; } };
+                 construct_array (none) { dimension = 1; length(0) = len }; 
+               }
+
+                                          
+operator operator+ (const floatArray& lhs, const floatArray& rhs) 
+              {
+                  modify none; read{lhs, rhs}; alias none;
+                   restrict_value {
+                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
+                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
+                   };
+                  construct_array (none) { 
+                       dimension = lhs.dimension;
+                       length(i) = lhs.length(i);
+                       elem(i:dim:1:dimension) = lhs.elem(i$dim) + rhs.elem(i$dim);
+                  } ; 
+               }
+operator operator+ ( float lhs, const floatArray & rhs) 
+              {
+                  modify none; read{lhs, rhs}; alias none;
+                   restrict_value {
+                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
+                   };
+                  construct_array (none) { 
+                       dimension = rhs.dimension;
+                       length(i) = rhs.length(i);
+                       elem(i:dim:1:dimension) = lhs + rhs.elem(i$dim);
+                  } ; 
+               }
+operator operator+ ( const floatArray & lhs, float rhs) 
+              {
+                  modify none; read{lhs, rhs}; alias none;
+                   restrict_value {
+                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
+                   };
+                  construct_array (none) { 
+                       dimension = lhs.dimension;
+                       length(i) = lhs.length(i);
+                       elem(i:dim:1:dimension) = lhs.elem(i$dim) + rhs;
+                  } ; 
+               }
+operator operator- ( const floatArray & lhs, const floatArray & rhs) 
+              {
+                  modify none; read{lhs, rhs}; alias none;
+                   restrict_value {
+                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
+                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
+                   };
+                  construct_array (none) { 
+                       dimension = lhs.dimension;
+                       length(i) = lhs.length(i);
+                       elem(i:dim:1:dimension) = lhs.elem(i$dim) - rhs.elem(i$dim);
+                  } ; 
+               }
+operator operator- ( const floatArray & lhs, float rhs) 
+              {
+                  modify none; read{lhs, rhs}; alias none;
+                   restrict_value {
+                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
+                   };
+                  construct_array (none) { 
+                       dimension = lhs.dimension;
+                       length(i) = lhs.length(i);
+                       elem(i:dim:1:dimension) = lhs.elem(i$dim) - rhs;
+                  } ; 
+               }
+operator operator* ( const floatArray & lhs, const floatArray & rhs) 
+              {
+                  modify none; read{lhs, rhs}; alias none;
+                   restrict_value {
+                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
+                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
+                   };
+                  construct_array (none) { 
+                       dimension = lhs.dimension;
+                       length(i) = lhs.length(i);
+                       elem(i:dim:1:dimension) = lhs.elem(i$dim) * rhs.elem(i$dim);
+                  } ; 
+               }
+operator operator* ( float lhs, const floatArray & rhs) 
+              {
+                  modify none; read{lhs, rhs}; alias none;
+                   restrict_value {
+                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
+                   };
+                  construct_array (none) { 
+                       dimension = rhs.dimension;
+                       length(i) = rhs.length(i);
+                       elem(i:dim:1:dimension) = lhs * rhs.elem(i$dim);
+                  } ; 
+               }
+operator operator* ( const floatArray & lhs, float rhs) 
+              {
+                  modify none; read{lhs, rhs}; alias none;
+                   restrict_value {
+                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
+                   };
+                  construct_array (none) { 
+                       dimension = lhs.dimension;
+                       length(i) = lhs.length(i);
+                       elem(i:dim:1:dimension) = lhs.elem(i$dim) * rhs;
+                  } ; 
+               }
+operator operator/ ( const floatArray & lhs, const floatArray & rhs) 
+              {
+                  modify none; read{lhs, rhs}; alias none;
+                   restrict_value {
+                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
+                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
+                   };
+                  construct_array (none) { 
+                       dimension = lhs.dimension;
+                       length(i) = lhs.length(i);
+                       elem(i:dim:1:dimension) = lhs.elem(i$dim) / rhs.elem(i$dim);
+                  } ; 
+               }
+operator operator/ ( const floatArray & lhs, float rhs) 
+              {
+                  modify none; read{lhs, rhs}; alias none;
+                   restrict_value {
+                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
+                   };
+                  construct_array (none) { 
+                       dimension = lhs.dimension;
+                       length(i) = lhs.length(i);
+                       elem(i:dim:1:dimension) = lhs.elem(i$dim) / rhs;
+                  } ; 
+               }
+operator operator/ ( float lhs, const floatArray & rhs) 
+              {
+                  modify none; read{lhs, rhs}; alias none;
+                   restrict_value {
+                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
+                   };
+                  construct_array (none) { 
+                       dimension = rhs.dimension;
+                       length(i) = rhs.length(i);
+                       elem(i:dim:1:dimension) = lhs / rhs.elem(i$dim);
+                  } ; 
+               }
+operator sqrt ( const floatArray & rhs) 
+              {
+                  modify none; read{rhs}; alias none;
+                   restrict_value {
+                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
+                   };
+                  construct_array (none) {
+                       dimension = rhs.dimension;
+                       length(i) = rhs.length(i);
+                       elem(i:dim:1:dimension) = sqrt( rhs.elem(i$dim));
+                  } ;
+               }
+operator pow (const floatArray& lhs, float rhs) 
+              {
+                  modify none; read{lhs, rhs}; alias none;
+                   restrict_value {
+                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
+                   };
+                  construct_array (none) { 
+                       dimension = lhs.dimension;
+                       length(i) = lhs.length(i);
+                       elem(i:dim:1:dimension) = pow(lhs.elem(i$dim), rhs);
+                  } ; 
+               }
+operator pow (const floatArray& lhs, const floatArray& rhs) 
+              {
+                  modify none; read{lhs, rhs}; alias none;
+                   restrict_value {
+                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
+                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
+                   };
+                  construct_array (none) { 
+                       dimension = lhs.dimension;
+                       length(i) = lhs.length(i);
+                       elem(i:dim:1:dimension) = pow(lhs.elem(i$dim),rhs.elem(i$dim));
+                  } ; 
+               }
+operator sin ( floatArray & rhs) 
+              {
+                  modify none; read{rhs}; alias none;
+                   restrict_value {
+                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
+                   };
+                  construct_array (none) {
+                       dimension = rhs.dimension;
+                       length(i) = rhs.length(i);
+                       elem(i:dim:1:dimension) = sin( rhs.elem(i$dim));
+                  } ;
+               }
+operator floatArray::operator- () 
+              {
+                  modify none; read{this}; alias none;
+                  restrict_value {
+                      result = { dimension = this.dimension; length_0 = this.length_0;};
+                   };
+                  construct_array (none) {
+                       dimension = this.dimension;
+                       length(i) = this.length(i);
+                       elem(i:dim:1:dimension) = -this.elem(i$dim);
+                  } ;
+               }
+operator operator<= ( const floatArray& lhs, float rhs) 
+              {
+                   modify none; read{lhs, rhs}; alias none;
+                   restrict_value {
+                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
+                   };
+               }
+operator operator<= ( float lhs, const floatArray& rhs) 
+              {
+                   modify none; read{lhs, rhs }; alias none;
+                   restrict_value {
+                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};                   };
+               }
+operator operator<= ( const floatArray& lhs, const floatArray& rhs) 
+              {
+                  modify none; read{lhs, rhs }; alias none;
+                   restrict_value {
+                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};
+                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};
+                   };
+               }
+operator operator>= ( const floatArray& lhs, float rhs) 
+              {
+                   modify none; read{lhs, rhs}; alias none;
+                   restrict_value {
+                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};                   };
+               }
+operator operator>= ( float lhs, const floatArray& rhs) 
+              {
+                   modify none; read{lhs, rhs }; alias none;
+                   restrict_value {
+                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};                   };
+               }
+operator operator>= ( const floatArray& lhs, const floatArray& rhs) 
+              {
+                   modify none; read{lhs, rhs }; alias none;
+                   restrict_value {
+                      result = { dimension = lhs.dimension; length_0 = lhs.length_0;};                      result = { dimension = rhs.dimension; length_0 = rhs.length_0;};                   };
+               }
+
+
+

Deleted: branches/testonly/projects/autoParallelization/tests/funcs.annot
===================================================================
--- trunk/projects/autoParallelization/tests/funcs.annot	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/funcs.annot	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,34 +0,0 @@
-operator interpolate1D(floatArray & fineGrid, floatArray & coarseGrid) 
-   {
-    allow_alias none;
-   }
-
-operator interpolate2D(floatArray & fineGrid,floatArray & coarseGrid) 
-   {
-   allow_alias none;
-   }
-
-operator interpolate3D ( floatArray & fineGrid, floatArray & coarseGrid )
-   {
-   allow_alias none;
-   }
-
-operator redBlackRelax1D(floatArray & s,floatArray & rhs) 
-   { 
-   allow_alias none;
-   }
-
-operator redBlackRelax2D(floatArray & s,floatArray & rhs) 
-   { 
-   allow_alias none;
-   }
-
-operator redBlackRelax3DNonFullyVariational ( floatArray & s, floatArray & rhs )
-   {
-   allow_alias none;
-   }
-
-operator redBlackRelax3DFullyVariational ( floatArray & s, floatArray & rhs )
-   {
-   allow_alias none;
-   }

Copied: branches/testonly/projects/autoParallelization/tests/funcs.annot (from rev 128, trunk/projects/autoParallelization/tests/funcs.annot)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/funcs.annot	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/funcs.annot	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,34 @@
+operator interpolate1D(floatArray & fineGrid, floatArray & coarseGrid) 
+   {
+    allow_alias none;
+   }
+
+operator interpolate2D(floatArray & fineGrid,floatArray & coarseGrid) 
+   {
+   allow_alias none;
+   }
+
+operator interpolate3D ( floatArray & fineGrid, floatArray & coarseGrid )
+   {
+   allow_alias none;
+   }
+
+operator redBlackRelax1D(floatArray & s,floatArray & rhs) 
+   { 
+   allow_alias none;
+   }
+
+operator redBlackRelax2D(floatArray & s,floatArray & rhs) 
+   { 
+   allow_alias none;
+   }
+
+operator redBlackRelax3DNonFullyVariational ( floatArray & s, floatArray & rhs )
+   {
+   allow_alias none;
+   }
+
+operator redBlackRelax3DFullyVariational ( floatArray & s, floatArray & rhs )
+   {
+   allow_alias none;
+   }

Deleted: branches/testonly/projects/autoParallelization/tests/inner_only.c
===================================================================
--- trunk/projects/autoParallelization/tests/inner_only.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/inner_only.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,21 +0,0 @@
-/* Only the inner loop can be parallelized
- */
-void foo()
-{
-  int n=100, m=100;
-  double b[n][m];
-  int i,j;
-  for (i=0;i<n;i++)
-    for (j=0;j<m;j++)
-      b[i][j]=b[i-1][j-1];
-}
-/*
-dep 
-SgExprStatement:(b[i])[j] =((b[i - 1])[j - 1]); 
-SgExprStatement:(b[i])[j] =((b[i - 1])[j - 1]); 
-
-2*2 TRUE_DEP; commonlevel = 2 CarryLevel = 0  Is precise 
-SgPntrArrRefExp:(b[i])[j]@8:14->SgPntrArrRefExp:((b[i - 1])[j - 1])@8:21 
-== -1; * 0;  ||
-* 0  ; == -1; ||::
-*/

Copied: branches/testonly/projects/autoParallelization/tests/inner_only.c (from rev 128, trunk/projects/autoParallelization/tests/inner_only.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/inner_only.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/inner_only.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,21 @@
+/* Only the inner loop can be parallelized
+ */
+void foo()
+{
+  int n=100, m=100;
+  double b[n][m];
+  int i,j;
+  for (i=0;i<n;i++)
+    for (j=0;j<m;j++)
+      b[i][j]=b[i-1][j-1];
+}
+/*
+dep 
+SgExprStatement:(b[i])[j] =((b[i - 1])[j - 1]); 
+SgExprStatement:(b[i])[j] =((b[i - 1])[j - 1]); 
+
+2*2 TRUE_DEP; commonlevel = 2 CarryLevel = 0  Is precise 
+SgPntrArrRefExp:(b[i])[j]@8:14->SgPntrArrRefExp:((b[i - 1])[j - 1])@8:21 
+== -1; * 0;  ||
+* 0  ; == -1; ||::
+*/

Deleted: branches/testonly/projects/autoParallelization/tests/interp1_elem.C
===================================================================
--- trunk/projects/autoParallelization/tests/interp1_elem.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/interp1_elem.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,19 +0,0 @@
-//#include <A++.h>
-#include "simpleA++.h"
-
-void interpolate1D(class floatArray &fineGrid,class floatArray &coarseGrid)
-{
-  int _var_0;
-  int _var_1;
-  int fineGridSize = fineGrid.length(0);
-  int coarseGridSize = coarseGrid.length(0);
-// Interior fine points
-  class Range If(2,_var_1 = (fineGridSize - 2),2);
-  class Range Ic(1,(coarseGridSize - 1),1);
-
-  for (_var_0 = 0; _var_0 <= -1 + (_var_1 + -1) / 2; _var_0 += 1) {
-    fineGrid.elem(_var_0 * 2 + 2) = coarseGrid.elem(_var_0 * 1 + 1);
-    fineGrid.elem(2 - 1 + _var_0 * 2) = (coarseGrid.elem(1 - 1 + _var_0 * 1) + coarseGrid.elem(_var_0 * 1 + 1)) / (2.0);
-  }
-}
-

Copied: branches/testonly/projects/autoParallelization/tests/interp1_elem.C (from rev 128, trunk/projects/autoParallelization/tests/interp1_elem.C)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/interp1_elem.C	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/interp1_elem.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,19 @@
+//#include <A++.h>
+#include "simpleA++.h"
+
+void interpolate1D(class floatArray &fineGrid,class floatArray &coarseGrid)
+{
+  int _var_0;
+  int _var_1;
+  int fineGridSize = fineGrid.length(0);
+  int coarseGridSize = coarseGrid.length(0);
+// Interior fine points
+  class Range If(2,_var_1 = (fineGridSize - 2),2);
+  class Range Ic(1,(coarseGridSize - 1),1);
+
+  for (_var_0 = 0; _var_0 <= -1 + (_var_1 + -1) / 2; _var_0 += 1) {
+    fineGrid.elem(_var_0 * 2 + 2) = coarseGrid.elem(_var_0 * 1 + 1);
+    fineGrid.elem(2 - 1 + _var_0 * 2) = (coarseGrid.elem(1 - 1 + _var_0 * 1) + coarseGrid.elem(_var_0 * 1 + 1)) / (2.0);
+  }
+}
+

Deleted: branches/testonly/projects/autoParallelization/tests/jacobi_seq.c
===================================================================
--- trunk/projects/autoParallelization/tests/jacobi_seq.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/jacobi_seq.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,202 +0,0 @@
-/* An example code 
- *
- * */
-#include <stdio.h>
-#include <math.h>
-
-void driver (void);
-void initialize (void);
-void jacobi (void);
-void error_check (void);
-
-#define MSIZE 200
-int n, m, mits;
-double tol, relax = 1.0, alpha = 0.0543;
-double u[MSIZE][MSIZE], f[MSIZE][MSIZE], uold[MSIZE][MSIZE];
-double dx, dy;
-
-int
-main (void)
-{
-//  float toler;
-/*      printf("Input n,m (< %d) - grid dimension in x,y direction:\n",MSIZE); 
-      scanf ("%d",&n);
-      scanf ("%d",&m);
-      printf("Input tol - error tolerance for iterative solver\n"); 
-      scanf("%f",&toler);
-      tol=(double)toler;
-      printf("Input mits - Maximum iterations for solver\n"); 
-      scanf("%d",&mits);
-*/
-  n = MSIZE;
-  m = MSIZE;
-  tol = 0.0000000001;
-  mits = 1000;
-  driver ();
-
-  return 1;
-}
-
-/*************************************************************
-* Subroutine driver () 
-* This is where the arrays are allocated and initialzed. 
-*
-* Working varaibles/arrays 
-*     dx  - grid spacing in x direction 
-*     dy  - grid spacing in y direction 
-*************************************************************/
-
-void
-driver ()
-{
-
-  initialize ();
-
-  /* Solve Helmholtz equation */
-  jacobi ();
-
-  /* error_check (n,m,alpha,dx,dy,u,f) */
-  error_check ();
-}
-
-
-/*      subroutine initialize (n,m,alpha,dx,dy,u,f) 
-******************************************************
-* Initializes data 
-* Assumes exact solution is u(x,y) = (1-x^2)*(1-y^2)
-*
-******************************************************/
-
-void
-initialize ()
-{
-
-  int i, j, xx, yy;
-//  double PI = 3.1415926;
-
-  dx = 2.0 / (n - 1); // -->dx at 112:2
-  dy = 2.0 / (m - 1);  //-->dy at 113:2
-
-/* Initialize initial condition and RHS */
-
-//#pragma omp parallel for private(i,j,xx,yy)
-  for (i = 0; i < n; i++)
-    for (j = 0; j < m; j++)
-      {
-	xx = (int) (-1.0 + dx * (i - 1));	/* -1 < x < 1 */
-	yy = (int) (-1.0 + dy * (j - 1));	/* -1 < y < 1 */
-	u[i][j] = 0.0;
-	f[i][j] = -1.0 * alpha * (1.0 - xx * xx) * (1.0 - yy * yy)
-	  - 2.0 * (1.0 - xx * xx) - 2.0 * (1.0 - yy * yy);
-
-      }
-
-}
-
-/*      subroutine jacobi (n,m,dx,dy,alpha,omega,u,f,tol,maxit)
-******************************************************************
-* Subroutine HelmholtzJ
-* Solves poisson equation on rectangular grid assuming : 
-* (1) Uniform discretization in each direction, and 
-* (2) Dirichlect boundary conditions 
-* 
-* Jacobi method is used in this routine 
-*
-* Input : n,m   Number of grid points in the X/Y directions 
-*         dx,dy Grid spacing in the X/Y directions 
-*         alpha Helmholtz eqn. coefficient 
-*         omega Relaxation factor 
-*         f(n,m) Right hand side function 
-*         u(n,m) Dependent variable/Solution
-*         tol    Tolerance for iterative solver 
-*         maxit  Maximum number of iterations 
-*
-* Output : u(n,m) - Solution 
-*****************************************************************/
-
-void
-jacobi ()
-{
-  double omega;
-  int i, j, k;
-  double error, resid,  ax, ay, b;
-
-  omega = relax;
-/*
-* Initialize coefficients */
-
-  ax = 1.0 / (dx * dx);		/* X-direction coef */
-  ay = 1.0 / (dy * dy);		/* Y-direction coef */
-  b = -2.0 / (dx * dx) - 2.0 / (dy * dy) - alpha;	/* Central coeff */
-
-  error = 10.0 * tol;
-  k = 1;
-
-//  while ((k <= mits) && (error > tol))
-//  Qing's dependence analysis cannot handle while loops
-  for (k=1;k <= mits;k++)
-    {
-      error = 0.0;
-
-/* Copy new solution into old */
-//#pragma omp parallel
-      {
-//#pragma omp for private(i,j)
-	for (i = 0; i < n; i++)
-	  for (j = 0; j < m; j++)
-	    uold[i][j] = u[i][j];
-
-//#pragma omp for private(i,j,resid) reduction(+:error) nowait
-	for (i = 1; i < (n - 1); i++)
-	  for (j = 1; j < (m - 1); j++)
-	    {
-	      resid = (ax * (uold[i - 1][j] + uold[i + 1][j])
-		       + ay * (uold[i][j - 1] + uold[i][j + 1]) +
-		       b * uold[i][j] - f[i][j]) / b;
-
-	      u[i][j] = uold[i][j] - omega * resid;
-	      error = error + resid * resid;
-	    }
-      }
-/*  omp end parallel */
-
-/* Error check */
-
-    //  k = k + 1;
-
-      error = sqrt (error) / (n * m);
-
-    }				/*  End iteration loop */
-
-  printf ("Total Number of Iterations:%d\n", k);
-  printf ("Residual:%E\n", error);
-
-}
-
-
-void
-error_check ()
-{
-
-  int i, j;
-  double xx, yy, temp, error;
-
-  dx = 2.0 / (n - 1);
-  dy = 2.0 / (m - 1);
-  error = 0.0;
-
-//#pragma omp parallel for private(i,j,xx,yy,temp) reduction(+:error)
-  for (i = 0; i < n; i++)
-    for (j = 0; j < m; j++)
-      {
-	xx = -1.0 + dx * (i - 1);
-	yy = -1.0 + dy * (j - 1);
-	temp = u[i][j] - (1.0 - xx * xx) * (1.0 - yy * yy);
-	error = error + temp * temp;
-      }
-  error = sqrt (error) / (n * m);
-
-  printf ("Solution Error :%E \n", error);
-
-}
-

Copied: branches/testonly/projects/autoParallelization/tests/jacobi_seq.c (from rev 128, trunk/projects/autoParallelization/tests/jacobi_seq.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/jacobi_seq.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/jacobi_seq.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,202 @@
+/* An example code 
+ *
+ * */
+#include <stdio.h>
+#include <math.h>
+
+void driver (void);
+void initialize (void);
+void jacobi (void);
+void error_check (void);
+
+#define MSIZE 200
+int n, m, mits;
+double tol, relax = 1.0, alpha = 0.0543;
+double u[MSIZE][MSIZE], f[MSIZE][MSIZE], uold[MSIZE][MSIZE];
+double dx, dy;
+
+int
+main (void)
+{
+//  float toler;
+/*      printf("Input n,m (< %d) - grid dimension in x,y direction:\n",MSIZE); 
+      scanf ("%d",&n);
+      scanf ("%d",&m);
+      printf("Input tol - error tolerance for iterative solver\n"); 
+      scanf("%f",&toler);
+      tol=(double)toler;
+      printf("Input mits - Maximum iterations for solver\n"); 
+      scanf("%d",&mits);
+*/
+  n = MSIZE;
+  m = MSIZE;
+  tol = 0.0000000001;
+  mits = 1000;
+  driver ();
+
+  return 1;
+}
+
+/*************************************************************
+* Subroutine driver () 
+* This is where the arrays are allocated and initialzed. 
+*
+* Working varaibles/arrays 
+*     dx  - grid spacing in x direction 
+*     dy  - grid spacing in y direction 
+*************************************************************/
+
+void
+driver ()
+{
+
+  initialize ();
+
+  /* Solve Helmholtz equation */
+  jacobi ();
+
+  /* error_check (n,m,alpha,dx,dy,u,f) */
+  error_check ();
+}
+
+
+/*      subroutine initialize (n,m,alpha,dx,dy,u,f) 
+******************************************************
+* Initializes data 
+* Assumes exact solution is u(x,y) = (1-x^2)*(1-y^2)
+*
+******************************************************/
+
+void
+initialize ()
+{
+
+  int i, j, xx, yy;
+//  double PI = 3.1415926;
+
+  dx = 2.0 / (n - 1); // -->dx at 112:2
+  dy = 2.0 / (m - 1);  //-->dy at 113:2
+
+/* Initialize initial condition and RHS */
+
+//#pragma omp parallel for private(i,j,xx,yy)
+  for (i = 0; i < n; i++)
+    for (j = 0; j < m; j++)
+      {
+	xx = (int) (-1.0 + dx * (i - 1));	/* -1 < x < 1 */
+	yy = (int) (-1.0 + dy * (j - 1));	/* -1 < y < 1 */
+	u[i][j] = 0.0;
+	f[i][j] = -1.0 * alpha * (1.0 - xx * xx) * (1.0 - yy * yy)
+	  - 2.0 * (1.0 - xx * xx) - 2.0 * (1.0 - yy * yy);
+
+      }
+
+}
+
+/*      subroutine jacobi (n,m,dx,dy,alpha,omega,u,f,tol,maxit)
+******************************************************************
+* Subroutine HelmholtzJ
+* Solves poisson equation on rectangular grid assuming : 
+* (1) Uniform discretization in each direction, and 
+* (2) Dirichlect boundary conditions 
+* 
+* Jacobi method is used in this routine 
+*
+* Input : n,m   Number of grid points in the X/Y directions 
+*         dx,dy Grid spacing in the X/Y directions 
+*         alpha Helmholtz eqn. coefficient 
+*         omega Relaxation factor 
+*         f(n,m) Right hand side function 
+*         u(n,m) Dependent variable/Solution
+*         tol    Tolerance for iterative solver 
+*         maxit  Maximum number of iterations 
+*
+* Output : u(n,m) - Solution 
+*****************************************************************/
+
+void
+jacobi ()
+{
+  double omega;
+  int i, j, k;
+  double error, resid,  ax, ay, b;
+
+  omega = relax;
+/*
+* Initialize coefficients */
+
+  ax = 1.0 / (dx * dx);		/* X-direction coef */
+  ay = 1.0 / (dy * dy);		/* Y-direction coef */
+  b = -2.0 / (dx * dx) - 2.0 / (dy * dy) - alpha;	/* Central coeff */
+
+  error = 10.0 * tol;
+  k = 1;
+
+//  while ((k <= mits) && (error > tol))
+//  Qing's dependence analysis cannot handle while loops
+  for (k=1;k <= mits;k++)
+    {
+      error = 0.0;
+
+/* Copy new solution into old */
+//#pragma omp parallel
+      {
+//#pragma omp for private(i,j)
+	for (i = 0; i < n; i++)
+	  for (j = 0; j < m; j++)
+	    uold[i][j] = u[i][j];
+
+//#pragma omp for private(i,j,resid) reduction(+:error) nowait
+	for (i = 1; i < (n - 1); i++)
+	  for (j = 1; j < (m - 1); j++)
+	    {
+	      resid = (ax * (uold[i - 1][j] + uold[i + 1][j])
+		       + ay * (uold[i][j - 1] + uold[i][j + 1]) +
+		       b * uold[i][j] - f[i][j]) / b;
+
+	      u[i][j] = uold[i][j] - omega * resid;
+	      error = error + resid * resid;
+	    }
+      }
+/*  omp end parallel */
+
+/* Error check */
+
+    //  k = k + 1;
+
+      error = sqrt (error) / (n * m);
+
+    }				/*  End iteration loop */
+
+  printf ("Total Number of Iterations:%d\n", k);
+  printf ("Residual:%E\n", error);
+
+}
+
+
+void
+error_check ()
+{
+
+  int i, j;
+  double xx, yy, temp, error;
+
+  dx = 2.0 / (n - 1);
+  dy = 2.0 / (m - 1);
+  error = 0.0;
+
+//#pragma omp parallel for private(i,j,xx,yy,temp) reduction(+:error)
+  for (i = 0; i < n; i++)
+    for (j = 0; j < m; j++)
+      {
+	xx = -1.0 + dx * (i - 1);
+	yy = -1.0 + dy * (j - 1);
+	temp = u[i][j] - (1.0 - xx * xx) * (1.0 - yy * yy);
+	error = error + temp * temp;
+      }
+  error = sqrt (error) / (n * m);
+
+  printf ("Solution Error :%E \n", error);
+
+}
+

Deleted: branches/testonly/projects/autoParallelization/tests/lastprivate.c
===================================================================
--- trunk/projects/autoParallelization/tests/lastprivate.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/lastprivate.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,20 +0,0 @@
-// an example of output dependence preventing parallelization
-// x: not live-in, yes live-out
-//    outer scope
-//    loop-carried output-dependence: x=... : accept values based on loop variable; or not. 
-//Solution: Can be parallelized using lastprivate(x)
-#include <stdio.h> 
-void foo()
-{
-  int i,x;
-
-  for (i=0;i<100;i++) 
-    x=i;
-  printf("x=%d",x);    
-}  
-/*  carryLevel should be 0?
- 
- * output dependence, loop carried
- * dep SgExprStatement:x = i; SgExprStatement:x = i; 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:x at 7:6->SgVarRefExp:x at 7:6 == 0;||::
-
- */

Copied: branches/testonly/projects/autoParallelization/tests/lastprivate.c (from rev 128, trunk/projects/autoParallelization/tests/lastprivate.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/lastprivate.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/lastprivate.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,20 @@
+// an example of output dependence preventing parallelization
+// x: not live-in, yes live-out
+//    outer scope
+//    loop-carried output-dependence: x=... : accept values based on loop variable; or not. 
+//Solution: Can be parallelized using lastprivate(x)
+#include <stdio.h> 
+void foo()
+{
+  int i,x;
+
+  for (i=0;i<100;i++) 
+    x=i;
+  printf("x=%d",x);    
+}  
+/*  carryLevel should be 0?
+ 
+ * output dependence, loop carried
+ * dep SgExprStatement:x = i; SgExprStatement:x = i; 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:x at 7:6->SgVarRefExp:x at 7:6 == 0;||::
+
+ */

Deleted: branches/testonly/projects/autoParallelization/tests/matrixmultiply.c
===================================================================
--- trunk/projects/autoParallelization/tests/matrixmultiply.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/matrixmultiply.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,21 +0,0 @@
-/*
-Naive matrix-matrix multiplication(mmm)
-By C. Liao
-*/
-#define N 1000
-#define M 1000
-#define K 1000
-
-int i,j,k;
-double a[N][M],b[M][K],c[N][K];
-
-int mmm()
-{
-//#pragma omp parallel for private(i,j,k) shared(a,b,c)
-for (i = 0; i < N; i++)
-  for (j = 0; j < M; j++)
-    for (k = 0; k < K; k++)
-       c[i][j]= c[i][j]+a[i][k]*b[k][j];
-return 0;
-}
-

Copied: branches/testonly/projects/autoParallelization/tests/matrixmultiply.c (from rev 128, trunk/projects/autoParallelization/tests/matrixmultiply.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/matrixmultiply.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/matrixmultiply.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,21 @@
+/*
+Naive matrix-matrix multiplication(mmm)
+By C. Liao
+*/
+#define N 1000
+#define M 1000
+#define K 1000
+
+int i,j,k;
+double a[N][M],b[M][K],c[N][K];
+
+int mmm()
+{
+//#pragma omp parallel for private(i,j,k) shared(a,b,c)
+for (i = 0; i < N; i++)
+  for (j = 0; j < M; j++)
+    for (k = 0; k < K; k++)
+       c[i][j]= c[i][j]+a[i][k]*b[k][j];
+return 0;
+}
+

Deleted: branches/testonly/projects/autoParallelization/tests/output_dep.c
===================================================================
--- trunk/projects/autoParallelization/tests/output_dep.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/output_dep.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,19 +0,0 @@
-// an example of output dependence preventing parallelization
-// x: not live-in, yes live-out
-//    outer scope
-//    loop-carried output-dependence: x=... : accept values based on loop variable; or not. 
-//Solution: Can be parallelized using lastprivate(x)
-#include <stdio.h> 
-void foo()
-{
-  int i,x;
-
-  for (i=0;i<100;i++) 
-    x=i;
-  printf("x=%d",x);    
-}  
-/*  carryLevel should be 0?
- 
- * dep SgExprStatement:x = i; SgExprStatement:x = i; 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:x at 7:6->SgVarRefExp:x at 7:6 == 0;||::
-
- */

Copied: branches/testonly/projects/autoParallelization/tests/output_dep.c (from rev 128, trunk/projects/autoParallelization/tests/output_dep.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/output_dep.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/output_dep.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,19 @@
+// an example of output dependence preventing parallelization
+// x: not live-in, yes live-out
+//    outer scope
+//    loop-carried output-dependence: x=... : accept values based on loop variable; or not. 
+//Solution: Can be parallelized using lastprivate(x)
+#include <stdio.h> 
+void foo()
+{
+  int i,x;
+
+  for (i=0;i<100;i++) 
+    x=i;
+  printf("x=%d",x);    
+}  
+/*  carryLevel should be 0?
+ 
+ * dep SgExprStatement:x = i; SgExprStatement:x = i; 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:x at 7:6->SgVarRefExp:x at 7:6 == 0;||::
+
+ */

Deleted: branches/testonly/projects/autoParallelization/tests/output_dep2.c
===================================================================
--- trunk/projects/autoParallelization/tests/output_dep2.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/output_dep2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,35 +0,0 @@
-// an example of output dependence preventing parallelization
-// loop carried vs. non-loop carried output dependence!
-void foo()
-{
-  int i,x,y;
-
-  for (i=0;i<100;i++) 
-  {  
-    x=i;
-    y=i;
-    y=i+1;
-  }
-}  
-/*  
-output dependence   carryLevel should be 0?  carry level is wrong!!
-dep SgExprStatement:x = i; 
-    SgExprStatement:x = i; 
-    1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 
-    SgVarRefExp:x at 8:6->SgVarRefExp:x at 8:6 == 0;||::
-
-output dependence   carryLevel should be 0?  carry level is wrong!!
-dep SgExprStatement:y = i; SgExprStatement:y = i; 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:y at 9:6->SgVarRefExp:y at 9:6 == 0;||::
-
-output dependence   carryLevel should be 0?  carry level is wrong!!
-dep SgExprStatement:y =(i + 1); SgExprStatement:y =(i + 1); 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:y at 10:6->SgVarRefExp:y at 10:6 == 0;||::
-
-//--------------
-output dependence: non-loop carried, level =1 is correct
-dep SgExprStatement:y = i; SgExprStatement:y =(i + 1); 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:y at 9:6->SgVarRefExp:y at 10:6 == 0;||::
-
- output dependence: Carry level =0 means loop carried, also look at line number: 10>9 
-dep SgExprStatement:y =(i + 1); SgExprStatement:y = i; 1*1 SCALAR_BACK_DEP; commonlevel = 1 CarryLevel = 0 SgVarRefExp:y at 10:6->SgVarRefExp:y at 9:6 <= -1;||::
- 
-
- */

Copied: branches/testonly/projects/autoParallelization/tests/output_dep2.c (from rev 128, trunk/projects/autoParallelization/tests/output_dep2.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/output_dep2.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/output_dep2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,35 @@
+// an example of output dependence preventing parallelization
+// loop carried vs. non-loop carried output dependence!
+void foo()
+{
+  int i,x,y;
+
+  for (i=0;i<100;i++) 
+  {  
+    x=i;
+    y=i;
+    y=i+1;
+  }
+}  
+/*  
+output dependence   carryLevel should be 0?  carry level is wrong!!
+dep SgExprStatement:x = i; 
+    SgExprStatement:x = i; 
+    1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 
+    SgVarRefExp:x at 8:6->SgVarRefExp:x at 8:6 == 0;||::
+
+output dependence   carryLevel should be 0?  carry level is wrong!!
+dep SgExprStatement:y = i; SgExprStatement:y = i; 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:y at 9:6->SgVarRefExp:y at 9:6 == 0;||::
+
+output dependence   carryLevel should be 0?  carry level is wrong!!
+dep SgExprStatement:y =(i + 1); SgExprStatement:y =(i + 1); 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:y at 10:6->SgVarRefExp:y at 10:6 == 0;||::
+
+//--------------
+output dependence: non-loop carried, level =1 is correct
+dep SgExprStatement:y = i; SgExprStatement:y =(i + 1); 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:y at 9:6->SgVarRefExp:y at 10:6 == 0;||::
+
+ output dependence: Carry level =0 means loop carried, also look at line number: 10>9 
+dep SgExprStatement:y =(i + 1); SgExprStatement:y = i; 1*1 SCALAR_BACK_DEP; commonlevel = 1 CarryLevel = 0 SgVarRefExp:y at 10:6->SgVarRefExp:y at 9:6 <= -1;||::
+ 
+
+ */

Deleted: branches/testonly/projects/autoParallelization/tests/output_dep3.c
===================================================================
--- trunk/projects/autoParallelization/tests/output_dep3.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/output_dep3.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,45 +0,0 @@
-// an example of output dependence preventing parallelization
-// two level loops, check carry level value
-#include <stdio.h> 
-void foo()
-{
-  int i,j,x,y;
-
-  for (i=0;i<100;i++) 
-    for (j=0;j<100;j++) 
-    {    
-      x=i;
-      y = x;
-      y=i+j;
-      y= y+1;
-    }
-  printf("x=%d",x);    
-}  
-
-/*
- 
- -------------Dump the dependence graph for the first loop in a function body!------------
-dep SgExprStatement:x = i; SgExprStatement:x = i; 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:x at 11:8->SgVarRefExp:x at 11:8 == 0;* 0;||* 0;== 0;||::
-
-dep SgExprStatement:x = i; SgExprStatement:y = x; 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:x at 11:8[write]->SgVarRefExp:x at 12:11[read] == 0;* 0;||* 0;== 0;||::
-
- dep SgExprStatement:y = x; SgExprStatement:y = x; 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 12:9->SgVarRefExp:y at 12:9 == 0;* 0;||* 0;== 0;||::
-//   y =x ; x = i
- dep SgExprStatement:y = x; SgExprStatement:x = i; 2*2 SCALAR_BACK_DEP; commonlevel = 2 CarryLevel = 1 SgVarRefExp:x at 12:11->SgVarRefExp:x at 11:8 == 0;* 0;||* 0;<= -1;||::
- dep SgExprStatement:y = x; SgExprStatement:y =(i + j); 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 12:9->SgVarRefExp:y at 13:8 == 0;* 0;||* 0;== 0;||::
- dep SgExprStatement:y = x; SgExprStatement:y =(y + 1); 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 12:9->SgVarRefExp:y at 14:8 == 0;* 0;||* 0;== 0;||::
- dep SgExprStatement:y = x; SgExprStatement:y =(y + 1); 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 12:9->SgVarRefExp:y at 14:10 == 0;* 0;||* 0;== 0;||::
- dep SgExprStatement:y =(i + j); SgExprStatement:y =(i + j); 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 13:8->SgVarRefExp:y at 13:8 == 0;* 0;||* 0;== 0;||::
- dep SgExprStatement:y =(i + j); SgExprStatement:y = x; 2*2 SCALAR_BACK_DEP; commonlevel = 2 CarryLevel = 1 SgVarRefExp:y at 13:8->SgVarRefExp:y at 12:9 == 0;* 0;||* 0;<= -1;||::
- dep SgExprStatement:y =(i + j); SgExprStatement:y =(y + 1); 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 13:8->SgVarRefExp:y at 14:8 == 0;* 0;||* 0;== 0;||::
- dep SgExprStatement:y =(i + j); SgExprStatement:y =(y + 1); 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 13:8->SgVarRefExp:y at 14:10 == 0;* 0;||* 0;== 0;||::
- dep SgExprStatement:y =(y + 1); SgExprStatement:y =(y + 1); 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 14:8->SgVarRefExp:y at 14:8 == 0;* 0;||* 0;== 0;||::
- dep SgExprStatement:y =(y + 1); SgExprStatement:y =(y + 1); 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 14:10->SgVarRefExp:y at 14:8 == 0;* 0;||* 0;== 0;||::
- dep SgExprStatement:y =(y + 1); SgExprStatement:y =(y + 1); 2*2 SCALAR_BACK_DEP; commonlevel = 2 CarryLevel = 1 SgVarRefExp:y at 14:8->SgVarRefExp:y at 14:10 == 0;* 0;||* 0;<= -1;||::
- dep SgExprStatement:y =(y + 1); SgExprStatement:y =(i + j); 2*2 SCALAR_BACK_DEP; commonlevel = 2 CarryLevel = 1 SgVarRefExp:y at 14:8->SgVarRefExp:y at 13:8 == 0;* 0;||* 0;<= -1;||::
- dep SgExprStatement:y =(y + 1); SgExprStatement:y =(i + j); 2*2 SCALAR_BACK_DEP; commonlevel = 2 CarryLevel = 1 SgVarRefExp:y at 14:10->SgVarRefExp:y at 13:8 == 0;* 0;||* 0;<= -1;||::
-
- dep SgExprStatement:y =(y + 1); SgExprStatement:y = x; 2*2 SCALAR_BACK_DEP; commonlevel = 2 CarryLevel = 1 SgVarRefExp:y at 14:8->SgVarRefExp:y at 12:9 == 0;* 0;||* 0;<= -1;||::
- dep SgExprStatement:y =(y + 1); SgExprStatement:y = x; 2*2 SCALAR_BACK_DEP; commonlevel = 2 CarryLevel = 1 SgVarRefExp:y at 14:10->SgVarRefExp:y at 12:9 == 0;* 0;||* 0;<= -1;||::
-
- */

Copied: branches/testonly/projects/autoParallelization/tests/output_dep3.c (from rev 128, trunk/projects/autoParallelization/tests/output_dep3.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/output_dep3.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/output_dep3.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,45 @@
+// an example of output dependence preventing parallelization
+// two level loops, check carry level value
+#include <stdio.h> 
+void foo()
+{
+  int i,j,x,y;
+
+  for (i=0;i<100;i++) 
+    for (j=0;j<100;j++) 
+    {    
+      x=i;
+      y = x;
+      y=i+j;
+      y= y+1;
+    }
+  printf("x=%d",x);    
+}  
+
+/*
+ 
+ -------------Dump the dependence graph for the first loop in a function body!------------
+dep SgExprStatement:x = i; SgExprStatement:x = i; 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:x at 11:8->SgVarRefExp:x at 11:8 == 0;* 0;||* 0;== 0;||::
+
+dep SgExprStatement:x = i; SgExprStatement:y = x; 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:x at 11:8[write]->SgVarRefExp:x at 12:11[read] == 0;* 0;||* 0;== 0;||::
+
+ dep SgExprStatement:y = x; SgExprStatement:y = x; 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 12:9->SgVarRefExp:y at 12:9 == 0;* 0;||* 0;== 0;||::
+//   y =x ; x = i
+ dep SgExprStatement:y = x; SgExprStatement:x = i; 2*2 SCALAR_BACK_DEP; commonlevel = 2 CarryLevel = 1 SgVarRefExp:x at 12:11->SgVarRefExp:x at 11:8 == 0;* 0;||* 0;<= -1;||::
+ dep SgExprStatement:y = x; SgExprStatement:y =(i + j); 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 12:9->SgVarRefExp:y at 13:8 == 0;* 0;||* 0;== 0;||::
+ dep SgExprStatement:y = x; SgExprStatement:y =(y + 1); 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 12:9->SgVarRefExp:y at 14:8 == 0;* 0;||* 0;== 0;||::
+ dep SgExprStatement:y = x; SgExprStatement:y =(y + 1); 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 12:9->SgVarRefExp:y at 14:10 == 0;* 0;||* 0;== 0;||::
+ dep SgExprStatement:y =(i + j); SgExprStatement:y =(i + j); 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 13:8->SgVarRefExp:y at 13:8 == 0;* 0;||* 0;== 0;||::
+ dep SgExprStatement:y =(i + j); SgExprStatement:y = x; 2*2 SCALAR_BACK_DEP; commonlevel = 2 CarryLevel = 1 SgVarRefExp:y at 13:8->SgVarRefExp:y at 12:9 == 0;* 0;||* 0;<= -1;||::
+ dep SgExprStatement:y =(i + j); SgExprStatement:y =(y + 1); 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 13:8->SgVarRefExp:y at 14:8 == 0;* 0;||* 0;== 0;||::
+ dep SgExprStatement:y =(i + j); SgExprStatement:y =(y + 1); 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 13:8->SgVarRefExp:y at 14:10 == 0;* 0;||* 0;== 0;||::
+ dep SgExprStatement:y =(y + 1); SgExprStatement:y =(y + 1); 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 14:8->SgVarRefExp:y at 14:8 == 0;* 0;||* 0;== 0;||::
+ dep SgExprStatement:y =(y + 1); SgExprStatement:y =(y + 1); 2*2 SCALAR_DEP; commonlevel = 2 CarryLevel = 2 SgVarRefExp:y at 14:10->SgVarRefExp:y at 14:8 == 0;* 0;||* 0;== 0;||::
+ dep SgExprStatement:y =(y + 1); SgExprStatement:y =(y + 1); 2*2 SCALAR_BACK_DEP; commonlevel = 2 CarryLevel = 1 SgVarRefExp:y at 14:8->SgVarRefExp:y at 14:10 == 0;* 0;||* 0;<= -1;||::
+ dep SgExprStatement:y =(y + 1); SgExprStatement:y =(i + j); 2*2 SCALAR_BACK_DEP; commonlevel = 2 CarryLevel = 1 SgVarRefExp:y at 14:8->SgVarRefExp:y at 13:8 == 0;* 0;||* 0;<= -1;||::
+ dep SgExprStatement:y =(y + 1); SgExprStatement:y =(i + j); 2*2 SCALAR_BACK_DEP; commonlevel = 2 CarryLevel = 1 SgVarRefExp:y at 14:10->SgVarRefExp:y at 13:8 == 0;* 0;||* 0;<= -1;||::
+
+ dep SgExprStatement:y =(y + 1); SgExprStatement:y = x; 2*2 SCALAR_BACK_DEP; commonlevel = 2 CarryLevel = 1 SgVarRefExp:y at 14:8->SgVarRefExp:y at 12:9 == 0;* 0;||* 0;<= -1;||::
+ dep SgExprStatement:y =(y + 1); SgExprStatement:y = x; 2*2 SCALAR_BACK_DEP; commonlevel = 2 CarryLevel = 1 SgVarRefExp:y at 14:10->SgVarRefExp:y at 12:9 == 0;* 0;||* 0;<= -1;||::
+
+ */

Deleted: branches/testonly/projects/autoParallelization/tests/pointer.c
===================================================================
--- trunk/projects/autoParallelization/tests/pointer.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/pointer.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,7 +0,0 @@
-/* Pointers as array
- * */
-void ser(int *a, int *b, int *c)
-{
-  for (int i=0; i<9900; i++)
-    a[i] = a[i] + b[i] * c[i];
-}

Copied: branches/testonly/projects/autoParallelization/tests/pointer.c (from rev 128, trunk/projects/autoParallelization/tests/pointer.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/pointer.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/pointer.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,7 @@
+/* Pointers as array
+ * */
+void ser(int *a, int *b, int *c)
+{
+  for (int i=0; i<9900; i++)
+    a[i] = a[i] + b[i] * c[i];
+}

Deleted: branches/testonly/projects/autoParallelization/tests/private.c
===================================================================
--- trunk/projects/autoParallelization/tests/private.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/private.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,24 +0,0 @@
-/*
- * dependence graph:
- */
-void foo()
-{
-  int i,x;
-  int a[100];
-  int b[100];
-// x should be recognized as a private variable during parallelization
-// yet it introduces a set of dependencies 
-  for (i=0;i<100;i++) 
-  { 
-    x= a[i];
-    b[i]=x+1;
-  }  
-}  
-/*
- * 
-dep SgExprStatement:x =(a[i]); SgExprStatement:x =(a[i]); 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 0 Scalar dep type OUTPUT_DEP;SgVarRefExp:x at 13:6->SgVarRefExp:x at 13:6 == 0;||::
-
-dep SgExprStatement:x =(a[i]); SgExprStatement:b[i] =(x + 1); 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 Scalar dep type TRUE_DEP;SgVarRefExp:x at 13:6->SgVarRefExp:x at 14:10 == 0;||::
-
-dep SgExprStatement:b[i] =(x + 1); SgExprStatement:x =(a[i]); 1*1 SCALAR_BACK_DEP; commonlevel = 1 CarryLevel = 0 Scalar dep type ANTI_DEP;SgVarRefExp:x at 14:10->SgVarRefExp:x at 13:6 <= -1;||::
- */

Copied: branches/testonly/projects/autoParallelization/tests/private.c (from rev 128, trunk/projects/autoParallelization/tests/private.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/private.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/private.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,24 @@
+/*
+ * dependence graph:
+ */
+void foo()
+{
+  int i,x;
+  int a[100];
+  int b[100];
+// x should be recognized as a private variable during parallelization
+// yet it introduces a set of dependencies 
+  for (i=0;i<100;i++) 
+  { 
+    x= a[i];
+    b[i]=x+1;
+  }  
+}  
+/*
+ * 
+dep SgExprStatement:x =(a[i]); SgExprStatement:x =(a[i]); 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 0 Scalar dep type OUTPUT_DEP;SgVarRefExp:x at 13:6->SgVarRefExp:x at 13:6 == 0;||::
+
+dep SgExprStatement:x =(a[i]); SgExprStatement:b[i] =(x + 1); 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 Scalar dep type TRUE_DEP;SgVarRefExp:x at 13:6->SgVarRefExp:x at 14:10 == 0;||::
+
+dep SgExprStatement:b[i] =(x + 1); SgExprStatement:x =(a[i]); 1*1 SCALAR_BACK_DEP; commonlevel = 1 CarryLevel = 0 Scalar dep type ANTI_DEP;SgVarRefExp:x at 14:10->SgVarRefExp:x at 13:6 <= -1;||::
+ */

Deleted: branches/testonly/projects/autoParallelization/tests/reduction.c
===================================================================
--- trunk/projects/autoParallelization/tests/reduction.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/reduction.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,20 +0,0 @@
-int a[100], sum;
-void foo()
-{
-  int i;
-  for (i=0;i<100;i++)
-  {
-    sum = a[i]+ sum;    
-  }
-}
-/*
-loop carried output dependence 
-dep SgExprStatement:sum =((a[i]) + sum); SgExprStatement:sum =((a[i]) + sum); 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:sum at 7:9->SgVarRefExp:sum at 7:9 == 0;||::
-
-non-loop carried  anti dependence, 
-dep SgExprStatement:sum =((a[i]) + sum); SgExprStatement:sum =((a[i]) + sum); 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:sum at 7:17->SgVarRefExp:sum at 7:9 == 0;||::
-
-Loop carried  anti dependence
-dep SgExprStatement:sum =((a[i]) + sum); SgExprStatement:sum =((a[i]) + sum); 1*1 SCALAR_BACK_DEP; commonlevel = 1 CarryLevel = 0 SgVarRefExp:sum at 7:9->SgVarRefExp:sum at 7:17 <= -1;||::
-
- */

Copied: branches/testonly/projects/autoParallelization/tests/reduction.c (from rev 128, trunk/projects/autoParallelization/tests/reduction.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/reduction.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/reduction.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,20 @@
+int a[100], sum;
+void foo()
+{
+  int i;
+  for (i=0;i<100;i++)
+  {
+    sum = a[i]+ sum;    
+  }
+}
+/*
+loop carried output dependence 
+dep SgExprStatement:sum =((a[i]) + sum); SgExprStatement:sum =((a[i]) + sum); 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:sum at 7:9->SgVarRefExp:sum at 7:9 == 0;||::
+
+non-loop carried  anti dependence, 
+dep SgExprStatement:sum =((a[i]) + sum); SgExprStatement:sum =((a[i]) + sum); 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:sum at 7:17->SgVarRefExp:sum at 7:9 == 0;||::
+
+Loop carried  anti dependence
+dep SgExprStatement:sum =((a[i]) + sum); SgExprStatement:sum =((a[i]) + sum); 1*1 SCALAR_BACK_DEP; commonlevel = 1 CarryLevel = 0 SgVarRefExp:sum at 7:9->SgVarRefExp:sum at 7:17 <= -1;||::
+
+ */

Deleted: branches/testonly/projects/autoParallelization/tests/scalar_privatization.c
===================================================================
--- trunk/projects/autoParallelization/tests/scalar_privatization.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/scalar_privatization.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,30 +0,0 @@
-/* a local variable to transfer temp value
- * It introduces "fake" data dependence since the variable is local to each iteration
- * */
-int a[100],b[100];
-void foo()
-{
-  int i;
-  for (i=0;i<100;i++)
-  {
-    int tmp;
-    tmp =a[i]+i;
-    b[i] = tmp;
-  }
-}
-/*
- *-------------Dump the dependence graph for the first loop in a function body!------------
-// Output dependence
-// Loop-carried ,why CarryLevel =1????
-dep SgExprStatement:tmp =((a[i]) + i); SgExprStatement:tmp =((a[i]) + i); 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:tmp at 11:9->SgVarRefExp:tmp at 11:9 == 0;||::
-
-//True dependence for both 
-//a) loop independent (within an iteration) and
-//b) loop carried (across iterations) : This is sure thing if a) holds
-dep SgExprStatement:tmp =((a[i]) + i); SgExprStatement:b[i] = tmp; 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:tmp at 11:9->SgVarRefExp:tmp at 12:12 == 0;||::
-
-//Anti dependence
-//Loop carried(BACK_DEP)  scalar
-dep SgExprStatement:b[i] = tmp; SgExprStatement:tmp =((a[i]) + i); 1*1 SCALAR_BACK_DEP; commonlevel = 1 CarryLevel = 0 SgVarRefExp:tmp at 12:12->SgVarRefExp:tmp at 11:9 <= -1;||::
-
- */

Copied: branches/testonly/projects/autoParallelization/tests/scalar_privatization.c (from rev 128, trunk/projects/autoParallelization/tests/scalar_privatization.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/scalar_privatization.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/scalar_privatization.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,30 @@
+/* a local variable to transfer temp value
+ * It introduces "fake" data dependence since the variable is local to each iteration
+ * */
+int a[100],b[100];
+void foo()
+{
+  int i;
+  for (i=0;i<100;i++)
+  {
+    int tmp;
+    tmp =a[i]+i;
+    b[i] = tmp;
+  }
+}
+/*
+ *-------------Dump the dependence graph for the first loop in a function body!------------
+// Output dependence
+// Loop-carried ,why CarryLevel =1????
+dep SgExprStatement:tmp =((a[i]) + i); SgExprStatement:tmp =((a[i]) + i); 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:tmp at 11:9->SgVarRefExp:tmp at 11:9 == 0;||::
+
+//True dependence for both 
+//a) loop independent (within an iteration) and
+//b) loop carried (across iterations) : This is sure thing if a) holds
+dep SgExprStatement:tmp =((a[i]) + i); SgExprStatement:b[i] = tmp; 1*1 SCALAR_DEP; commonlevel = 1 CarryLevel = 1 SgVarRefExp:tmp at 11:9->SgVarRefExp:tmp at 12:12 == 0;||::
+
+//Anti dependence
+//Loop carried(BACK_DEP)  scalar
+dep SgExprStatement:b[i] = tmp; SgExprStatement:tmp =((a[i]) + i); 1*1 SCALAR_BACK_DEP; commonlevel = 1 CarryLevel = 0 SgVarRefExp:tmp at 12:12->SgVarRefExp:tmp at 11:9 <= -1;||::
+
+ */

Deleted: branches/testonly/projects/autoParallelization/tests/shared.c
===================================================================
--- trunk/projects/autoParallelization/tests/shared.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/shared.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,16 +0,0 @@
-/*
- * dependence graph:
- */
-void foo()
-{
-  int i,x;
-  int a[100];
-  for (i=0;i<100;i++) 
-  { 
-    a[i]=a[i]+1; 
-  }  
-}  
-/*
-  non loop carried anti dependence for array accesses  : level =1 > 0 
-dep SgExprStatement:a[i] =((a[i]) + 1); SgExprStatement:a[i] =((a[i]) + 1); 1*1 ANTI_DEP; commonlevel = 1 CarryLevel = 1  Is precise SgPntrArrRefExp:(a[i])@10:11->SgPntrArrRefExp:a[i]@10:9 == 0;||::
- */

Copied: branches/testonly/projects/autoParallelization/tests/shared.c (from rev 128, trunk/projects/autoParallelization/tests/shared.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/shared.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/shared.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,16 @@
+/*
+ * dependence graph:
+ */
+void foo()
+{
+  int i,x;
+  int a[100];
+  for (i=0;i<100;i++) 
+  { 
+    a[i]=a[i]+1; 
+  }  
+}  
+/*
+  non loop carried anti dependence for array accesses  : level =1 > 0 
+dep SgExprStatement:a[i] =((a[i]) + 1); SgExprStatement:a[i] =((a[i]) + 1); 1*1 ANTI_DEP; commonlevel = 1 CarryLevel = 1  Is precise SgPntrArrRefExp:(a[i])@10:11->SgPntrArrRefExp:a[i]@10:9 == 0;||::
+ */

Deleted: branches/testonly/projects/autoParallelization/tests/simpleA++.h
===================================================================
--- trunk/projects/autoParallelization/tests/simpleA++.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/simpleA++.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,277 +0,0 @@
-// define include guards (SIMPLE_APP_HEADER_FILE)
-#ifndef SIMPLE_APP_HEADER_FILE
-#define SIMPLE_APP_HEADER_FILE
-
-#define APP_RESTRICT
-
-double sqrt ( double rhs);
-double fabs( double lhs );
-double pow( double lhs, double );
-double sin( double);
-void assert(bool);
-
-class ios {
-public:
- static void sync_with_stdio();
-};
-
-void printf( char* format, ...);
-
-
-class InternalIndex
-   {
-     public:
-       // member function declarations
-          int base;
-          int bound;
-          int stride;
-          int length;
-
-          InternalIndex();
-          InternalIndex(int n);
-          InternalIndex(int base, int bound);
-          InternalIndex(int base, int bound, int stride);
-
-       // operators for InternalIndex objects
-       // This is consistant with A++/P++ InternalIndex (Index and Range) objects
-          friend InternalIndex operator+ ( const InternalIndex & lhs, int x );
-          friend InternalIndex operator+ ( int x, const InternalIndex & rhs );
-          friend InternalIndex operator- ( const InternalIndex & lhs, int x );
-          friend InternalIndex operator- ( int x, const InternalIndex & rhs );
-   };
-
-enum {ON, OFF};
-// Support for A++/P++ Index and Range objects
-class Index : public InternalIndex
-   {
-     public:
-          Index();
-          Index(int n);
-          Index(int base, int length);
-          Index(int base, int length, int stride);
-
-        void static setBoundsCheck(int);
-   };
-class Range : public InternalIndex
-   {
-     public:
-          Range();
-          Range(int n);
-          Range(int base, int bound);
-          Range(int base, int bound, int stride);
-   };
-
-class DomainType
-   {
-     public:
-       // data member declarations
-          int Size  [6];
-          int Stride[6];
-       // member function declarations
-          int getBase(int);
-          int getBound(int);
-          int getLength(int);
-   };
-class DescriptorType 
-   { 
-     public:
-       // data member declarations 
-          DomainType Array_Domain;
-          double* APP_RESTRICT Array_View_Pointer1;
-          double* APP_RESTRICT Array_View_Pointer2;
-          double* APP_RESTRICT Array_View_Pointer3;
-          double* APP_RESTRICT Array_View_Pointer4;
-          double* APP_RESTRICT Array_View_Pointer5;
-          double* APP_RESTRICT Array_View_Pointer6;
-   };
-class intArray 
-   { 
-     public: 
-       // data member declarations 
-          DescriptorType Array_Descriptor; 
-       // member function declarations 
-          intArray( int);
-          int getBase(int);  
-          int getBound(int); 
-          int getLength( int dim);
-       // declaration of indexing operators
-          intArray& operator()( const InternalIndex & I );
-          intArray& operator()( const InternalIndex & I, const InternalIndex & J );
-          intArray& operator()( const InternalIndex & I, const InternalIndex & J,
-                                  const InternalIndex & K );
-          intArray& operator()( const InternalIndex & I, const InternalIndex & J,
-                                  const InternalIndex & K, const InternalIndex & L );
-
-   };
-class doubleArray
-   {
-     public:
-       // data member declarations
-          DescriptorType Array_Descriptor;
-       // member function declarations
-          int getBase(int);
-          int getBound(int);
-
-       // destructor and constructors
-         ~doubleArray ();
-          doubleArray ();
-          doubleArray (int i);
-          doubleArray (int i, int j);
-          doubleArray (int i, int j, int k);
-          doubleArray (int i, int j, int k, int l);
-          doubleArray (int i, int j, int k, int l, int m);
-          doubleArray (int i, int j, int k, int l, int m, int n);
-
-       // Indexing operators
-          double & operator[](int n);
-
-        friend intArray operator <= ( const doubleArray& lhs, double rhs);
-        friend intArray operator <= ( double lhs, const doubleArray& rhs);
-        friend intArray operator <= ( const doubleArray& lhs, const doubleArray& rhs);
-        friend intArray operator >= ( const doubleArray& lhs, double rhs);
-        friend intArray operator >= ( double lhs, const doubleArray& rhs);
-        friend intArray operator >= ( const doubleArray& lhs, const doubleArray& rhs);
-
-       // declaration of indexing operators
-          doubleArray& operator()( const InternalIndex & I );
-          doubleArray& operator()( const InternalIndex & I, const InternalIndex & J );
-          doubleArray& operator()( const InternalIndex & I, const InternalIndex & J,
-                                  const InternalIndex & K );
-          doubleArray& operator()( const InternalIndex & I, const InternalIndex & J,
-                                  const InternalIndex & K, const InternalIndex & L );
-
-       // declaration of scalar indexing operators
-          double & operator()( int i );
-          double & operator()( int i, int j );
-          double & operator()( int i, int j, int k );
-          double & operator()( int i, int j, int k, int l );
-
-          doubleArray & operator- ();
-
-       // example array operators
-          doubleArray & operator= ( double x );
-          doubleArray & operator= ( const doubleArray & X );
-          friend doubleArray & operator+ ( const doubleArray & lhs, const doubleArray & rhs);
-          friend doubleArray & operator+ ( double lhs, const doubleArray & rhs);
-          friend doubleArray & operator+ ( const doubleArray & lhs, double rhs);
-          friend doubleArray & operator- ( const doubleArray & lhs, const doubleArray & rhs);
-          friend doubleArray & operator- ( const doubleArray & lhs, double rhs);
-          friend doubleArray & operator* ( const doubleArray & lhs, const doubleArray & rhs);
-          friend doubleArray & operator* ( double lhs, const doubleArray & rhs);
-          friend doubleArray & operator* ( const doubleArray & lhs, double rhs);
-          friend doubleArray & operator/ ( const doubleArray & lhs, const doubleArray & rhs);
-          friend doubleArray & operator/ ( const doubleArray & lhs, double rhs);
-          friend doubleArray & operator/ ( double lhs, const doubleArray & rhs);
-          friend doubleArray & sqrt ( const doubleArray & rhs);
-          friend doubleArray & pow (const doubleArray& lhs, double rhs);
-          friend doubleArray & pow (const doubleArray& lhs, const doubleArray& rhs);
-
-          friend doubleArray & sin ( doubleArray & rhs);
-
-          double* getAdjustedDataPointer();
-          double* getDataPointer();
-          int getLocalBase(int dim);
-          int getLength( int dim);
-
-          doubleArray & redim ( doubleArray & X );
-          doubleArray & resize ( int i );
-
-          void fill( double );
-          void replace( const intArray& cond, double val);
-          void replace( const intArray& cond, const doubleArray& val);
-   };
-
-class floatArray
-   {
-     public:
-       // data member declarations
-          DescriptorType Array_Descriptor;
-       // member function declarations
-          int getBase(int);
-          int getBound(int);
-
-       // destructor and constructors
-         ~floatArray ();
-          floatArray ();
-          floatArray (int i);
-          floatArray (int i, int j);
-          floatArray (int i, int j, int k);
-          floatArray (int i, int j, int k, int l);
-          floatArray (int i, int j, int k, int l, int m);
-          floatArray (int i, int j, int k, int l, int m, int n);
-
-       // Indexing operators
-          float & operator[](int n);
-
-        friend intArray operator <= ( const floatArray& lhs, float rhs);
-        friend intArray operator <= ( float lhs, const floatArray& rhs);
-        friend intArray operator <= ( const floatArray& lhs, const floatArray& rhs);
-        friend intArray operator >= ( const floatArray& lhs, float rhs);
-        friend intArray operator >= ( float lhs, const floatArray& rhs);
-        friend intArray operator >= ( const floatArray& lhs, const floatArray& rhs);
-
-       // declaration of indexing operators
-          floatArray& operator()( const InternalIndex & I );
-          floatArray& operator()( const InternalIndex & I, const InternalIndex & J );
-          floatArray& operator()( const InternalIndex & I, const InternalIndex & J,
-                                  const InternalIndex & K );
-          floatArray& operator()( const InternalIndex & I, const InternalIndex & J,
-                                  const InternalIndex & K, const InternalIndex & L );
-
-       // declaration of scalar indexing operators
-          float & operator()( int i );
-          float & operator()( int i, int j );
-          float & operator()( int i, int j, int k );
-          float & operator()( int i, int j, int k, int l );
-
-          floatArray & operator- ();
-
-       // example array operators
-          floatArray & operator= ( float x );
-          floatArray & operator= ( const floatArray & X );
-          friend floatArray & operator+ ( const floatArray & lhs, const floatArray & rhs);
-          friend floatArray & operator+ ( float lhs, const floatArray & rhs);
-          friend floatArray & operator+ ( const floatArray & lhs, float rhs);
-          friend floatArray & operator- ( const floatArray & lhs, const floatArray & rhs);
-          friend floatArray & operator- ( const floatArray & lhs, float rhs);
-          friend floatArray & operator* ( const floatArray & lhs, const floatArray & rhs);
-          friend floatArray & operator* ( float lhs, const floatArray & rhs);
-          friend floatArray & operator* ( const floatArray & lhs, float rhs);
-          friend floatArray & operator/ ( const floatArray & lhs, const floatArray & rhs);
-          friend floatArray & operator/ ( const floatArray & lhs, float rhs);
-          friend floatArray & operator/ ( float lhs, const floatArray & rhs);
-          friend floatArray & sqrt ( const floatArray & rhs);
-          friend floatArray & pow (const floatArray& lhs, float rhs);
-          friend floatArray & pow (const floatArray& lhs, const floatArray& rhs);
-
-          friend floatArray & sin ( floatArray & rhs);
-
-          float* getAdjustedDataPointer();
-          float* getDataPointer();
-          int getLocalBase(int dim);
-          int getLength( int dim);
-          //Liao, 11/12/2008. Add alias functions used in the annotation
-          int length(int i);
-          float & elem(int i);
-
-          floatArray & redim ( floatArray & X );
-          floatArray & resize ( int i );
-
-          void fill( float );
-          void replace( const intArray& cond, float val);
-          void replace( const intArray& cond, const floatArray& val);
-   };
-
-
-class Optimization_Manager {
-public:
- static void Initialize_Virtual_Machine (char* ,int nprocs,int argc,char** argv);
- static void Exit_Virtual_Machine ();
-};
-
-void APP_ABORT();
-
-// endif for SIMPLE_APP_HEADER_FILE (include guard)
-//#include "/home/qingyi/A++P++/A++/include/where.h"
-#endif
-

Copied: branches/testonly/projects/autoParallelization/tests/simpleA++.h (from rev 128, trunk/projects/autoParallelization/tests/simpleA++.h)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/simpleA++.h	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/simpleA++.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,277 @@
+// define include guards (SIMPLE_APP_HEADER_FILE)
+#ifndef SIMPLE_APP_HEADER_FILE
+#define SIMPLE_APP_HEADER_FILE
+
+#define APP_RESTRICT
+
+double sqrt ( double rhs);
+double fabs( double lhs );
+double pow( double lhs, double );
+double sin( double);
+void assert(bool);
+
+class ios {
+public:
+ static void sync_with_stdio();
+};
+
+void printf( char* format, ...);
+
+
+class InternalIndex
+   {
+     public:
+       // member function declarations
+          int base;
+          int bound;
+          int stride;
+          int length;
+
+          InternalIndex();
+          InternalIndex(int n);
+          InternalIndex(int base, int bound);
+          InternalIndex(int base, int bound, int stride);
+
+       // operators for InternalIndex objects
+       // This is consistant with A++/P++ InternalIndex (Index and Range) objects
+          friend InternalIndex operator+ ( const InternalIndex & lhs, int x );
+          friend InternalIndex operator+ ( int x, const InternalIndex & rhs );
+          friend InternalIndex operator- ( const InternalIndex & lhs, int x );
+          friend InternalIndex operator- ( int x, const InternalIndex & rhs );
+   };
+
+enum {ON, OFF};
+// Support for A++/P++ Index and Range objects
+class Index : public InternalIndex
+   {
+     public:
+          Index();
+          Index(int n);
+          Index(int base, int length);
+          Index(int base, int length, int stride);
+
+        void static setBoundsCheck(int);
+   };
+class Range : public InternalIndex
+   {
+     public:
+          Range();
+          Range(int n);
+          Range(int base, int bound);
+          Range(int base, int bound, int stride);
+   };
+
+class DomainType
+   {
+     public:
+       // data member declarations
+          int Size  [6];
+          int Stride[6];
+       // member function declarations
+          int getBase(int);
+          int getBound(int);
+          int getLength(int);
+   };
+class DescriptorType 
+   { 
+     public:
+       // data member declarations 
+          DomainType Array_Domain;
+          double* APP_RESTRICT Array_View_Pointer1;
+          double* APP_RESTRICT Array_View_Pointer2;
+          double* APP_RESTRICT Array_View_Pointer3;
+          double* APP_RESTRICT Array_View_Pointer4;
+          double* APP_RESTRICT Array_View_Pointer5;
+          double* APP_RESTRICT Array_View_Pointer6;
+   };
+class intArray 
+   { 
+     public: 
+       // data member declarations 
+          DescriptorType Array_Descriptor; 
+       // member function declarations 
+          intArray( int);
+          int getBase(int);  
+          int getBound(int); 
+          int getLength( int dim);
+       // declaration of indexing operators
+          intArray& operator()( const InternalIndex & I );
+          intArray& operator()( const InternalIndex & I, const InternalIndex & J );
+          intArray& operator()( const InternalIndex & I, const InternalIndex & J,
+                                  const InternalIndex & K );
+          intArray& operator()( const InternalIndex & I, const InternalIndex & J,
+                                  const InternalIndex & K, const InternalIndex & L );
+
+   };
+class doubleArray
+   {
+     public:
+       // data member declarations
+          DescriptorType Array_Descriptor;
+       // member function declarations
+          int getBase(int);
+          int getBound(int);
+
+       // destructor and constructors
+         ~doubleArray ();
+          doubleArray ();
+          doubleArray (int i);
+          doubleArray (int i, int j);
+          doubleArray (int i, int j, int k);
+          doubleArray (int i, int j, int k, int l);
+          doubleArray (int i, int j, int k, int l, int m);
+          doubleArray (int i, int j, int k, int l, int m, int n);
+
+       // Indexing operators
+          double & operator[](int n);
+
+        friend intArray operator <= ( const doubleArray& lhs, double rhs);
+        friend intArray operator <= ( double lhs, const doubleArray& rhs);
+        friend intArray operator <= ( const doubleArray& lhs, const doubleArray& rhs);
+        friend intArray operator >= ( const doubleArray& lhs, double rhs);
+        friend intArray operator >= ( double lhs, const doubleArray& rhs);
+        friend intArray operator >= ( const doubleArray& lhs, const doubleArray& rhs);
+
+       // declaration of indexing operators
+          doubleArray& operator()( const InternalIndex & I );
+          doubleArray& operator()( const InternalIndex & I, const InternalIndex & J );
+          doubleArray& operator()( const InternalIndex & I, const InternalIndex & J,
+                                  const InternalIndex & K );
+          doubleArray& operator()( const InternalIndex & I, const InternalIndex & J,
+                                  const InternalIndex & K, const InternalIndex & L );
+
+       // declaration of scalar indexing operators
+          double & operator()( int i );
+          double & operator()( int i, int j );
+          double & operator()( int i, int j, int k );
+          double & operator()( int i, int j, int k, int l );
+
+          doubleArray & operator- ();
+
+       // example array operators
+          doubleArray & operator= ( double x );
+          doubleArray & operator= ( const doubleArray & X );
+          friend doubleArray & operator+ ( const doubleArray & lhs, const doubleArray & rhs);
+          friend doubleArray & operator+ ( double lhs, const doubleArray & rhs);
+          friend doubleArray & operator+ ( const doubleArray & lhs, double rhs);
+          friend doubleArray & operator- ( const doubleArray & lhs, const doubleArray & rhs);
+          friend doubleArray & operator- ( const doubleArray & lhs, double rhs);
+          friend doubleArray & operator* ( const doubleArray & lhs, const doubleArray & rhs);
+          friend doubleArray & operator* ( double lhs, const doubleArray & rhs);
+          friend doubleArray & operator* ( const doubleArray & lhs, double rhs);
+          friend doubleArray & operator/ ( const doubleArray & lhs, const doubleArray & rhs);
+          friend doubleArray & operator/ ( const doubleArray & lhs, double rhs);
+          friend doubleArray & operator/ ( double lhs, const doubleArray & rhs);
+          friend doubleArray & sqrt ( const doubleArray & rhs);
+          friend doubleArray & pow (const doubleArray& lhs, double rhs);
+          friend doubleArray & pow (const doubleArray& lhs, const doubleArray& rhs);
+
+          friend doubleArray & sin ( doubleArray & rhs);
+
+          double* getAdjustedDataPointer();
+          double* getDataPointer();
+          int getLocalBase(int dim);
+          int getLength( int dim);
+
+          doubleArray & redim ( doubleArray & X );
+          doubleArray & resize ( int i );
+
+          void fill( double );
+          void replace( const intArray& cond, double val);
+          void replace( const intArray& cond, const doubleArray& val);
+   };
+
+class floatArray
+   {
+     public:
+       // data member declarations
+          DescriptorType Array_Descriptor;
+       // member function declarations
+          int getBase(int);
+          int getBound(int);
+
+       // destructor and constructors
+         ~floatArray ();
+          floatArray ();
+          floatArray (int i);
+          floatArray (int i, int j);
+          floatArray (int i, int j, int k);
+          floatArray (int i, int j, int k, int l);
+          floatArray (int i, int j, int k, int l, int m);
+          floatArray (int i, int j, int k, int l, int m, int n);
+
+       // Indexing operators
+          float & operator[](int n);
+
+        friend intArray operator <= ( const floatArray& lhs, float rhs);
+        friend intArray operator <= ( float lhs, const floatArray& rhs);
+        friend intArray operator <= ( const floatArray& lhs, const floatArray& rhs);
+        friend intArray operator >= ( const floatArray& lhs, float rhs);
+        friend intArray operator >= ( float lhs, const floatArray& rhs);
+        friend intArray operator >= ( const floatArray& lhs, const floatArray& rhs);
+
+       // declaration of indexing operators
+          floatArray& operator()( const InternalIndex & I );
+          floatArray& operator()( const InternalIndex & I, const InternalIndex & J );
+          floatArray& operator()( const InternalIndex & I, const InternalIndex & J,
+                                  const InternalIndex & K );
+          floatArray& operator()( const InternalIndex & I, const InternalIndex & J,
+                                  const InternalIndex & K, const InternalIndex & L );
+
+       // declaration of scalar indexing operators
+          float & operator()( int i );
+          float & operator()( int i, int j );
+          float & operator()( int i, int j, int k );
+          float & operator()( int i, int j, int k, int l );
+
+          floatArray & operator- ();
+
+       // example array operators
+          floatArray & operator= ( float x );
+          floatArray & operator= ( const floatArray & X );
+          friend floatArray & operator+ ( const floatArray & lhs, const floatArray & rhs);
+          friend floatArray & operator+ ( float lhs, const floatArray & rhs);
+          friend floatArray & operator+ ( const floatArray & lhs, float rhs);
+          friend floatArray & operator- ( const floatArray & lhs, const floatArray & rhs);
+          friend floatArray & operator- ( const floatArray & lhs, float rhs);
+          friend floatArray & operator* ( const floatArray & lhs, const floatArray & rhs);
+          friend floatArray & operator* ( float lhs, const floatArray & rhs);
+          friend floatArray & operator* ( const floatArray & lhs, float rhs);
+          friend floatArray & operator/ ( const floatArray & lhs, const floatArray & rhs);
+          friend floatArray & operator/ ( const floatArray & lhs, float rhs);
+          friend floatArray & operator/ ( float lhs, const floatArray & rhs);
+          friend floatArray & sqrt ( const floatArray & rhs);
+          friend floatArray & pow (const floatArray& lhs, float rhs);
+          friend floatArray & pow (const floatArray& lhs, const floatArray& rhs);
+
+          friend floatArray & sin ( floatArray & rhs);
+
+          float* getAdjustedDataPointer();
+          float* getDataPointer();
+          int getLocalBase(int dim);
+          int getLength( int dim);
+          //Liao, 11/12/2008. Add alias functions used in the annotation
+          int length(int i);
+          float & elem(int i);
+
+          floatArray & redim ( floatArray & X );
+          floatArray & resize ( int i );
+
+          void fill( float );
+          void replace( const intArray& cond, float val);
+          void replace( const intArray& cond, const floatArray& val);
+   };
+
+
+class Optimization_Manager {
+public:
+ static void Initialize_Virtual_Machine (char* ,int nprocs,int argc,char** argv);
+ static void Exit_Virtual_Machine ();
+};
+
+void APP_ABORT();
+
+// endif for SIMPLE_APP_HEADER_FILE (include guard)
+//#include "/home/qingyi/A++P++/A++/include/where.h"
+#endif
+

Deleted: branches/testonly/projects/autoParallelization/tests/true_dep.c
===================================================================
--- trunk/projects/autoParallelization/tests/true_dep.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/true_dep.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,8 +0,0 @@
-void foo()
-{
-  int i;
-  int a[100];
-
-  for (i=1;i<100;i++)
-    a[i]=a[i-1]+1;
-}  

Copied: branches/testonly/projects/autoParallelization/tests/true_dep.c (from rev 128, trunk/projects/autoParallelization/tests/true_dep.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/true_dep.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/true_dep.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,8 @@
+void foo()
+{
+  int i;
+  int a[100];
+
+  for (i=1;i<100;i++)
+    a[i]=a[i-1]+1;
+}  

Deleted: branches/testonly/projects/autoParallelization/tests/true_dep_2.c
===================================================================
--- trunk/projects/autoParallelization/tests/true_dep_2.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/true_dep_2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,27 +0,0 @@
-// An example of loop carried true-dependence at both levels
-void foo()
-{
-  int n=100, m=100;
-  double a[n][m];
-  int i,j;
-  for (i=1;i<n;i++)
-    for (j=1;j<m;j++)
-      a[i][j]=a[i][j-1]+a[i-1][j];
-}
-/*
-dep SgExprStatement:(a[i])[j] =(((a[i])[j - 1]) +((a[i - 1])[j])); 
-    SgExprStatement:(a[i])[j] =(((a[i])[j - 1]) +((a[i - 1])[j])); 
-    2*2 TRUE_DEP; commonlevel = 2 CarryLevel = 1  
-    Is precise 
-    SgPntrArrRefExp:(a[i])[j]@9:14->SgPntrArrRefExp:((a[i])[j - 1])@9:19 
-     == 0; *   0;||
-     *  0; == -1;||::
-
-dep SgExprStatement:(a[i])[j] =(((a[i])[j - 1]) +((a[i - 1])[j])); 
-    SgExprStatement:(a[i])[j] =(((a[i])[j - 1]) +((a[i - 1])[j])); 
-    2*2 TRUE_DEP; commonlevel = 2 CarryLevel = 0  
-    Is precise 
-    SgPntrArrRefExp:(a[i])[j]@9:14->SgPntrArrRefExp:((a[i - 1])[j])@9:31 
-    == -1;  * 0;||
-    *  0 ; == 0;||::
-*/

Copied: branches/testonly/projects/autoParallelization/tests/true_dep_2.c (from rev 128, trunk/projects/autoParallelization/tests/true_dep_2.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/true_dep_2.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/true_dep_2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,27 @@
+// An example of loop carried true-dependence at both levels
+void foo()
+{
+  int n=100, m=100;
+  double a[n][m];
+  int i,j;
+  for (i=1;i<n;i++)
+    for (j=1;j<m;j++)
+      a[i][j]=a[i][j-1]+a[i-1][j];
+}
+/*
+dep SgExprStatement:(a[i])[j] =(((a[i])[j - 1]) +((a[i - 1])[j])); 
+    SgExprStatement:(a[i])[j] =(((a[i])[j - 1]) +((a[i - 1])[j])); 
+    2*2 TRUE_DEP; commonlevel = 2 CarryLevel = 1  
+    Is precise 
+    SgPntrArrRefExp:(a[i])[j]@9:14->SgPntrArrRefExp:((a[i])[j - 1])@9:19 
+     == 0; *   0;||
+     *  0; == -1;||::
+
+dep SgExprStatement:(a[i])[j] =(((a[i])[j - 1]) +((a[i - 1])[j])); 
+    SgExprStatement:(a[i])[j] =(((a[i])[j - 1]) +((a[i - 1])[j])); 
+    2*2 TRUE_DEP; commonlevel = 2 CarryLevel = 0  
+    Is precise 
+    SgPntrArrRefExp:(a[i])[j]@9:14->SgPntrArrRefExp:((a[i - 1])[j])@9:31 
+    == -1;  * 0;||
+    *  0 ; == 0;||::
+*/

Deleted: branches/testonly/projects/autoParallelization/tests/true_l2.c
===================================================================
--- trunk/projects/autoParallelization/tests/true_l2.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/true_l2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,19 +0,0 @@
-/*
- * Outer loop: no dependence: 
- * Inner loop: loop-carried dependence
- *
- * final dependence graph:
- * dep SgExprStatement:(a[i])[j] =(((a[i])[j - 1]) + 1); 
- *      SgExprStatement:(a[i])[j] =(((a[i])[j - 1]) + 1); 
- * 2*2TRUE_DEP; commonlevel = 2  +precise CarryLevel = 1
- *     SgPntrArrRefExp:(a[i])[j]
- *     SgPntrArrRefExp:((a[i])[j - 1])  == 0;* 0;||* 0;== -1;||::
- */
-int i,j;
-int a[100][100];
-void foo()
-{
-  for (i=1;i<100;i++)
-    for (j=1;j<100;j++)
-      a[i][j]=a[i][j-1]+1;
-}

Copied: branches/testonly/projects/autoParallelization/tests/true_l2.c (from rev 128, trunk/projects/autoParallelization/tests/true_l2.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/true_l2.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/true_l2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,19 @@
+/*
+ * Outer loop: no dependence: 
+ * Inner loop: loop-carried dependence
+ *
+ * final dependence graph:
+ * dep SgExprStatement:(a[i])[j] =(((a[i])[j - 1]) + 1); 
+ *      SgExprStatement:(a[i])[j] =(((a[i])[j - 1]) + 1); 
+ * 2*2TRUE_DEP; commonlevel = 2  +precise CarryLevel = 1
+ *     SgPntrArrRefExp:(a[i])[j]
+ *     SgPntrArrRefExp:((a[i])[j - 1])  == 0;* 0;||* 0;== -1;||::
+ */
+int i,j;
+int a[100][100];
+void foo()
+{
+  for (i=1;i<100;i++)
+    for (j=1;j<100;j++)
+      a[i][j]=a[i][j-1]+1;
+}

Deleted: branches/testonly/projects/autoParallelization/tests/vector_1.C
===================================================================
--- trunk/projects/autoParallelization/tests/vector_1.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/vector_1.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,15 +0,0 @@
-// vector constructors
-// semantics
-// implementation: 
-#include <vector>
-#include <iostream>
-
-using namespace std;
-
-int main (void)
-{
-  int j= 268435456;
-  //int j= 500000000;
-  vector <float> v1(j,56.00);  //stmt 2.
-  return 0;
-}

Copied: branches/testonly/projects/autoParallelization/tests/vector_1.C (from rev 128, trunk/projects/autoParallelization/tests/vector_1.C)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/vector_1.C	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/vector_1.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,15 @@
+// vector constructors
+// semantics
+// implementation: 
+#include <vector>
+#include <iostream>
+
+using namespace std;
+
+int main (void)
+{
+  int j= 268435456;
+  //int j= 500000000;
+  vector <float> v1(j,56.00);  //stmt 2.
+  return 0;
+}

Deleted: branches/testonly/projects/autoParallelization/tests/vector_2.C
===================================================================
--- trunk/projects/autoParallelization/tests/vector_2.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/vector_2.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,18 +0,0 @@
-// vector constructors
-// semantics
-// implementation: 
-#include <vector>
-#include <iostream>
-
-using namespace std;
-
-int main (void)
-{
-  vector <int> v1; // minimum exe time
-  cout<<"Capacity is:"<<v1.capacity()<<endl;
-  cout<<"Max size is:"<<v1.max_size()<<endl;
-  // is:            1073741823
-  //vector <int> v1(500000000,56);  //stmt 2.
-   vector <int> v2(673741823); // the same execution time as stmt 2!
-  return 0;
-}

Copied: branches/testonly/projects/autoParallelization/tests/vector_2.C (from rev 128, trunk/projects/autoParallelization/tests/vector_2.C)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/vector_2.C	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/vector_2.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,18 @@
+// vector constructors
+// semantics
+// implementation: 
+#include <vector>
+#include <iostream>
+
+using namespace std;
+
+int main (void)
+{
+  vector <int> v1; // minimum exe time
+  cout<<"Capacity is:"<<v1.capacity()<<endl;
+  cout<<"Max size is:"<<v1.max_size()<<endl;
+  // is:            1073741823
+  //vector <int> v1(500000000,56);  //stmt 2.
+   vector <int> v2(673741823); // the same execution time as stmt 2!
+  return 0;
+}

Deleted: branches/testonly/projects/autoParallelization/tests/vectorize_1.c
===================================================================
--- trunk/projects/autoParallelization/tests/vectorize_1.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/autoParallelization/tests/vectorize_1.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,9 +0,0 @@
-/* Vectorization example
- * */
-float a[256], b[256], c[256];
-int i;
-foo ()
-{
-  for (i = 0; i < 256; i++)
-    a[i] = b[i] + c[i];
-}

Copied: branches/testonly/projects/autoParallelization/tests/vectorize_1.c (from rev 128, trunk/projects/autoParallelization/tests/vectorize_1.c)
===================================================================
--- branches/testonly/projects/autoParallelization/tests/vectorize_1.c	                        (rev 0)
+++ branches/testonly/projects/autoParallelization/tests/vectorize_1.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,9 @@
+/* Vectorization example
+ * */
+float a[256], b[256], c[256];
+int i;
+foo ()
+{
+  for (i = 0; i < 256; i++)
+    a[i] = b[i] + c[i];
+}

Modified: branches/testonly/projects/binCompass/Makefile.am
===================================================================
--- branches/testonly/projects/binCompass/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/binCompass/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -4,7 +4,7 @@
 
 SUBDIRS = analyses graphanalyses
 
-INCLUDES = $(ROSE_INCLUDES) -I$(builddir) $(LTDLINCL)
+INCLUDES = $(ROSE_INCLUDES) -I. $(LTDLINCL)
 
 bin_PROGRAMS = binCompassMain 
 

Modified: branches/testonly/projects/binCompass/binCompassMain.cpp
===================================================================
--- branches/testonly/projects/binCompass/binCompassMain.cpp	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/binCompass/binCompassMain.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -165,10 +165,11 @@
   SgBinaryFile* binaryFile = isSgBinaryFile(project->get_fileList()[0]);
   SgAsmFile* file = binaryFile != NULL ? binaryFile->get_binaryFile() : NULL;
 
-  const SgAsmInterpretationPtrList& interps = file->get_interpretations();
-  ROSE_ASSERT (interps.size() == 1);
-  SgAsmInterpretation* interp = interps[0];
-
+  //  const SgAsmInterpretationPtrList& interps = file->get_interpretations();
+  //ROSE_ASSERT (interps.size() == 1);
+  //SgAsmInterpretation* interp = interps[0];
+  SgAsmInterpretation* interp = SageInterface::getMainInterpretation(file);
+                                
   if (containsArgument(argc, argv, "-printTree")) {
     fprintf(stderr, "Printing AST... _binary_tree.dot\n");
     string filename="_binary_tree.dot";

Modified: branches/testonly/projects/binaryVisualization/Makefile.am
===================================================================
--- branches/testonly/projects/binaryVisualization/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/binaryVisualization/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -2,7 +2,9 @@
 
 if ROSE_USE_OPENGL
 
-INCLUDES = $(ROSE_INCLUDES) -I$(builddir) $(GL_CFLAGS)
+# DQ (11/13/2008): Can't use builddir on some machines and "-I." is already included by default.
+# INCLUDES = $(ROSE_INCLUDES) -I$(builddir) $(GL_CFLAGS)
+INCLUDES = $(ROSE_INCLUDES) $(GL_CFLAGS)
 
 bin_PROGRAMS = vizzBinary 
 

Modified: branches/testonly/projects/binaryVisualization/vizzBinary.C
===================================================================
--- branches/testonly/projects/binaryVisualization/vizzBinary.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/binaryVisualization/vizzBinary.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -845,9 +845,9 @@
   SgAsmFile* file = binFile != NULL ? binFile->get_binaryFile() : NULL;
 
 
-  const SgAsmInterpretationPtrList& interps = file->get_interpretations();
-  ROSE_ASSERT (interps.size() == 1);
-  SgAsmInterpretation* interp = interps[0];
+  SgAsmInterpretation* interp = SageInterface::getMainInterpretation(file);
+  //  ROSE_ASSERT (interps.size() == 1);
+  //  SgAsmInterpretation* interp = interps[0];
 
   string fname = StringUtility::stripPathFromFileName(name);
 

Modified: branches/testonly/projects/compass/extensions/checkers/binPrintAsmFunctions/binPrintAsmFunctionsDocs.tex
===================================================================
--- branches/testonly/projects/compass/extensions/checkers/binPrintAsmFunctions/binPrintAsmFunctionsDocs.tex	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/extensions/checkers/binPrintAsmFunctions/binPrintAsmFunctionsDocs.tex	2008-11-18 06:54:05 UTC (rev 129)
@@ -13,48 +13,18 @@
 \section{Bin Print Asm Functions}
 \label{BinPrintAsmFunctions::overview}
 
-% write your introduction
+This binary analysis traverses over the AST and prints all functions within the binary.
 
+This is an example of how to traverse a binary. This is not a security checker per se.
+
 \subsection{Parameter Requirements}
 
-%Write the Parameter specification here.
-   No Parameter specifications yet!
+None.
 
 \subsection{Implementation}
 
-%Details of the implementation go here.
-   No implementation yet!
+See binPrintAsmFunctions.C
 
-\subsection{Non-Compliant Code Example}
 
-% write your non-compliant code subsection
-
-\begin{verbatim}
-
-% write your non-compliant code example
-
-\end{verbatim}
-
-\subsection{Compliant Solution}
-
-% write your compliant code subsection
-
-\begin{verbatim}
-
-% write your compliant code example
-
-\end{verbatim}
-
-\subsection{Mitigation Strategies}
-\subsubsection{Static Analysis} 
-
-Compliance with this rule can be checked using structural static analysis checkers using the following algorithm:
-
-\begin{enumerate}
-\item Write your checker algorithm
-\end{enumerate}
-
-\subsection{References}
-
 % Write some references
 % ex. \htmladdnormallink{ISO/IEC 9899-1999:TC2}{https://www.securecoding.cert.org/confluence/display/seccode/AA.+C+References} Forward, Section 6.9.1, Function definitions''

Modified: branches/testonly/projects/compass/extensions/checkers/binPrintAsmInstruction/binPrintAsmInstructionDocs.tex
===================================================================
--- branches/testonly/projects/compass/extensions/checkers/binPrintAsmInstruction/binPrintAsmInstructionDocs.tex	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/extensions/checkers/binPrintAsmInstruction/binPrintAsmInstructionDocs.tex	2008-11-18 06:54:05 UTC (rev 129)
@@ -13,48 +13,19 @@
 \section{Bin Print Asm Instruction}
 \label{BinPrintAsmInstruction::overview}
 
-% write your introduction
+This binary analysis traverses over the AST and prints all instructions within the binary.
 
+This is an example of how to traverse a binary. This is not a security checker per se.
+
+
 \subsection{Parameter Requirements}
 
-%Write the Parameter specification here.
-   No Parameter specifications yet!
+None.
 
 \subsection{Implementation}
 
-%Details of the implementation go here.
-   No implementation yet!
+See binPrintAsmInstructions.C
 
-\subsection{Non-Compliant Code Example}
 
-% write your non-compliant code subsection
-
-\begin{verbatim}
-
-% write your non-compliant code example
-
-\end{verbatim}
-
-\subsection{Compliant Solution}
-
-% write your compliant code subsection
-
-\begin{verbatim}
-
-% write your compliant code example
-
-\end{verbatim}
-
-\subsection{Mitigation Strategies}
-\subsubsection{Static Analysis} 
-
-Compliance with this rule can be checked using structural static analysis checkers using the following algorithm:
-
-\begin{enumerate}
-\item Write your checker algorithm
-\end{enumerate}
-
-\subsection{References}
-
 % Write some references
 % ex. \htmladdnormallink{ISO/IEC 9899-1999:TC2}{https://www.securecoding.cert.org/confluence/display/seccode/AA.+C+References} Forward, Section 6.9.1, Function definitions''

Modified: branches/testonly/projects/compass/extensions/checkers/binaryBufferOverflow/binaryBufferOverflowDocs.tex
===================================================================
--- branches/testonly/projects/compass/extensions/checkers/binaryBufferOverflow/binaryBufferOverflowDocs.tex	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/extensions/checkers/binaryBufferOverflow/binaryBufferOverflowDocs.tex	2008-11-18 06:54:05 UTC (rev 129)
@@ -13,48 +13,45 @@
 \section{Binary Buffer Overflow}
 \label{BinaryBufferOverflow::overview}
 
-% write your introduction
+This analysis looks for buffer overflows in binaries.
 
 \subsection{Parameter Requirements}
 
-%Write the Parameter specification here.
-   No Parameter specifications yet!
+None.
 
 \subsection{Implementation}
 
-%Details of the implementation go here.
-   No implementation yet!
+The implementation is dependent on the availability of symbols.
+Functions must have names. The algorithm looks then for the malloc function
+and determines the memory allocation made.
 
+Using the def-use algorithm, uses of the allocated variable are looked for
+and any access beyond the allocation size are flagged as a buffer overflow.
+
+This analysis operates on a graph, not an AST.
+
 \subsection{Non-Compliant Code Example}
 
-% write your non-compliant code subsection
+This is an example of a code that will trigger a buffer overflow.
 
 \begin{verbatim}
 
-% write your non-compliant code example
+#include <stdio.h>
+#include <stdlib.h>
 
-\end{verbatim}
+int main(int argc, char* argv) {
+  int* arr = malloc( sizeof(int)*10);
 
-\subsection{Compliant Solution}
+  int i=0;
+  for (i=0; i<10;++i) {
+    arr[i]=5;
+  }
+  int x = arr[12];
+}
 
-% write your compliant code subsection
-
-\begin{verbatim}
-
-% write your compliant code example
-
 \end{verbatim}
 
-\subsection{Mitigation Strategies}
-\subsubsection{Static Analysis} 
 
-Compliance with this rule can be checked using structural static analysis checkers using the following algorithm:
 
-\begin{enumerate}
-\item Write your checker algorithm
-\end{enumerate}
-
-\subsection{References}
-
 % Write some references
 % ex. \htmladdnormallink{ISO/IEC 9899-1999:TC2}{https://www.securecoding.cert.org/confluence/display/seccode/AA.+C+References} Forward, Section 6.9.1, Function definitions''

Modified: branches/testonly/projects/compass/extensions/checkers/binaryInterruptAnalysis/binaryInterruptAnalysisDocs.tex
===================================================================
--- branches/testonly/projects/compass/extensions/checkers/binaryInterruptAnalysis/binaryInterruptAnalysisDocs.tex	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/extensions/checkers/binaryInterruptAnalysis/binaryInterruptAnalysisDocs.tex	2008-11-18 06:54:05 UTC (rev 129)
@@ -13,48 +13,22 @@
 \section{Binary Interrupt Analysis}
 \label{BinaryInterruptAnalysis::overview}
 
-% write your introduction
+This analysis looks for intx80 instruction calls. If such a call is detected,
+a dataflow analysis traces back the eax register to determine what Linux system call will being executed.
 
+E.g. if eax == 1 , its a sys\_exit, eax == 3, its a sys\_read or eax == 4 is a sys\_write.
+
+
 \subsection{Parameter Requirements}
 
-%Write the Parameter specification here.
-   No Parameter specifications yet!
+None.
 
 \subsection{Implementation}
 
-%Details of the implementation go here.
-   No implementation yet!
+This analysis operates on a graph, not an AST.
 
-\subsection{Non-Compliant Code Example}
+See binaryInterruptAnalysis.C
 
-% write your non-compliant code subsection
 
-\begin{verbatim}
-
-% write your non-compliant code example
-
-\end{verbatim}
-
-\subsection{Compliant Solution}
-
-% write your compliant code subsection
-
-\begin{verbatim}
-
-% write your compliant code example
-
-\end{verbatim}
-
-\subsection{Mitigation Strategies}
-\subsubsection{Static Analysis} 
-
-Compliance with this rule can be checked using structural static analysis checkers using the following algorithm:
-
-\begin{enumerate}
-\item Write your checker algorithm
-\end{enumerate}
-
-\subsection{References}
-
 % Write some references
 % ex. \htmladdnormallink{ISO/IEC 9899-1999:TC2}{https://www.securecoding.cert.org/confluence/display/seccode/AA.+C+References} Forward, Section 6.9.1, Function definitions''

Modified: branches/testonly/projects/compass/extensions/checkers/nameConsistency/checkNameImpl.C
===================================================================
--- branches/testonly/projects/compass/extensions/checkers/nameConsistency/checkNameImpl.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/extensions/checkers/nameConsistency/checkNameImpl.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -890,7 +890,7 @@
    {
 
      ROSE_ASSERT(currentInfo != NULL);
-#ifdef USE_ROSE_BOOST_WAVE_SUPPORT 
+//#ifdef USE_ROSE_BOOST_WAVE_SUPPORT 
     	  PreprocessingInfo::r_macro_def* macro_def = currentInfo->get_macro_def();
 
 	  std::string macroName = macro_def->macro_name.get_value().c_str();
@@ -912,7 +912,7 @@
 
 	       }
 	  }
-#endif
+//#endif
    }
 
 

Copied: branches/testonly/projects/compass/extensions/checkers/pointerComparison (from rev 128, trunk/projects/compass/extensions/checkers/pointerComparison)

Deleted: branches/testonly/projects/compass/extensions/checkers/pointerComparison/compass_parameters
===================================================================
--- trunk/projects/compass/extensions/checkers/pointerComparison/compass_parameters	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/extensions/checkers/pointerComparison/compass_parameters	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,4 +0,0 @@
-# This is a comment
-#
-# This is commented out but shows the way parameters are specified.
-# LineLengthChecker.maximumLineLength=80

Copied: branches/testonly/projects/compass/extensions/checkers/pointerComparison/compass_parameters (from rev 128, trunk/projects/compass/extensions/checkers/pointerComparison/compass_parameters)
===================================================================
--- branches/testonly/projects/compass/extensions/checkers/pointerComparison/compass_parameters	                        (rev 0)
+++ branches/testonly/projects/compass/extensions/checkers/pointerComparison/compass_parameters	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,4 @@
+# This is a comment
+#
+# This is commented out but shows the way parameters are specified.
+# LineLengthChecker.maximumLineLength=80

Deleted: branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.C
===================================================================
--- trunk/projects/compass/extensions/checkers/pointerComparison/pointerComparison.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,110 +0,0 @@
-// -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*-
-// vim: expandtab:shiftwidth=2:tabstop=2
-
-// Pointer Comparison Analysis
-// Author: Chunhua Liao
-// Date: 30-October-2008
-
-#include "compass.h"
-
-extern const Compass::Checker* const pointerComparisonChecker;
-
-namespace CompassAnalyses
-   { 
-     namespace PointerComparison
-        { 
-        /*! \brief Pointer Comparison: Add your description here 
-         */
-
-       // Specification of Checker Output Implementation
-          class CheckerOutput: public Compass::OutputViolationBase
-             { 
-               public:
-                    CheckerOutput(SgNode* node);
-             };
-
-       // Specification of Checker Traversal Implementation
-
-          class Traversal
-             : public Compass::AstSimpleProcessingWithRunFunction 
-             {
-                    Compass::OutputObject* output;
-            // Checker specific parameters should be allocated here.
-
-               public:
-                    Traversal(Compass::Parameters inputParameters, Compass::OutputObject* output);
-
-                 // Change the implementation of this function if you are using inherited attributes.
-                    void *initialInheritedAttribute() const { return NULL; }
-
-                 // The implementation of the run function has to match the traversal being called.
-                 // If you use inherited attributes, use the following definition:
-                 // void run(SgNode* n){ this->traverse(n, initialInheritedAttribute()); }
-                    void run(SgNode* n){ this->traverse(n, preorder); }
-
-                 // Change this function if you are using a different type of traversal, e.g.
-                 // void *evaluateInheritedAttribute(SgNode *, void *);
-                 // for AstTopDownProcessing.
-                    void visit(SgNode* n);
-             };
-        }
-   }
-
-CompassAnalyses::PointerComparison::
-CheckerOutput::CheckerOutput ( SgNode* node )
-   : OutputViolationBase(node,::pointerComparisonChecker->checkerName,::pointerComparisonChecker->shortDescription)
-   {}
-
-CompassAnalyses::PointerComparison::Traversal::
-Traversal(Compass::Parameters inputParameters, Compass::OutputObject* output)
-   : output(output)
-   {
-  // Initalize checker specific parameters here, for example: 
-  // YourParameter = Compass::parseInteger(inputParameters["PointerComparison.YourParameter"]);
-
-
-   }
-
-void
-CompassAnalyses::PointerComparison::Traversal::
-visit(SgNode* node)
-   { 
-  // Implement your traversal here.  
-    SgBinaryOp* bin_op = isSgBinaryOp(node); 
-     if (bin_op)
-     {
-       if (isSgGreaterThanOp(node)||
-          isSgGreaterOrEqualOp(node)||
-          isSgLessThanOp(node)||
-          isSgLessOrEqualOp(node))
-        {
-          SgType* lhs_type = bin_op->get_lhs_operand()->get_type(); 
-          SgType* rhs_type = bin_op->get_rhs_operand()->get_type(); 
-          if (isSgPointerType(lhs_type)||isSgPointerType(rhs_type))
-            output->addOutput(new CheckerOutput(bin_op));
-        } 
-      }// end if bin_op
-   } //End of the visit function.
-
-// Checker main run function and metadata
-
-static void run(Compass::Parameters params, Compass::OutputObject* output) {
-  CompassAnalyses::PointerComparison::Traversal(params, output).run(Compass::projectPrerequisite.getProject());
-}
-
-// Remove this function if your checker is not an AST traversal
-static Compass::AstSimpleProcessingWithRunFunction* createTraversal(Compass::Parameters params, Compass::OutputObject* output) {
-  return new CompassAnalyses::PointerComparison::Traversal(params, output);
-}
-
-extern const Compass::Checker* const pointerComparisonChecker =
-  new Compass::CheckerUsingAstSimpleProcessing(
-        "PointerComparison",
-     // Descriptions should not include the newline character "\n".
-        "Warning: Error-prone pointer comparison using <,<=,>,or >=",
-        "Test if relational operations such as <,<=,>,>= are used to compare data of pointer types. Pointer comparisons depend on memory locations of data, which are not consistent across different executions or platforms and can cause bugs which are very difficult to find.",
-        Compass::C | Compass::Cpp,
-        Compass::PrerequisiteList(1, &Compass::projectPrerequisite),
-        run,
-        createTraversal);
-   

Copied: branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.C (from rev 128, trunk/projects/compass/extensions/checkers/pointerComparison/pointerComparison.C)
===================================================================
--- branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.C	                        (rev 0)
+++ branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,110 @@
+// -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*-
+// vim: expandtab:shiftwidth=2:tabstop=2
+
+// Pointer Comparison Analysis
+// Author: Chunhua Liao
+// Date: 30-October-2008
+
+#include "compass.h"
+
+extern const Compass::Checker* const pointerComparisonChecker;
+
+namespace CompassAnalyses
+   { 
+     namespace PointerComparison
+        { 
+        /*! \brief Pointer Comparison: Add your description here 
+         */
+
+       // Specification of Checker Output Implementation
+          class CheckerOutput: public Compass::OutputViolationBase
+             { 
+               public:
+                    CheckerOutput(SgNode* node);
+             };
+
+       // Specification of Checker Traversal Implementation
+
+          class Traversal
+             : public Compass::AstSimpleProcessingWithRunFunction 
+             {
+                    Compass::OutputObject* output;
+            // Checker specific parameters should be allocated here.
+
+               public:
+                    Traversal(Compass::Parameters inputParameters, Compass::OutputObject* output);
+
+                 // Change the implementation of this function if you are using inherited attributes.
+                    void *initialInheritedAttribute() const { return NULL; }
+
+                 // The implementation of the run function has to match the traversal being called.
+                 // If you use inherited attributes, use the following definition:
+                 // void run(SgNode* n){ this->traverse(n, initialInheritedAttribute()); }
+                    void run(SgNode* n){ this->traverse(n, preorder); }
+
+                 // Change this function if you are using a different type of traversal, e.g.
+                 // void *evaluateInheritedAttribute(SgNode *, void *);
+                 // for AstTopDownProcessing.
+                    void visit(SgNode* n);
+             };
+        }
+   }
+
+CompassAnalyses::PointerComparison::
+CheckerOutput::CheckerOutput ( SgNode* node )
+   : OutputViolationBase(node,::pointerComparisonChecker->checkerName,::pointerComparisonChecker->shortDescription)
+   {}
+
+CompassAnalyses::PointerComparison::Traversal::
+Traversal(Compass::Parameters inputParameters, Compass::OutputObject* output)
+   : output(output)
+   {
+  // Initalize checker specific parameters here, for example: 
+  // YourParameter = Compass::parseInteger(inputParameters["PointerComparison.YourParameter"]);
+
+
+   }
+
+void
+CompassAnalyses::PointerComparison::Traversal::
+visit(SgNode* node)
+   { 
+  // Implement your traversal here.  
+    SgBinaryOp* bin_op = isSgBinaryOp(node); 
+     if (bin_op)
+     {
+       if (isSgGreaterThanOp(node)||
+          isSgGreaterOrEqualOp(node)||
+          isSgLessThanOp(node)||
+          isSgLessOrEqualOp(node))
+        {
+          SgType* lhs_type = bin_op->get_lhs_operand()->get_type(); 
+          SgType* rhs_type = bin_op->get_rhs_operand()->get_type(); 
+          if (isSgPointerType(lhs_type)||isSgPointerType(rhs_type))
+            output->addOutput(new CheckerOutput(bin_op));
+        } 
+      }// end if bin_op
+   } //End of the visit function.
+
+// Checker main run function and metadata
+
+static void run(Compass::Parameters params, Compass::OutputObject* output) {
+  CompassAnalyses::PointerComparison::Traversal(params, output).run(Compass::projectPrerequisite.getProject());
+}
+
+// Remove this function if your checker is not an AST traversal
+static Compass::AstSimpleProcessingWithRunFunction* createTraversal(Compass::Parameters params, Compass::OutputObject* output) {
+  return new CompassAnalyses::PointerComparison::Traversal(params, output);
+}
+
+extern const Compass::Checker* const pointerComparisonChecker =
+  new Compass::CheckerUsingAstSimpleProcessing(
+        "PointerComparison",
+     // Descriptions should not include the newline character "\n".
+        "Warning: Error-prone pointer comparison using <,<=,>,or >=",
+        "Test if relational operations such as <,<=,>,>= are used to compare data of pointer types. Pointer comparisons depend on memory locations of data, which are not consistent across different executions or platforms and can cause bugs which are very difficult to find.",
+        Compass::C | Compass::Cpp,
+        Compass::PrerequisiteList(1, &Compass::projectPrerequisite),
+        run,
+        createTraversal);
+   

Deleted: branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.compass.external.makefile
===================================================================
--- trunk/projects/compass/extensions/checkers/pointerComparison/pointerComparison.compass.external.makefile	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.compass.external.makefile	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,34 +0,0 @@
-# Set Variables ROSE_INSTALL to your ROSE_INSTALL installation and
-# COMPASS_SUPPORT to your compassSupport directory like this:
-#ROSE_INSTALL=ROSE-INSTALL-DIRECTORY
-#COMPASS_PROJECT=COMPASS-PROJECT-DIRECTORY
-#COMPASS_SUPPORT=${COMPASS_PROJECT}/src/compassSupport
-
-CHECKER_NAME = pointerComparisonTest
-
-LINKER_FLAGS = -L$(ROSE_INSTALL)/lib -Wl,-rpath $(ROSE_INSTALL)/lib -lrose $(RT_LIBS) -L`pwd` -Wl,-rpath `pwd` -lcompass
-
-all: prerequisites.h instantiate_prerequisites.h pointerComparisonTest
-
-prerequisites.h: $(COMPASS_PROJECT)/extensions/prerequisites
-	find $(COMPASS_PROJECT)/extensions/prerequisites -name "*.h" | awk -F/ '{print "#include \"" $$NF "\""}' > $@
-
-instantiate_prerequisites.h: $(COMPASS_PROJECT)/extensions/prerequisites
-	cat $(COMPASS_PROJECT)/extensions/prerequisites/*.h | grep "^extern" | sed -e 's at extern[\t\ ]*@Compass::@g' | awk '{print $$1 " Compass::" $$2}' > $@
-
-
-libcompass.so: $(COMPASS_PROJECT)/src/compassSupport/compass.h $(COMPASS_PROJECT)/src/compassSupport/compass.C prerequisites.h instantiate_prerequisites.h
-	g++ -fPIC -Wall -shared -o $@ $(COMPASS_PROJECT)/src/compassSupport/compass.C -I$(ROSE_INSTALL)/include -I$(COMPASS_PROJECT)/src/compassSupport -I$(COMPASS_PROJECT)/extensions/prerequisites -I.
-
-# GMY: The order of source files during compilation is important due to the use
-# of extern. The checker source code must follow the main source or else the
-# executable is likely to seg. fault.
-pointerComparisonTest: pointerComparison.C pointerComparisonMain.C libcompass.so $(COMPASS_PROJECT)/src/compassSupport/compassTestMain.C
-	g++ -fPIC -Wall -o $@ pointerComparisonMain.C pointerComparison.C -I$(COMPASS_PROJECT)/src/compassSupport -I$(ROSE_INSTALL)/include -I$(COMPASS_PROJECT)/extensions/prerequisites -I. $(LINKER_FLAGS)
-
-test: pointerComparisonTest pointerComparisonTest1.C
-	./pointerComparisonTest pointerComparisonTest1.C
-
-clean:
-	rm -f libcompass.so "pointerComparisonTest"
-

Copied: branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.compass.external.makefile (from rev 128, trunk/projects/compass/extensions/checkers/pointerComparison/pointerComparison.compass.external.makefile)
===================================================================
--- branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.compass.external.makefile	                        (rev 0)
+++ branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.compass.external.makefile	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,34 @@
+# Set Variables ROSE_INSTALL to your ROSE_INSTALL installation and
+# COMPASS_SUPPORT to your compassSupport directory like this:
+#ROSE_INSTALL=ROSE-INSTALL-DIRECTORY
+#COMPASS_PROJECT=COMPASS-PROJECT-DIRECTORY
+#COMPASS_SUPPORT=${COMPASS_PROJECT}/src/compassSupport
+
+CHECKER_NAME = pointerComparisonTest
+
+LINKER_FLAGS = -L$(ROSE_INSTALL)/lib -Wl,-rpath $(ROSE_INSTALL)/lib -lrose $(RT_LIBS) -L`pwd` -Wl,-rpath `pwd` -lcompass
+
+all: prerequisites.h instantiate_prerequisites.h pointerComparisonTest
+
+prerequisites.h: $(COMPASS_PROJECT)/extensions/prerequisites
+	find $(COMPASS_PROJECT)/extensions/prerequisites -name "*.h" | awk -F/ '{print "#include \"" $$NF "\""}' > $@
+
+instantiate_prerequisites.h: $(COMPASS_PROJECT)/extensions/prerequisites
+	cat $(COMPASS_PROJECT)/extensions/prerequisites/*.h | grep "^extern" | sed -e 's at extern[\t\ ]*@Compass::@g' | awk '{print $$1 " Compass::" $$2}' > $@
+
+
+libcompass.so: $(COMPASS_PROJECT)/src/compassSupport/compass.h $(COMPASS_PROJECT)/src/compassSupport/compass.C prerequisites.h instantiate_prerequisites.h
+	g++ -fPIC -Wall -shared -o $@ $(COMPASS_PROJECT)/src/compassSupport/compass.C -I$(ROSE_INSTALL)/include -I$(COMPASS_PROJECT)/src/compassSupport -I$(COMPASS_PROJECT)/extensions/prerequisites -I.
+
+# GMY: The order of source files during compilation is important due to the use
+# of extern. The checker source code must follow the main source or else the
+# executable is likely to seg. fault.
+pointerComparisonTest: pointerComparison.C pointerComparisonMain.C libcompass.so $(COMPASS_PROJECT)/src/compassSupport/compassTestMain.C
+	g++ -fPIC -Wall -o $@ pointerComparisonMain.C pointerComparison.C -I$(COMPASS_PROJECT)/src/compassSupport -I$(ROSE_INSTALL)/include -I$(COMPASS_PROJECT)/extensions/prerequisites -I. $(LINKER_FLAGS)
+
+test: pointerComparisonTest pointerComparisonTest1.C
+	./pointerComparisonTest pointerComparisonTest1.C
+
+clean:
+	rm -f libcompass.so "pointerComparisonTest"
+

Deleted: branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.inc
===================================================================
--- trunk/projects/compass/extensions/checkers/pointerComparison/pointerComparison.inc	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.inc	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,8 +0,0 @@
-# This is an automatically generated file
-# This example shows how to automake checkers that use boost
-# if ROSE_USE_BOOST_WAVE
-#
-#  LDADD = $(LIBS_WITH_RPATH) $(ROSE_LIBS) compassSupport/libCompass.la
-#  $(compass_detector_libs) -lboost_regex- at BOOST_LIB_SUFFIX@ $(LDADD)
-#
-# endif

Copied: branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.inc (from rev 128, trunk/projects/compass/extensions/checkers/pointerComparison/pointerComparison.inc)
===================================================================
--- branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.inc	                        (rev 0)
+++ branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparison.inc	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,8 @@
+# This is an automatically generated file
+# This example shows how to automake checkers that use boost
+# if ROSE_USE_BOOST_WAVE
+#
+#  LDADD = $(LIBS_WITH_RPATH) $(ROSE_LIBS) compassSupport/libCompass.la
+#  $(compass_detector_libs) -lboost_regex- at BOOST_LIB_SUFFIX@ $(LDADD)
+#
+# endif

Deleted: branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonDocs.tex
===================================================================
--- trunk/projects/compass/extensions/checkers/pointerComparison/pointerComparisonDocs.tex	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonDocs.tex	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,56 +0,0 @@
-% 9.5.07
-% This is a sample documentation for Compass in the tex format.
-% We restrict the use of tex to the following subset of commands:
-%
-% \section, \subsection, \subsubsection, \paragraph
-% \begin{enumerate} (no-nesting), \begin{quote}, \item
-% {\tt ... }, {\bf ...}, {\it ... }
-% \htmladdnormallink{}{}
-% \begin{verbatim}...\end{verbatim} is reserved for code segments
-% ...''
-%
-
-\section{Pointer Comparison}
-\label{PointerComparison::overview}
-
-This checker tries to find comparison operations involving
-pointers. These comparison results are determined by the memory locations of
-the objects pointed to in the program's address space. Using $==$ is usually
-safe. But using $<$, $<=$,$>$, and $>=$ is error-prone given the
-uncertainty of memory locations of objects across executions and platforms. 
-
-\subsection{Parameter Requirements}
-
-%Write the Parameter specification here.
-There is not parameter requirement.
-
-\subsection{Implementation}
-
-%Details of the implementation go here.
-The checker finds relational operators such as $<$ , $<=$,$>$, and $>=$
-and sends out warnings if at least one of their operands is of pointer types.
-
-\subsection{Non-Compliant Code Example}
-
-% write your non-compliant code subsection
-Here is the original code piece which inspired this checker. 
-It assumes in the ROSE AST, a parent scope node resides in a memory location of smaller
-address compared to the address of its descendent scope node. 
-This assumption is wrong given the difference of memory management across
-platforms or even executions. A right solution is to walk the AST tree to
-find out their relationship.
-\begin{verbatim}
-
-SgScopeStatement * scope1, * scope2; 
-// ....
-if (scope1<scope2)
-  //
-else
-  //
-
-\end{verbatim}
-
-\subsection{References}
-No reference.
-% Write some references
-% ex. \htmladdnormallink{ISO/IEC 9899-1999:TC2}{https://www.securecoding.cert.org/confluence/display/seccode/AA.+C+References} Forward, Section 6.9.1, Function definitions''

Copied: branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonDocs.tex (from rev 128, trunk/projects/compass/extensions/checkers/pointerComparison/pointerComparisonDocs.tex)
===================================================================
--- branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonDocs.tex	                        (rev 0)
+++ branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonDocs.tex	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,56 @@
+% 9.5.07
+% This is a sample documentation for Compass in the tex format.
+% We restrict the use of tex to the following subset of commands:
+%
+% \section, \subsection, \subsubsection, \paragraph
+% \begin{enumerate} (no-nesting), \begin{quote}, \item
+% {\tt ... }, {\bf ...}, {\it ... }
+% \htmladdnormallink{}{}
+% \begin{verbatim}...\end{verbatim} is reserved for code segments
+% ...''
+%
+
+\section{Pointer Comparison}
+\label{PointerComparison::overview}
+
+This checker tries to find comparison operations involving
+pointers. These comparison results are determined by the memory locations of
+the objects pointed to in the program's address space. Using $==$ is usually
+safe. But using $<$, $<=$,$>$, and $>=$ is error-prone given the
+uncertainty of memory locations of objects across executions and platforms. 
+
+\subsection{Parameter Requirements}
+
+%Write the Parameter specification here.
+There is not parameter requirement.
+
+\subsection{Implementation}
+
+%Details of the implementation go here.
+The checker finds relational operators such as $<$ , $<=$,$>$, and $>=$
+and sends out warnings if at least one of their operands is of pointer types.
+
+\subsection{Non-Compliant Code Example}
+
+% write your non-compliant code subsection
+Here is the original code piece which inspired this checker. 
+It assumes in the ROSE AST, a parent scope node resides in a memory location of smaller
+address compared to the address of its descendent scope node. 
+This assumption is wrong given the difference of memory management across
+platforms or even executions. A right solution is to walk the AST tree to
+find out their relationship.
+\begin{verbatim}
+
+SgScopeStatement * scope1, * scope2; 
+// ....
+if (scope1<scope2)
+  //
+else
+  //
+
+\end{verbatim}
+
+\subsection{References}
+No reference.
+% Write some references
+% ex. \htmladdnormallink{ISO/IEC 9899-1999:TC2}{https://www.securecoding.cert.org/confluence/display/seccode/AA.+C+References} Forward, Section 6.9.1, Function definitions''

Deleted: branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonMain.C
===================================================================
--- trunk/projects/compass/extensions/checkers/pointerComparison/pointerComparisonMain.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonMain.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,10 +0,0 @@
-//
-// Do not modify this file
-//
-
-#include "compass.h"
-extern const Compass::Checker* const pointerComparisonChecker;
-extern const Compass::Checker* const myChecker = pointerComparisonChecker;
-
-#include "compass.C"
-#include "compassTestMain.C"

Copied: branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonMain.C (from rev 128, trunk/projects/compass/extensions/checkers/pointerComparison/pointerComparisonMain.C)
===================================================================
--- branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonMain.C	                        (rev 0)
+++ branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonMain.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,10 @@
+//
+// Do not modify this file
+//
+
+#include "compass.h"
+extern const Compass::Checker* const pointerComparisonChecker;
+extern const Compass::Checker* const myChecker = pointerComparisonChecker;
+
+#include "compass.C"
+#include "compassTestMain.C"

Deleted: branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonTest1.C
===================================================================
--- trunk/projects/compass/extensions/checkers/pointerComparison/pointerComparisonTest1.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonTest1.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,23 +0,0 @@
-//Test code using pointer comparison
-typedef struct gun{
-   char name [256];
-   int magzing_size;
-   float calibre;
-} gun_t; 
-
-int main()
-{
-  gun_t gun1,gun2;
-  gun_t *gun1_p, *gun2_p;
-
-  gun1_p = & gun1;
-  gun2_p = & gun2;
-
-  if (gun1_p<gun2_p)
-  {
-    return 0;
-  }
-  else
-    return 1;
-}
-

Copied: branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonTest1.C (from rev 128, trunk/projects/compass/extensions/checkers/pointerComparison/pointerComparisonTest1.C)
===================================================================
--- branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonTest1.C	                        (rev 0)
+++ branches/testonly/projects/compass/extensions/checkers/pointerComparison/pointerComparisonTest1.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,23 @@
+//Test code using pointer comparison
+typedef struct gun{
+   char name [256];
+   int magzing_size;
+   float calibre;
+} gun_t; 
+
+int main()
+{
+  gun_t gun1,gun2;
+  gun_t *gun1_p, *gun2_p;
+
+  gun1_p = & gun1;
+  gun2_p = & gun2;
+
+  if (gun1_p<gun2_p)
+  {
+    return 0;
+  }
+  else
+    return 1;
+}
+

Modified: branches/testonly/projects/compass/extensions/prerequisites/BinDataFlowPrerequisite.h
===================================================================
--- branches/testonly/projects/compass/extensions/prerequisites/BinDataFlowPrerequisite.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/extensions/prerequisites/BinDataFlowPrerequisite.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -30,9 +30,8 @@
       graph = new RoseBin_DotGraph(info);
       ROSE_ASSERT(graph);
 
-      const SgAsmInterpretationPtrList& interps = file->get_interpretations();
-      ROSE_ASSERT (interps.size() == 1);
-      dfanalysis = new RoseBin_DataFlowAnalysis(interps[0]->get_global_block(), forward, new RoseObj(), info);
+      SgAsmInterpretation* interp = SageInterface::getMainInterpretation(file);
+      dfanalysis = new RoseBin_DataFlowAnalysis(interp->get_global_block(), forward, new RoseObj(), info);
       dfanalysis->init(interprocedural, edges);
       dfanalysis->run(graph, dfgFileName, mergedEdges);
 

Modified: branches/testonly/projects/compass/src/compassSupport/compass.C
===================================================================
--- branches/testonly/projects/compass/src/compassSupport/compass.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/src/compassSupport/compass.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -3,6 +3,9 @@
 #endif
 
 #include "compass.h"
+
+//for exists
+#include "boost/filesystem/operations.hpp"
 #include <rose.h>
 #include <sstream>
 #include <fstream>
@@ -306,8 +309,19 @@
 
 std::ifstream* Compass::openFile(std::string filename)
 {
+
+ 
+  if( boost::filesystem::exists(filename) == false )  
+  {
+//    std::cerr << "Error: Please specify which checkers you want to run in " << filename << std::endl;
+    std::cerr << "Error: Filename " << filename << " does not exists. " << std::endl;
+    abort();
+
+  }
   std::ifstream* streamPtr = new std::ifstream(filename.c_str());
+
   ROSE_ASSERT(streamPtr != NULL);
+  ROSE_ASSERT(streamPtr->good());
 
   return streamPtr;
 
@@ -367,6 +381,10 @@
   if (getenv("COMPASS_PARAMETERS")) {
     filename = getenv("COMPASS_PARAMETERS");
   }
+  else 
+  {
+    std::cout<<"Warning: environment variable COMPASS_PARAMETERS is not set, trying to use compass_parameters of the current path"<<std::endl;
+  }
   return filename;
 }
 

Modified: branches/testonly/projects/compass/src/compass_scripts/compass_template_generator/compass.C
===================================================================
--- branches/testonly/projects/compass/src/compass_scripts/compass_template_generator/compass.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/src/compass_scripts/compass_template_generator/compass.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -3,6 +3,9 @@
 #endif
 
 #include "compass.h"
+
+//for exists
+#include "boost/filesystem/operations.hpp"
 #include <rose.h>
 #include <sstream>
 #include <fstream>
@@ -306,8 +309,19 @@
 
 std::ifstream* Compass::openFile(std::string filename)
 {
+
+ 
+  if( boost::filesystem::exists(filename) == false )  
+  {
+//    std::cerr << "Error: Please specify which checkers you want to run in " << filename << std::endl;
+    std::cerr << "Error: Filename " << filename << " does not exists. " << std::endl;
+    abort();
+
+  }
   std::ifstream* streamPtr = new std::ifstream(filename.c_str());
+
   ROSE_ASSERT(streamPtr != NULL);
+  ROSE_ASSERT(streamPtr->good());
 
   return streamPtr;
 
@@ -367,6 +381,10 @@
   if (getenv("COMPASS_PARAMETERS")) {
     filename = getenv("COMPASS_PARAMETERS");
   }
+  else 
+  {
+    std::cout<<"Warning: environment variable COMPASS_PARAMETERS is not set, trying to use compass_parameters of the current path"<<std::endl;
+  }
   return filename;
 }
 

Modified: branches/testonly/projects/compass/src/util/MPIAbstraction/alt-mpi-headers/gen-headers.py
===================================================================
--- branches/testonly/projects/compass/src/util/MPIAbstraction/alt-mpi-headers/gen-headers.py	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/src/util/MPIAbstraction/alt-mpi-headers/gen-headers.py	2008-11-18 06:54:05 UTC (rev 129)
@@ -260,7 +260,9 @@
     fp_out = open_file (filenames[fn_out], 'w')
 
     # Insert a warning message just to verify that we got the right header.
-    write_line (fp_out, '#warning "%s, derived from %s."' \
+    # JJW (11/13/2008): #warning messages are not useful -- use a comment
+    # instead
+    write_line (fp_out, '// "%s, derived from %s."' \
                 % (filenames[fn_out], filenames[fn_in]))
 
     rewrite_mpi_header (fp_in, fp_out, new_defs)

Modified: branches/testonly/projects/compass/tools/compass/CHECKER_LIST
===================================================================
--- branches/testonly/projects/compass/tools/compass/CHECKER_LIST	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/tools/compass/CHECKER_LIST	2008-11-18 06:54:05 UTC (rev 129)
@@ -83,6 +83,7 @@
 operatorOverloading
 otherArgument
 placeConstantOnTheLhs
+pointerComparison
 preferAlgorithms
 preferFseekToRewind
 preferSetvbufToSetbuf

Modified: branches/testonly/projects/compass/tools/compass/RULE_SELECTION.in
===================================================================
--- branches/testonly/projects/compass/tools/compass/RULE_SELECTION.in	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/tools/compass/RULE_SELECTION.in	2008-11-18 06:54:05 UTC (rev 129)
@@ -80,6 +80,7 @@
 +:OperatorOverloading
 +:OtherArgument
 +:PlaceConstantOnTheLhs
++:PointerComparison
 +:PreferAlgorithms
 +:PreferFseekToRewind
 +:PreferSetvbufToSetbuf

Modified: branches/testonly/projects/compass/tools/compass/buildCheckers.C
===================================================================
--- branches/testonly/projects/compass/tools/compass/buildCheckers.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/tools/compass/buildCheckers.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -144,6 +144,7 @@
 BUILD_ONE_CHECKER(operatorOverloading)
 BUILD_ONE_CHECKER(otherArgument)
 BUILD_ONE_CHECKER(placeConstantOnTheLhs)
+BUILD_ONE_CHECKER(pointerComparison)
 BUILD_ONE_CHECKER(preferAlgorithms)
 BUILD_ONE_CHECKER(preferFseekToRewind)
 BUILD_ONE_CHECKER(preferSetvbufToSetbuf)

Modified: branches/testonly/projects/compass/tools/compass/checkers.h
===================================================================
--- branches/testonly/projects/compass/tools/compass/checkers.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/tools/compass/checkers.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -79,6 +79,7 @@
 extern const Compass::Checker* const operatorOverloadingChecker;
 extern const Compass::Checker* const otherArgumentChecker;
 extern const Compass::Checker* const placeConstantOnTheLhsChecker;
+extern const Compass::Checker* const pointerComparisonChecker;
 extern const Compass::Checker* const preferAlgorithmsChecker;
 extern const Compass::Checker* const preferFseekToRewindChecker;
 extern const Compass::Checker* const preferSetvbufToSetbufChecker;

Modified: branches/testonly/projects/compass/tools/compass/doc/Makefile.am
===================================================================
--- branches/testonly/projects/compass/tools/compass/doc/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/tools/compass/doc/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -39,10 +39,11 @@
 	ToolGear_gui_compass_01.pdf \
 	ToolGear_gui_compass_01.png \
 	usingCompass.tex \
+	compass_categories.tex \
 	usingCompassVerifier.tex
 
 clean-local:
 	find . -type l -maxdepth 1 -exec rm {} \;
 	rm -f *.log *.out *.aux *.toc
 
-CLEANFILES = compassCheckerDocs.tex
+CLEANFILES = compassCheckerDocs.tex compass.pdf 

Modified: branches/testonly/projects/compass/tools/compass/doc/compass.tex.in
===================================================================
--- branches/testonly/projects/compass/tools/compass/doc/compass.tex.in	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/tools/compass/doc/compass.tex.in	2008-11-18 06:54:05 UTC (rev 129)
@@ -182,13 +182,15 @@
 
 \input{usingCompassVerifier}
 
+\newpage
 
+\input{compass_categories}
 
 
 % Put the list of detector documentation here
 \newpage
 
-\chapter{Compass Checkers}
+\chapter{List of Compass Checkers}
 
 \input{compassCheckerDocs}
 

Copied: branches/testonly/projects/compass/tools/compass/doc/compass_categories.tex (from rev 128, trunk/projects/compass/tools/compass/doc/compass_categories.tex)
===================================================================
--- branches/testonly/projects/compass/tools/compass/doc/compass_categories.tex	                        (rev 0)
+++ branches/testonly/projects/compass/tools/compass/doc/compass_categories.tex	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,162 @@
+\chapter{Categories of Compass Checkers}
+All available Compass checkers can be roughly categorized as follows:
+
+\section{Common Styles}
+\begin{itemize}
+\item forLoopConstructionControlStmt: for () loop must only include statements that control the loop or related to the loop control
+\item inductionVariableUpdate: Do not alter a control variable more than once in a loop
+\item uninitializedDefinition: Always initial variables at their initial declaration
+\item unaryMinus: Do not use unary minus on unsigned types
+\item noGoto: Do not use goto
+\item nonAssociativeRelationalOperators: Do not associate relational
+operators (e.g. $a==b==c$)
+\item magicNumber: Avoid using integer or floating point literals outside of initializer expressions.
+\item nameAllParameters: Every function parameters should has a name in a function declaration
+\item oneLinePerDeclaration: Do not declare more than one variable in a single declaration statement. 
+\item placeConstantOnTheLhs: Always put constant on the left side for comparison expressions
+\item functionDefinitionPrototype: Every function should have a function prototype
+\end{itemize}
+
+\section{C styles}
+\begin{itemize}
+\item allocateAndFreeMemoryInTheSameModuleAtTheSameLevelOfAbstraction: malloc()/ free() in a same piece of code to avoid mismatch
+\item discardAssignment: assignment operator should be used as a stand-alone expression statement.
+\item setPointersToNull: Always set pointers to NULL after they have been freed by free()
+\end{itemize}
+
+\section{C++ styles}
+\begin{itemize}
+\item assignmentOperatorCheckSelf: check self-assignment in assignment operator
+\item assignmentReturnConstThis:  operator= return type
+\item booleanIsHas: functions returning boolean should have names like isXXX or hasXXX
+\item constCast: should never cast the constness away
+\item constructorDestructorCallsVirtualFunction : Don't directly/indirectly call virtual functions from constructors or destructors: pure virtual function become undefined behaviors
+\item copyConstructorConstArg: copy constructors should use const reference as an argument
+\item cppCallsSetjmpLongjmp: should not use C style setjmp() and long jmp() in C++ code
+\item dataMemberAccess: Good classes should not have both public and non-public data members. 
+\item defaultConstructor: Each class should have a user defined default constructor
+\item doNotUseCstyleCasts: Do not use C-style casts in C++ code
+\item dynamicCast: Downcast should be done using a dynamic cast
+\item enumDeclarationNamespaceClassScope: enum types should be declared within a class or namespace. 
+\item explicitCopy: A class should have a user-defined copy constructor and a copy operator, unless annotated to use default ones
+\item forLoopCppIndexVariableDeclaration: C++ loop index variable should be declared in for (...)
+\item friendDeclarationModifier: Avoid using friend declarations
+\item internalDataSharing: Class member functions should not expose data member handles
+\item voidStar: Public methods should not use void* for arguments or return types. 
+\item noExceptions: Avoid using C++ exceptions
+\item nonmemberFunctionInterfaceNamespace: Keep classes and their non-member interfaces (friend functions) within the same namespace
+\item multiplePublicInheritance: Avoid multiple public inheritance
+\item noTemplateUsage: Do not use C++ templates
+\item protectVirtualMethods: Do not expose virtual methods as public interface
+\item singleParameterConstructorExplicitModifier: Single parameter constructor used as converting constructor should have the 'explicit' modifier
+\end{itemize}
+
+\section{Correctness}
+\begin{itemize}
+\item cycleDetection: control flow graph of code should not contain cycles
+\item defaultCase: Each switch statement should have a default case
+\item doNotCallPutenvWithAutoVar: Do not use an auto/local variable as the parameter of putenv()
+\item noExitInMpiCode: No exit() from within a parallel code portion (MPI)
+\item sizeOfPointer: Do not computing sizeof(pointer) when you want to get the size of object pointed to. 
+\item newDelete: Detect several common mistakes when using new, delete: deleting array using delete, not delete[]; deleting NULL pointers; deleting uninitialized pointers
+\item mallocReturnValueUsedInIfStmt: Always check the return value for malloc() and new
+\item nullDeref: Several checkers for NULL pointers: checking a pointer's validity before dereferencing it; Do not reference unitialized variables
+\item floatingPointExactComparison: Avoid exact comparisons between a variable to a floating point value
+\item floatForLoopCounter:  floating point variables should not be used as loop counters
+\end{itemize}
+
+\section{Security}
+\begin{itemize}
+\item allowedFunctions: security analysis, limit the use to a set of allowed functions
+\item forbiddenFunctions: Avoid using a set of dangerous functions
+\item avoidUsingTheSameHandlerForMultipleSignals: dedicated handler for each signal
+\item constStringLiterals: protect string literals using const qualification
+\item doNotDeleteThis: Do not delete 'this' pointer
+\item functionCallAllocatesMultipleResources: Avoid allocating multiple resources within a single statement(e.g. a function call)
+\item rightShiftMask: Always use a shift mask for $>>$ to avoid buffer overflow
+\end{itemize}
+
+\section{Portability}
+\begin{itemize}
+\item charStarForString: C strings must be used instead of STL strings
+\item fopenFormatParameter: Format parameter of fopen() should not contain non-portable value
+\item noAsmStmtsOps: warn the use of embedded assembly code
+\end{itemize}
+
+\section{Clarity}
+\begin{itemize}
+\item explicitTestForNonBooleanValue: Non-boolean values should be compared to explicit values of the same type. 
+\item localizedVariables: Variable declaration should be close to its first use.
+\item functionDocumentation: Every function should have documentation/comments
+\item variableNameEqualsDatabaseName: Member functions accessing local variables that get assigned. The result of the function call should have a name equal to the first argument
+\item ternaryOperator: Prefer explicit conditional statements to ternary operator a?x:y
+\end{itemize}
+
+\section{Complexity}
+\begin{itemize}
+\item computationalFunctions: check functions exceeding max allowed computation operations
+\item cyclomaticComplexity: a function should not exceed a complexity threshold
+\item deepNesting: functions should not exceed a threshold for scopes inside its body. (too complex)
+\item locPerFunction: A function should not contain code exceeding a line count threshold
+\end{itemize}
+
+\section{Consistency}
+\begin{itemize}
+\item lowerRangeLimit: Always use inclusive lower limits and exclusive upper limits
+\item upperRangeLimit: same as lower range limit: always using inclusive lower limits and exclusive upper limit
+\item otherArgument: Always name the parameter as 'other', 'that', or lower case of the class name, for copy constructors
+\end{itemize}
+
+\section{Better choices}
+\begin{itemize}
+\item stringTokenToIntegerConverter: Prefer strtol()/strtoll() to atoi()/atol()/atoll() for better error handling
+\item preferFseekToRewind: Prefer fseek() to rewind() since fseek() has return code
+\item preferSetvbufToSetbuf: Prefer setvbuf() to setbuf() for better error checking
+\item preferAlgorithms: Warning hand writing loops when equivalent STL algorithms exist
+\end{itemize}
+
+\section{Dangerous choices}
+\begin{itemize}
+\item commaOperator: avoid using this confusing language features (,)
+\item noSecondTermSideEffects: No side effects for second (and beyond)
+logical operator in expressions with combined \&\$ and ||. 
+\item noSideEffectInSizeof: Should not have side effects in sizeof(). 
+\item noVariadicFunctions: Do not use variadic functions: functions with varying parameter lists
+\item noVfork: Do not use vfork()
+\item operatorOverloading: Avoid operator overloading for \&\&, ||, or , . 
+\item pointerComparison: Avoid error-prone pointer comparison using
+$<$,$>$, $<=$,and $>=$
+\item noRand: Do not use the rand() function, 
+\item byteByByteStructureComparison: avoid byte-to-byte comparison between structures, they maybe padded.
+\item nonVirtualRedefinition: Do not redefine an inherited non-virtual functions in a class hierarchy.
+\item noOverloadAmpersand: Operator \& should not be overloaded
+\end{itemize}
+
+\section{Performance/Effectiveness}
+\begin{itemize}
+\item controlVariableTestAgainstFunction: Warning about loop control by comparing to a function call
+\item emptyInsteadOfSize: Using container.empty() instead of container.size()==0  
+\item pushBack: Warning the use of container.insert()/resize() which can be
+replaced by push\_back() or push\_front()
+\item nonStandardTypeRefArgs: Always pass objects by references, C++
+\item nonStandardTypeRefReturns: Always return objects by references, C++ 
+\end{itemize}
+
+\section{Misc or Undocumented}
+\begin{itemize}
+\item duffsDevice: Detect Duffs Device(a switch statement containing a loop that contains one of the switch's case or default labels.)
+\item explicitCharSign: ??
+\item fileReadOnlyAccess: Readonly access to fopen(), used internally for Compass Verifier
+\item time\_tDirectManipulation: Do not directly manipulate time\_t values. Use difftime()
+\item nameConsistency: 
+\item possiblyReplicatedVariables: 
+\item staticConstructorInitialization: 
+\item subExpressionEvaluationOrder: 
+\item typeTypedef: 
+\item binaryBufferOverflow
+\item binaryInterruptAnalysis
+\item binPrintAsmFunctions
+\item binPrintAsmInstruction
+\item asynchronousSignalHandler
+\item bufferOverflowFunctions
+\end{itemize}

Modified: branches/testonly/projects/compass/tools/compass/doc/usingCompass.tex
===================================================================
--- branches/testonly/projects/compass/tools/compass/doc/usingCompass.tex	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/compass/tools/compass/doc/usingCompass.tex	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,14 +1,50 @@
 \chapter{Using Compass}
+Compass is currently distributed as part of ROSE, and represents one
+of many tools that can be built using the ROSE open compiler infrastructure.
+The source code of Compass resides in the {\tt ROSE/projects/compass}.
+The compass project is currently divided into three subdirectories representing
+the compass infrastructure, extensions (checkers), and individual compass-like
+tools. As part of building ROSE Compass will be automatically built in the 
+compass directory. 
 
+\section{Installation}
+Please follow
+\htmladdnormallink{ROSE Installation
+Guide}{http://www.rosecompiler.org/ROSE_InstallationInstructions.pdf} to
+configure, make, and make install ROSE. The Compass executable file
+(compassMain) will be available from YOUR\_ROSE\_INSTALL\_PATH/bin. compassMain needs to know where to find its own configuration information from two
+files:
+\begin{itemize}
+\item compass\_parameters: configuration information for compass checkers.
+A default parameter file is generated in your ROSE build tree:
+buildrose/projects/compass/tools/compass/compass\_parameters. You can
+save a copy to your home directory for customization. 
+\item RULE\_SELECTION: This file lists which checkers to be used. A sample
+file is provided in the ROSE source tree:
+source/projects/compass/tools/compass/RULE\_SELECTION.in. You can save
+it as RULE\_SELECTION in your home directory and flip the $+$ or $-$ sign
+before each checker to turn on or off them when running compassMain. This
+file is specified as Compass.RuleSelection=/home/youraccount/RULE\_SELECTION
+inside of the compass\_parameters file.
+\end{itemize}
+
+After preparing compassMain's configuration files, you can set environment variables as follows (assuming using bash
+and you configured ROSE using --prefix=/home/youraccount/opt/roseLatest):
+
+\begin{verbatim}
+PATH=/home/youraccount/opt/roseLatest/bin:$PATH
+export PATH
+
+LD_LIBRARY_PATH=/home/youraccount/opt/roseLatest/lib:$LD_LIBRARY_PATH
+export LD_LIBRARY_PATH
+
+export COMPASS_PARAMETERS=/home/youraccount/compass_parameters
+\end{verbatim}
+
+
 \section{Running Compass}
 
-    Compass is currently distributed as part of ROSE, and represents one
-of many tools that can be built using the ROSE open compiler infrastructure.
-Compass resides in the {\tt ROSE/projects/compass}.
-The compass project is currently divided into three subdirectories representing
-the compass instrastructure, extensions (checkers), and individual compass-like
-tools. As part of building ROSE Compass will be automatically built in the 
-compass directory.  Running compass is a matter if typing {\tt compassMain} 
+Once properly installed and configured, running compass is a matter if typing {\tt compassMain} 
 and handing in a number of options. The {\tt compassMain} program acts just 
 like a compiler so it is appropriate to hand it the same options required to 
 compile your source file (e.g {\tt -I} directory paths and a source file.  
@@ -18,6 +54,19 @@
 include/exclude options for path and file names as these will permit the 
 output from header files to be tailored.
 
+For example, to test a checker which warns about error-prone pointer
+comparison. You can modify RULE\_SELECTION to only turn on
+PointerComparison. A test input code (pointerComparisonTest1.C) is provided
+in sourcetree/projects/compass/extensions/checkers/pointerComparison. 
+\begin{verbatim}
+# command line to run compassMain on a source file
+compassMain pointerComparisonTest1.C
+# output of the command
+ Running Prerequisite SgProject
+Running checker PointerComparison
+PointerComparison: pointerComparisonTest1.C:16.7-19: 
+Warning: Error-prone pointer comparison using <,<=,>,or >=
+\end{verbatim}
 
 \section{Output from Compass}
 
@@ -273,7 +322,7 @@
 \begin{verbatim}
 " Vim compiler file
 " Compiler:     ROSE Compass 0.9.2a
-" Maintainer:   Chunhua Liao <liao6 at llnl.gov>
+" Maintainer:   Chunhua Liao <youraccount at llnl.gov>
 " Last Change:  2008 Apr. 3
 "
 if exists("current_compiler")
@@ -316,124 +365,7 @@
 \label{Compass_VIM7_Screenshot}
 \end{figure}
 
-%-------------------------------
-\clearpage
-\section{How To Write A New Checker}
 
-\subsection{Creating A Skeleton}
-
-Compass has scripts for creating a skeleton for a new Compass
-checker. This skeleton can be easily adapted to write all checkers.
-
-Follow these steps to generate a checker skeleton:
-\begin{enumerate}
-   \item Enter a directory where you want the directory of your checker to be created
-   \item Execute {\tt ROSE\_SRC\_DIR/projects/compass/src/compass\_scripts/gen\_checker.sh $<$name of your checker$>$}
-\end{enumerate}
-
-The results of executing gen\_checker.sh script is that a new directory name 
-``multipleCasesOnSameLine''
-(name of your checker in camel case) is created with the following files:
-
-\begin{verbatim}
-compass.C           multipleCasesOnSameLine.C
-compass.h           multipleCasesOnSameLineDocs.tex
-compass_parameters  multipleCasesOnSameLine.h
-compassTestMain.C   multipleCasesOnSameLine.inc
-Makefile            multipleCasesOnSameLineMain.C
-Makefile.am         multipleCasesOnSameLineTest1.C
-\end{verbatim}
-
-Some of these files (compass.[Ch], compass\_parameters, and compassTestMain.C)
-are copied from the compass\_template\_generator directory; while others are
-generated (multiple*, Makefile, Makefile.am)
-
-It is suggested that you keep the following in mind when using gen\_checker.sh:
-\begin{itemize}
-\item
-   It is advised that you do not invoke the script gen\_checker with words
-   like checker, detector, tester, etc. Adding these verbs at the command
-   line means that these words are added as suffixes into the
-   directory-name. Which will make it redundant, as the compass project is
-   about writing style-checkers!
-\item
-   Some of the files have read-only permissions and are intended only for
-   such use. Please do not change the permissions of these files.
-%\item
-%Advanced: The file `multipleCasesOnSameLine.inc' is used to pass in custom LDADD lines
-%to the Make environment on a per checker basis. The LDADD line specified in
-%this file will be added verbatim to the compass makefile.
-
-\end{itemize}
-
-\subsection{Integrating New Checkers Into Compass Tool}
-\label{howToIntegrateNewCheckers}
-
-The process for integrating a new checker into Compass has been automated. 
-These directions are meant for checkers generated using gen\_checker.sh. 
-The process is similar for all compass-like tools that are built using the 
-common instrastructure.
-
-The steps to integrate a new checker is
-\begin{enumerate}
-   \item Add $<$name of your checker$>$ to CHECKER\_LIST
-   \item Enter ROSE\_BUILD\_DIR/projects/compass/tools/compass
-   \item Execute 'make regenerate'
-   \item After running 'make regenerate' in the build tree then you may run make as usual.
-   \item %Before executing compassMain or any Make rule that uses compassMain, 
-	Examine the RULE\_SELECTION file and confirm it
-	reflects your most recent additional checker(s) choice of execution at
-	run-time; the default setting is ``on''. Please refer to section 
-	~\ref{ruleselection}.
-\end{enumerate}
-
-The file `CHECKER\_LIST' can use the `\#' comment delimiter at the beginning of
-any checker name to remove that checker from compilation. The hash mark may
-only appear at the beginning of the line. The compass\_submission\_setup.sh
-script must be run again with the ``regenerate'' option if any checkers are
-commented out. 
-{\bf Note that no space is permitted between the `\#' and the name
-of the checker.}
-
-Additionally, a blank checker may be automatically integrated into the current
-compass tool as a method to test for build system errors. To execute this test
-,type:
-%
-\begin{verbatim}
-make testNewChecker
-\end{verbatim}
-%
-from any compass tool directory. This test will create a blank checker from
-the template attempt to install the checker then uninstall it thus leaving the
-tool in its previous state.
-
-%Many automatically generated files required for the build of Compass are 
-%generated in the build tree. Rules for the generation of these files are found
-%in the automake Makefile.am file in the Compass source tree directory 
-%projects/compass. These file include:
-%
-%\begin{itemize}
-%\item {\bf CHECKER\_LIST\_WITHOUT\_COMMENTS}: a version of CHECKER\_LIST
-%	that expands in two columns those checkers built as part of Compass
-%	in camel case starting with a lower-case letter and an upper-case
-%	letter respectively.
-%
-%\item {\bf checkers.h}: An automatically generated file needed by compassMain.C that 
-%	contains a list of \#include directives for each checker header .h file.
-%
-%\item {\bf buildCheckers.C}: An automatically generated source file needed by 
-%	compassMain.C to build the Compass checker traversals.
-%
-%\item {\bf compass\_parameters}: The concatenation of individual checker parameter files to be used with compassMain.
-%
-%\item {\bf testNewChecker}: creates a blank checker from the template and
-%	attempts to automatically install it into the current compass tool then
-%	uninstall it again. This label is used to test the build system.
-%
-%\end{itemize}
-
-
-
 \section{Including/Excluding Checkers in the Compass Build Process}
 \label{CompassBuildProcess}
 
@@ -446,21 +378,20 @@
 list of checkers was secure, but for a static list of trusted checkers this is 
 possible.
 
-In order to integrate a checker into Compass the user must:
-\begin{itemize}
-   \item Add the name of the checkers directory in the CHECKER\_LIST in the compass
-      source directory
-   \item Run {\tt make regenerate} in the Compass build directory
-\end{itemize} 
-If a user or developer intends to integrate a new checker into the Compass 
-source tree refer to section \ref{howToIntegrateNewCheckers}.
+The file ROSE\_SOURCE\_DIR/projects/compass/tools/compass/CHECKER\_LIST is used to control which checkers are selected to
+be compiled into compassMain. It can use the `\#' comment delimiter at the beginning of
+any checker name to remove that checker from compilation. The hash mark may
+only appear at the beginning of the line. The compass\_submission\_setup.sh
+script must be run again with the ``regenerate'' option if any checkers are
+commented out. 
+{\bf Note that no space is permitted between the `\#' and the name
+of the checker.}
 
 Usually the CHECKER\_LIST is only modified when a user or developer wants to 
 add a new checker or select a subset of trusted checkers.  Checkers can be
 commented out using a {\tt \#}, no space is allowed between the {\tt \#} 
 and the checker name.
 
-
 \section{Including/Excluding Checkers During Compass Execution}
 \label{ruleselection}
 
@@ -478,13 +409,13 @@
 specific checkers by editing a single file (RULE\_SELECTION).  The name of this
 file is specified in the {\tt compass\_parameters} file, this name may be changed.
 The directories searched are: current directory, user home directory, and Compass
-source tree (respectively).
+source tree (respectively). \fixme{The current implementation may not
+support all of the mentioned search paths.}
 
 \begin{verbatim}
-   Compass.RuleSelection=RULE_SELECTION
+   Compass.RuleSelection=/path/to/your/RULE_SELECTION
 \end{verbatim}
 
-
 In order to select a checker to run the user must:
 \begin{itemize}
    \item Add a line '-:$<$name of checker$>$' in a file called RULE\_SELECTION. 
@@ -542,8 +473,128 @@
 \end{itemize}
 To run these tests type {\tt make check} at any level on the Compass directory
 hierarchy of the build tree.
+%-------------------------------
+\clearpage
+\section{How To Write A New Checker}
 
+\subsection{Creating A Skeleton}
 
+Compass has scripts for creating a skeleton for a new Compass
+checker. This skeleton can be easily adapted to write all checkers.
+
+Follow these steps to generate a checker skeleton:
+\begin{enumerate}
+   \item Enter a directory where you want the directory of your checker to
+   be created: For example,
+   rosesourcetree/projects/compass/extensions/checkers.
+   \item Execute {\tt
+   ROSE\_SRC\_DIR/projects/compass/src/compass\_scripts/gen\_checker.sh
+   $<$name of your checker$>$} (the name of your checker can have space and
+   the script will automatically concatenate them to camel case, e.g: 
+   "multiple case on same line")
+\end{enumerate}
+
+The results of executing gen\_checker.sh script is that a new directory name 
+``multipleCasesOnSameLine''
+(name of your checker in camel case) is created with the following files:
+\begin{itemize}
+\item compass\_parameters : internal parameters for this checker 
+\item multipleCasesOnSameLine.C : main source file 
+\item multipleCasesOnSameLine.compass.external.makefile : makefile if this
+checker is to be built outside of the ROSE source tree.
+\item multipleCasesOnSameLineDocs.tex : documentation 
+\item multipleCasesOnSameLine.inc : Makefile include file
+\item multipleCasesOnSameLine.h : header
+\item multipleCasesOnSameLineMain.C : main driver
+\item multipleCasesOnSameLineTest1.C : test input code
+\end{itemize}
+
+Some of these files (compass\_parameters)
+are copied from the compass\_template\_generator directory; while others are
+generated (multiple*, *.makefile)
+
+It is suggested that you keep the following in mind when using gen\_checker.sh:
+\begin{itemize}
+\item
+   It is advised that you do not invoke the script gen\_checker with words
+   like checker, detector, tester, etc. Adding these verbs at the command
+   line means that these words are added as suffixes into the
+   directory-name. Which will make it redundant, as the compass project is
+   about writing style-checkers!
+\item
+   Some of the files\fixme{What are the readonly files exactly?} have read-only permissions and are intended only for
+   such use. Please do not change the permissions of these files.
+%\item
+%Advanced: The file `multipleCasesOnSameLine.inc' is used to pass in custom LDADD lines
+%to the Make environment on a per checker basis. The LDADD line specified in
+%this file will be added verbatim to the compass makefile.
+
+\end{itemize}
+
+\subsection{Integrating New Checkers Into Compass Tool}
+\label{howToIntegrateNewCheckers}
+
+The process for integrating a new checker into Compass has been automated. 
+These directions are meant for checkers generated using gen\_checker.sh. 
+The process is similar for all compass-like tools that are built using the 
+common infrastructure.
+
+The steps to integrate a new checker is (note that both of the source tree and
+build tree of ROSE are involved):
+\begin{enumerate}
+   \item Add $<$camel case of your checker name $>$ to
+   ROSE\_SOURCE\_DIR/projects/compass/tools/compass/CHECKER\_LIST
+   \item Enter ROSE\_BUILD\_DIR/projects/compass/tools/compass
+   \item Execute 'make regenerate'
+   \item After running 'make regenerate' in the build tree then you may run make as usual.
+   \item Examine the ROSE\_SOURCE\_DIR/projects/compass/tools/compass/RULE\_SELECTION.in file and confirm it
+	reflects your most recent additional checker(s) choice of execution at
+	run-time; the default setting is ``on''. Please refer to section 
+	~\ref{ruleselection}.
+\end{enumerate}
+
+% Typing make testNewChecker manually will cause later make check fail
+% Not recommended to use, Liao, 10/31/2008
+%Additionally, a blank checker may be automatically integrated into the current
+%compass tool as a method to test for build system errors. To execute this test
+%,type:
+%
+%\begin{verbatim}
+%make testNewChecker
+%\end{verbatim}
+%
+%from any compass tool directory. This test will create a blank checker from
+%the template attempt to install the checker then uninstall it thus leaving the
+%tool in its previous state.
+
+%Many automatically generated files required for the build of Compass are 
+%generated in the build tree. Rules for the generation of these files are found
+%in the automake Makefile.am file in the Compass source tree directory 
+%projects/compass. These file include:
+%
+%\begin{itemize}
+%\item {\bf CHECKER\_LIST\_WITHOUT\_COMMENTS}: a version of CHECKER\_LIST
+%	that expands in two columns those checkers built as part of Compass
+%	in camel case starting with a lower-case letter and an upper-case
+%	letter respectively.
+%
+%\item {\bf checkers.h}: An automatically generated file needed by compassMain.C that 
+%	contains a list of \#include directives for each checker header .h file.
+%
+%\item {\bf buildCheckers.C}: An automatically generated source file needed by 
+%	compassMain.C to build the Compass checker traversals.
+%
+%\item {\bf compass\_parameters}: The concatenation of individual checker parameter files to be used with compassMain.
+%
+%\item {\bf testNewChecker}: creates a blank checker from the template and
+%	attempts to automatically install it into the current compass tool then
+%	uninstall it again. This label is used to test the build system.
+%
+%\end{itemize}
+
+
+
+
 \section{Extending the Compass Infrastructure}
 
 Compass, as well as being a tool for software analysis, is also a capable

Modified: branches/testonly/projects/palette/Makefile.am
===================================================================
--- branches/testonly/projects/palette/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/palette/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -39,7 +39,7 @@
 SUFFIXES = .P
 
 $(srcdir)/rose.P: $(srcdir)/gen_rose_tables.tcl $(top_srcdir)/src/ROSETTA/src/*.C
-	if test -w $(srcdir)/rose.P; then ${SHELL} $(top_srcdir)/config/missing --run tclsh $(srcdir)/gen_rose_tables.tcl $(top_builddir)/src/frontend/SageIII/Cxx_Grammar.h $(srcdir)/rose.P; fi
+	if test \! -e $(srcdir)/rose.P -o -w $(srcdir)/rose.P; then ${SHELL} $(top_srcdir)/config/missing --run tclsh $(srcdir)/gen_rose_tables.tcl $(top_builddir)/src/frontend/SageIII/Cxx_Grammar.h $(srcdir)/rose.P; fi
 
 check-local: switch_without_default null_deref qsolve simple_example sortTest
 	@if [ -e compass_parameters ]; then echo "Please remove compass_parameters before running \"make check\"" 1>&2; exit 1; fi

Modified: branches/testonly/projects/palette/rose.P
===================================================================
--- branches/testonly/projects/palette/rose.P	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/palette/rose.P	2008-11-18 06:54:05 UTC (rev 129)
@@ -903,12 +903,12 @@
 :- prim(node, 1,
 [rule([+('SgNode*')], [cond("isSgNode($0)")
 ])
-,rule([-('SgNode*')], [iterMemoryPools($0, ['SgNode','SgSupport','SgModifier','SgModifierNodes','SgConstVolatileModifier','SgStorageModifier','SgAccessModifier','SgFunctionModifier','SgUPC_AccessModifier','SgSpecialFunctionModifier','SgElaboratedTypeModifier','SgLinkageModifier','SgBaseClassModifier','SgTypeModifier','SgDeclarationModifier','SgName','SgSymbolTable','SgInitializedName','SgAttribute','SgPragma','SgBitAttribute','SgFuncDecl_attr','SgClassDecl_attr','Sg_File_Info','SgFile','SgSourceFile','SgBinaryFile','SgProject','SgOptions','SgUnparse_Info','SgBaseClass','SgTypedefSeq','SgTemplateParameter','SgTemplateArgument','SgDirectory','SgFileList','SgDirectoryList','SgFunctionParameterTypeList','SgQualifiedName','SgTemplateArgumentList','SgTemplateParameterList','SgGraph','SgDirectedGraph','SgGraphNode','SgDirectedGraphNode','SgGraphEdge','SgDirectedGraphEdge','SgNameGroup','SgCommonBlockObject','SgDimensionObject','SgFormatItem','SgFormatItemList','SgDataStatementGroup','SgDataStatementObject','SgDataStatementValue','SgType','SgTypeUnknown','SgTypeChar','SgTypeSignedChar','SgTypeUnsignedChar','SgTypeShort','SgTypeSignedShort','SgTypeUnsignedShort','SgTypeInt','SgTypeSignedInt','SgTypeUnsignedInt','SgTypeLong','SgTypeSignedLong','SgTypeUnsignedLong','SgTypeVoid','SgTypeGlobalVoid','SgTypeWchar','SgTypeFloat','SgTypeDouble','SgTypeLongLong','SgTypeUnsignedLongLong','SgTypeLongDouble','SgTypeString','SgTypeBool','SgPointerType','SgPointerMemberType','SgReferenceType','SgNamedType','SgClassType','SgEnumType','SgTypedefType','SgModifierType','SgFunctionType','SgMemberFunctionType','SgPartialFunctionType','SgPartialFunctionModifierType','SgArrayType','SgTypeEllipse','SgTemplateType','SgQualifiedNameType','SgTypeComplex','SgTypeImaginary','SgTypeDefault','SgLocatedNode','SgStatement','SgScopeStatement','SgGlobal','SgBasicBlock','SgIfStmt','SgForStatement','SgFunctionDefinition','SgClassDefinition','SgTemplateInstantiationDefn','SgWhileStmt','SgDoWhileStmt','SgSwitchStatement','SgCatchOptionStmt','SgNames!
 paceDefi
nitionStatement','SgBlockDataStatement','SgAssociateStatement','SgFortranDo','SgFortranNonblockedDo','SgForAllStatement','SgUpcForAllStatement','SgFunctionTypeTable','SgDeclarationStatement','SgFunctionParameterList','SgVariableDeclaration','SgVariableDefinition','SgClinkageDeclarationStatement','SgClinkageStartStatement','SgClinkageEndStatement','SgEnumDeclaration','SgAsmStmt','SgAttributeSpecificationStatement','SgFormatStatement','SgTemplateDeclaration','SgTemplateInstantiationDirectiveStatement','SgUseStatement','SgParameterStatement','SgNamespaceDeclarationStatement','SgEquivalenceStatement','SgInterfaceStatement','SgNamespaceAliasDeclarationStatement','SgCommonBlock','SgTypedefDeclaration','SgStatementFunctionStatement','SgCtorInitializerList','SgPragmaDeclaration','SgUsingDirectiveStatement','SgClassDeclaration','SgTemplateInstantiationDecl','SgDerivedTypeStatement','SgModuleStatement','SgImplicitStatement','SgUsingDeclarationStatement','SgNamelistStatement','SgImportStatement','SgFunctionDeclaration','SgMemberFunctionDeclaration','SgTemplateInstantiationMemberFunctionDecl','SgTemplateInstantiationFunctionDecl','SgProgramHeaderStatement','SgProcedureHeaderStatement','SgEntryStatement','SgContainsStatement','SgC_PreprocessorDirectiveStatement','SgIncludeDirectiveStatement','SgDefineDirectiveStatement','SgUndefDirectiveStatement','SgIfdefDirectiveStatement','SgIfndefDirectiveStatement','SgIfDirectiveStatement','SgDeadIfDirectiveStatement','SgElseDirectiveStatement','SgElseifDirectiveStatement','SgEndifDirectiveStatement','SgLineDirectiveStatement','SgWarningDirectiveStatement','SgErrorDirectiveStatement','SgEmptyDirectiveStatement','SgFortranIncludeLine','SgExprStatement','SgLabelStatement','SgCaseOptionStmt','SgTryStmt','SgDefaultOptionStmt','SgBreakStmt','SgContinueStmt','SgReturnStmt','SgGotoStatement','SgSpawnStmt','SgNullStatement','SgVariantStatement','SgForInitStatement','SgCatchStatementSeq','SgStopOrPauseStatement','SgIOStatement','SgPrintStatement','SgReadStatement','SgWriteStatement','SgO!
 penState
ment','SgCloseStatement','SgInquireStatement','SgFlushStatement','SgBackspaceStatement','SgRewindStatement','SgEndfileStatement','SgWaitStatement','SgWhereStatement','SgElseWhereStatement','SgNullifyStatement','SgArithmeticIfStatement','SgAssignStatement','SgComputedGotoStatement','SgAssignedGotoStatement','SgAllocateStatement','SgDeallocateStatement','SgUpcNotifyStatement','SgUpcWaitStatement','SgUpcBarrierStatement','SgUpcFenceStatement','SgSequenceStatement','SgExpression','SgUnaryOp','SgExpressionRoot','SgMinusOp','SgUnaryAddOp','SgNotOp','SgPointerDerefExp','SgAddressOfOp','SgMinusMinusOp','SgPlusPlusOp','SgBitComplementOp','SgCastExp','SgThrowOp','SgUserDefinedUnaryOp','SgBinaryOp','SgArrowExp','SgDotExp','SgDotStarOp','SgArrowStarOp','SgEqualityOp','SgLessThanOp','SgGreaterThanOp','SgNotEqualOp','SgLessOrEqualOp','SgGreaterOrEqualOp','SgAddOp','SgSubtractOp','SgMultiplyOp','SgDivideOp','SgIntegerDivideOp','SgModOp','SgAndOp','SgOrOp','SgBitXorOp','SgBitAndOp','SgBitOrOp','SgCommaOpExp','SgLshiftOp','SgRshiftOp','SgPntrArrRefExp','SgScopeOp','SgAssignOp','SgPlusAssignOp','SgMinusAssignOp','SgAndAssignOp','SgIorAssignOp','SgMultAssignOp','SgDivAssignOp','SgModAssignOp','SgXorAssignOp','SgLshiftAssignOp','SgRshiftAssignOp','SgExponentiationOp','SgConcatenationOp','SgUserDefinedBinaryOp','SgExprListExp','SgVarRefExp','SgClassNameRefExp','SgFunctionRefExp','SgMemberFunctionRefExp','SgValueExp','SgBoolValExp','SgStringVal','SgShortVal','SgCharVal','SgUnsignedCharVal','SgWcharVal','SgUnsignedShortVal','SgIntVal','SgEnumVal','SgUnsignedIntVal','SgLongIntVal','SgLongLongIntVal','SgUnsignedLongLongIntVal','SgUnsignedLongVal','SgFloatVal','SgDoubleVal','SgLongDoubleVal','SgComplexVal','SgUpcThreads','SgUpcMythread','SgFunctionCallExp','SgSizeOfOp','SgUpcLocalsizeofExpression','SgUpcBlocksizeofExpression','SgUpcElemsizeofExpression','SgTypeIdOp','SgConditionalExp','SgNewExp','SgDeleteExp','SgThisExp','SgRefExp','SgInitializer','SgAggregateInitializer','SgConstructorInitializer','SgAssignInitializer','SgDesign!
 atedInit
ializer','SgVarArgStartOp','SgVarArgOp','SgVarArgEndOp','SgVarArgCopyOp','SgVarArgStartOneOperandOp','SgNullExpression','SgVariantExpression','SgSubscriptExpression','SgColonShapeExp','SgAsteriskShapeExp','SgImpliedDo','SgIOItemExpression','SgStatementExpression','SgAsmOp','SgLabelRefExp','SgActualArgumentExpression','SgUnknownArrayOrFunctionReference','SgLocatedNodeSupport','SgInterfaceBody','SgRenamePair','SgToken','SgSymbol','SgVariableSymbol','SgFunctionSymbol','SgMemberFunctionSymbol','SgRenameSymbol','SgFunctionTypeSymbol','SgClassSymbol','SgTemplateSymbol','SgEnumSymbol','SgEnumFieldSymbol','SgTypedefSymbol','SgLabelSymbol','SgDefaultSymbol','SgNamespaceSymbol','SgIntrinsicSymbol','SgModuleSymbol','SgInterfaceSymbol','SgCommonSymbol','SgAliasSymbol','SgAsmNode','SgAsmStatement','SgAsmDeclaration','SgAsmDataStructureDeclaration','SgAsmFunctionDeclaration','SgAsmFieldDeclaration','SgAsmBlock','SgAsmInstruction','SgAsmx86Instruction','SgAsmArmInstruction','SgAsmPowerpcInstruction','SgAsmExpression','SgAsmValueExpression','SgAsmByteValueExpression','SgAsmWordValueExpression','SgAsmDoubleWordValueExpression','SgAsmQuadWordValueExpression','SgAsmSingleFloatValueExpression','SgAsmDoubleFloatValueExpression','SgAsmVectorValueExpression','SgAsmBinaryExpression','SgAsmBinaryAdd','SgAsmBinarySubtract','SgAsmBinaryMultiply','SgAsmBinaryDivide','SgAsmBinaryMod','SgAsmBinaryAddPreupdate','SgAsmBinarySubtractPreupdate','SgAsmBinaryAddPostupdate','SgAsmBinarySubtractPostupdate','SgAsmBinaryLsl','SgAsmBinaryLsr','SgAsmBinaryAsr','SgAsmBinaryRor','SgAsmUnaryExpression','SgAsmUnaryPlus','SgAsmUnaryMinus','SgAsmUnaryRrx','SgAsmUnaryArmSpecialRegisterList','SgAsmMemoryReferenceExpression','SgAsmRegisterReferenceExpression','SgAsmx86RegisterReferenceExpression','SgAsmArmRegisterReferenceExpression','SgAsmPowerpcRegisterReferenceExpression','SgAsmControlFlagsExpression','SgAsmCommonSubExpression','SgAsmExprListExp','SgAsmFile','SgAsmInterpretation','SgAsmOperandList','SgAsmType','SgAsmTypeByte','SgAsmTypeWord','SgAsmTyp!
 eDoubleW
ord','SgAsmTypeQuadWord','SgAsmTypeDoubleQuadWord','SgAsmType80bitFloat','SgAsmType128bitFloat','SgAsmTypeSingleFloat','SgAsmTypeDoubleFloat','SgAsmTypeVector','SgAsmExecutableFileFormat','SgAsmGenericDLL','SgAsmPEDLL','SgAsmGenericFormat','SgAsmGenericDLLList','SgAsmGenericFile','SgAsmGenericSection','SgAsmGenericHeader','SgAsmPEFileHeader','SgAsmLEFileHeader','SgAsmNEFileHeader','SgAsmDOSFileHeader','SgAsmElfFileHeader','SgAsmElfSection','SgAsmElfSymbolSection','SgAsmElfRelaSection','SgAsmElfDynamicSection','SgAsmElfStringSection','SgAsmElfSectionTable','SgAsmElfSegmentTable','SgAsmPESection','SgAsmPEImportSection','SgAsmPEStringSection','SgAsmPESectionTable','SgAsmPEExtendedDOSHeader','SgAsmCoffSymbolTable','SgAsmNESection','SgAsmNESectionTable','SgAsmNEExtendedDOSHeader','SgAsmNENameTable','SgAsmNEModuleTable','SgAsmNEStringTable','SgAsmNEEntryTable','SgAsmNERelocTable','SgAsmLESection','SgAsmLESectionTable','SgAsmLENameTable','SgAsmLEPageTable','SgAsmLEEntryTable','SgAsmLERelocTable','SgAsmGenericSymbol','SgAsmCoffSymbol','SgAsmElfSymbol','SgAsmGenericStrtab','SgAsmElfStrtab','SgAsmCoffStrtab','SgAsmGenericSymbolList','SgAsmGenericSectionList','SgAsmGenericHeaderList','SgAsmGenericString','SgAsmBasicString','SgAsmStoredString','SgAsmElfSectionTableEntry','SgAsmElfSegmentTableEntry','SgAsmElfSymbolList','SgAsmElfRelaEntry','SgAsmElfRelaEntryList','SgAsmElfDynamicEntry','SgAsmElfDynamicEntryList','SgAsmElfSegmentTableEntryList','SgAsmStringStorage','SgAsmPEImportDirectory','SgAsmPEImportHintName','SgAsmPESectionTableEntry','SgAsmPERVASizePair','SgAsmCoffSymbolList','SgAsmPERVASizePairList','SgAsmPEDLLList','SgAsmPEImportHintNameList','SgAsmNEEntryPoint','SgAsmNERelocEntry','SgAsmNESectionTableEntry','SgAsmLEPageTableEntry','SgAsmLEEntryPoint','SgAsmLESectionTableEntry']), makeGround($0, 'SgNode*'), rescan])
+,rule([-('SgNode*')], [iterMemoryPools($0, ['SgNode','SgSupport','SgModifier','SgModifierNodes','SgConstVolatileModifier','SgStorageModifier','SgAccessModifier','SgFunctionModifier','SgUPC_AccessModifier','SgSpecialFunctionModifier','SgElaboratedTypeModifier','SgLinkageModifier','SgBaseClassModifier','SgTypeModifier','SgDeclarationModifier','SgName','SgSymbolTable','SgInitializedName','SgAttribute','SgPragma','SgBitAttribute','SgFuncDecl_attr','SgClassDecl_attr','Sg_File_Info','SgFile','SgSourceFile','SgBinaryFile','SgUnknownFile','SgProject','SgOptions','SgUnparse_Info','SgBaseClass','SgTypedefSeq','SgTemplateParameter','SgTemplateArgument','SgDirectory','SgFileList','SgDirectoryList','SgFunctionParameterTypeList','SgQualifiedName','SgTemplateArgumentList','SgTemplateParameterList','SgGraph','SgDirectedGraph','SgGraphNode','SgDirectedGraphNode','SgGraphEdge','SgDirectedGraphEdge','SgNameGroup','SgCommonBlockObject','SgDimensionObject','SgFormatItem','SgFormatItemList','SgDataStatementGroup','SgDataStatementObject','SgDataStatementValue','SgType','SgTypeUnknown','SgTypeChar','SgTypeSignedChar','SgTypeUnsignedChar','SgTypeShort','SgTypeSignedShort','SgTypeUnsignedShort','SgTypeInt','SgTypeSignedInt','SgTypeUnsignedInt','SgTypeLong','SgTypeSignedLong','SgTypeUnsignedLong','SgTypeVoid','SgTypeGlobalVoid','SgTypeWchar','SgTypeFloat','SgTypeDouble','SgTypeLongLong','SgTypeUnsignedLongLong','SgTypeLongDouble','SgTypeString','SgTypeBool','SgPointerType','SgPointerMemberType','SgReferenceType','SgNamedType','SgClassType','SgEnumType','SgTypedefType','SgModifierType','SgFunctionType','SgMemberFunctionType','SgPartialFunctionType','SgPartialFunctionModifierType','SgArrayType','SgTypeEllipse','SgTemplateType','SgQualifiedNameType','SgTypeComplex','SgTypeImaginary','SgTypeDefault','SgLocatedNode','SgStatement','SgScopeStatement','SgGlobal','SgBasicBlock','SgIfStmt','SgForStatement','SgFunctionDefinition','SgClassDefinition','SgTemplateInstantiationDefn','SgWhileStmt','SgDoWhileStmt','SgSwitchStatement','SgCatchOpti!
 onStmt',
'SgNamespaceDefinitionStatement','SgBlockDataStatement','SgAssociateStatement','SgFortranDo','SgFortranNonblockedDo','SgForAllStatement','SgUpcForAllStatement','SgFunctionTypeTable','SgDeclarationStatement','SgFunctionParameterList','SgVariableDeclaration','SgVariableDefinition','SgClinkageDeclarationStatement','SgClinkageStartStatement','SgClinkageEndStatement','SgEnumDeclaration','SgAsmStmt','SgAttributeSpecificationStatement','SgFormatStatement','SgTemplateDeclaration','SgTemplateInstantiationDirectiveStatement','SgUseStatement','SgParameterStatement','SgNamespaceDeclarationStatement','SgEquivalenceStatement','SgInterfaceStatement','SgNamespaceAliasDeclarationStatement','SgCommonBlock','SgTypedefDeclaration','SgStatementFunctionStatement','SgCtorInitializerList','SgPragmaDeclaration','SgUsingDirectiveStatement','SgClassDeclaration','SgTemplateInstantiationDecl','SgDerivedTypeStatement','SgModuleStatement','SgImplicitStatement','SgUsingDeclarationStatement','SgNamelistStatement','SgImportStatement','SgFunctionDeclaration','SgMemberFunctionDeclaration','SgTemplateInstantiationMemberFunctionDecl','SgTemplateInstantiationFunctionDecl','SgProgramHeaderStatement','SgProcedureHeaderStatement','SgEntryStatement','SgContainsStatement','SgC_PreprocessorDirectiveStatement','SgIncludeDirectiveStatement','SgDefineDirectiveStatement','SgUndefDirectiveStatement','SgIfdefDirectiveStatement','SgIfndefDirectiveStatement','SgIfDirectiveStatement','SgDeadIfDirectiveStatement','SgElseDirectiveStatement','SgElseifDirectiveStatement','SgEndifDirectiveStatement','SgLineDirectiveStatement','SgWarningDirectiveStatement','SgErrorDirectiveStatement','SgEmptyDirectiveStatement','SgFortranIncludeLine','SgExprStatement','SgLabelStatement','SgCaseOptionStmt','SgTryStmt','SgDefaultOptionStmt','SgBreakStmt','SgContinueStmt','SgReturnStmt','SgGotoStatement','SgSpawnStmt','SgNullStatement','SgVariantStatement','SgForInitStatement','SgCatchStatementSeq','SgStopOrPauseStatement','SgIOStatement','SgPrintStatement','SgReadStatement','SgWrit!
 eStateme
nt','SgOpenStatement','SgCloseStatement','SgInquireStatement','SgFlushStatement','SgBackspaceStatement','SgRewindStatement','SgEndfileStatement','SgWaitStatement','SgWhereStatement','SgElseWhereStatement','SgNullifyStatement','SgArithmeticIfStatement','SgAssignStatement','SgComputedGotoStatement','SgAssignedGotoStatement','SgAllocateStatement','SgDeallocateStatement','SgUpcNotifyStatement','SgUpcWaitStatement','SgUpcBarrierStatement','SgUpcFenceStatement','SgSequenceStatement','SgExpression','SgUnaryOp','SgExpressionRoot','SgMinusOp','SgUnaryAddOp','SgNotOp','SgPointerDerefExp','SgAddressOfOp','SgMinusMinusOp','SgPlusPlusOp','SgBitComplementOp','SgCastExp','SgThrowOp','SgUserDefinedUnaryOp','SgBinaryOp','SgArrowExp','SgDotExp','SgDotStarOp','SgArrowStarOp','SgEqualityOp','SgLessThanOp','SgGreaterThanOp','SgNotEqualOp','SgLessOrEqualOp','SgGreaterOrEqualOp','SgAddOp','SgSubtractOp','SgMultiplyOp','SgDivideOp','SgIntegerDivideOp','SgModOp','SgAndOp','SgOrOp','SgBitXorOp','SgBitAndOp','SgBitOrOp','SgCommaOpExp','SgLshiftOp','SgRshiftOp','SgPntrArrRefExp','SgScopeOp','SgAssignOp','SgPlusAssignOp','SgMinusAssignOp','SgAndAssignOp','SgIorAssignOp','SgMultAssignOp','SgDivAssignOp','SgModAssignOp','SgXorAssignOp','SgLshiftAssignOp','SgRshiftAssignOp','SgExponentiationOp','SgConcatenationOp','SgUserDefinedBinaryOp','SgExprListExp','SgVarRefExp','SgClassNameRefExp','SgFunctionRefExp','SgMemberFunctionRefExp','SgValueExp','SgBoolValExp','SgStringVal','SgShortVal','SgCharVal','SgUnsignedCharVal','SgWcharVal','SgUnsignedShortVal','SgIntVal','SgEnumVal','SgUnsignedIntVal','SgLongIntVal','SgLongLongIntVal','SgUnsignedLongLongIntVal','SgUnsignedLongVal','SgFloatVal','SgDoubleVal','SgLongDoubleVal','SgComplexVal','SgUpcThreads','SgUpcMythread','SgFunctionCallExp','SgSizeOfOp','SgUpcLocalsizeofExpression','SgUpcBlocksizeofExpression','SgUpcElemsizeofExpression','SgTypeIdOp','SgConditionalExp','SgNewExp','SgDeleteExp','SgThisExp','SgRefExp','SgInitializer','SgAggregateInitializer','SgConstructorInitializer','SgAssignInitia!
 lizer','
SgDesignatedInitializer','SgVarArgStartOp','SgVarArgOp','SgVarArgEndOp','SgVarArgCopyOp','SgVarArgStartOneOperandOp','SgNullExpression','SgVariantExpression','SgSubscriptExpression','SgColonShapeExp','SgAsteriskShapeExp','SgImpliedDo','SgIOItemExpression','SgStatementExpression','SgAsmOp','SgLabelRefExp','SgActualArgumentExpression','SgUnknownArrayOrFunctionReference','SgLocatedNodeSupport','SgInterfaceBody','SgRenamePair','SgToken','SgSymbol','SgVariableSymbol','SgFunctionSymbol','SgMemberFunctionSymbol','SgRenameSymbol','SgFunctionTypeSymbol','SgClassSymbol','SgTemplateSymbol','SgEnumSymbol','SgEnumFieldSymbol','SgTypedefSymbol','SgLabelSymbol','SgDefaultSymbol','SgNamespaceSymbol','SgIntrinsicSymbol','SgModuleSymbol','SgInterfaceSymbol','SgCommonSymbol','SgAliasSymbol','SgAsmNode','SgAsmStatement','SgAsmDeclaration','SgAsmDataStructureDeclaration','SgAsmFunctionDeclaration','SgAsmFieldDeclaration','SgAsmBlock','SgAsmInstruction','SgAsmx86Instruction','SgAsmArmInstruction','SgAsmPowerpcInstruction','SgAsmExpression','SgAsmValueExpression','SgAsmByteValueExpression','SgAsmWordValueExpression','SgAsmDoubleWordValueExpression','SgAsmQuadWordValueExpression','SgAsmSingleFloatValueExpression','SgAsmDoubleFloatValueExpression','SgAsmVectorValueExpression','SgAsmBinaryExpression','SgAsmBinaryAdd','SgAsmBinarySubtract','SgAsmBinaryMultiply','SgAsmBinaryDivide','SgAsmBinaryMod','SgAsmBinaryAddPreupdate','SgAsmBinarySubtractPreupdate','SgAsmBinaryAddPostupdate','SgAsmBinarySubtractPostupdate','SgAsmBinaryLsl','SgAsmBinaryLsr','SgAsmBinaryAsr','SgAsmBinaryRor','SgAsmUnaryExpression','SgAsmUnaryPlus','SgAsmUnaryMinus','SgAsmUnaryRrx','SgAsmUnaryArmSpecialRegisterList','SgAsmMemoryReferenceExpression','SgAsmRegisterReferenceExpression','SgAsmx86RegisterReferenceExpression','SgAsmArmRegisterReferenceExpression','SgAsmPowerpcRegisterReferenceExpression','SgAsmControlFlagsExpression','SgAsmCommonSubExpression','SgAsmExprListExp','SgAsmFile','SgAsmInterpretation','SgAsmOperandList','SgAsmType','SgAsmTypeByte','SgAsmTyp!
 eWord','
SgAsmTypeDoubleWord','SgAsmTypeQuadWord','SgAsmTypeDoubleQuadWord','SgAsmType80bitFloat','SgAsmType128bitFloat','SgAsmTypeSingleFloat','SgAsmTypeDoubleFloat','SgAsmTypeVector','SgAsmExecutableFileFormat','SgAsmGenericDLL','SgAsmGenericFormat','SgAsmGenericDLLList','SgAsmGenericFile','SgAsmGenericSection','SgAsmGenericHeader','SgAsmPEFileHeader','SgAsmLEFileHeader','SgAsmNEFileHeader','SgAsmDOSFileHeader','SgAsmElfFileHeader','SgAsmElfSection','SgAsmElfSymbolSection','SgAsmElfRelaSection','SgAsmElfDynamicSection','SgAsmElfStringSection','SgAsmElfSectionTable','SgAsmElfSegmentTable','SgAsmPESection','SgAsmPEImportSection','SgAsmPEExportSection','SgAsmPEStringSection','SgAsmPESectionTable','SgAsmPEExtendedDOSHeader','SgAsmCoffSymbolTable','SgAsmNESection','SgAsmNESectionTable','SgAsmNEExtendedDOSHeader','SgAsmNENameTable','SgAsmNEModuleTable','SgAsmNEStringTable','SgAsmNEEntryTable','SgAsmNERelocTable','SgAsmLESection','SgAsmLESectionTable','SgAsmLENameTable','SgAsmLEPageTable','SgAsmLEEntryTable','SgAsmLERelocTable','SgAsmGenericSymbol','SgAsmCoffSymbol','SgAsmElfSymbol','SgAsmGenericStrtab','SgAsmElfStrtab','SgAsmCoffStrtab','SgAsmGenericSymbolList','SgAsmGenericSectionList','SgAsmGenericHeaderList','SgAsmGenericString','SgAsmBasicString','SgAsmStoredString','SgAsmElfSectionTableEntry','SgAsmElfSegmentTableEntry','SgAsmElfSymbolList','SgAsmPEImportILTEntry','SgAsmElfRelaEntry','SgAsmElfRelaEntryList','SgAsmPEExportEntry','SgAsmPEExportEntryList','SgAsmElfDynamicEntry','SgAsmElfDynamicEntryList','SgAsmElfSegmentTableEntryList','SgAsmStringStorage','SgAsmPEImportDirectory','SgAsmPEImportHNTEntry','SgAsmPESectionTableEntry','SgAsmPEExportDirectory','SgAsmPERVASizePair','SgAsmCoffSymbolList','SgAsmPERVASizePairList','SgAsmPEImportHNTEntryList','SgAsmPEImportILTEntryList','SgAsmPEImportLookupTable','SgAsmPEImportDirectoryList','SgAsmNEEntryPoint','SgAsmNERelocEntry','SgAsmNESectionTableEntry','SgAsmLEPageTableEntry','SgAsmLEEntryPoint','SgAsmLESectionTableEntry','SgAsmDwarfInformation','SgAsmDwarfMacro','SgAsm!
 DwarfMac
roList','SgAsmDwarfLine','SgAsmDwarfLineList','SgAsmDwarfCompilationUnitList','SgAsmDwarfConstruct','SgAsmDwarfArrayType','SgAsmDwarfClassType','SgAsmDwarfEntryPoint','SgAsmDwarfEnumerationType','SgAsmDwarfFormalParameter','SgAsmDwarfImportedDeclaration','SgAsmDwarfLabel','SgAsmDwarfLexicalBlock','SgAsmDwarfMember','SgAsmDwarfPointerType','SgAsmDwarfReferenceType','SgAsmDwarfCompilationUnit','SgAsmDwarfStringType','SgAsmDwarfStructureType','SgAsmDwarfSubroutineType','SgAsmDwarfTypedef','SgAsmDwarfUnionType','SgAsmDwarfUnspecifiedParameters','SgAsmDwarfVariant','SgAsmDwarfCommonBlock','SgAsmDwarfCommonInclusion','SgAsmDwarfInheritance','SgAsmDwarfInlinedSubroutine','SgAsmDwarfModule','SgAsmDwarfPtrToMemberType','SgAsmDwarfSetType','SgAsmDwarfSubrangeType','SgAsmDwarfWithStmt','SgAsmDwarfAccessDeclaration','SgAsmDwarfBaseType','SgAsmDwarfCatchBlock','SgAsmDwarfConstType','SgAsmDwarfConstant','SgAsmDwarfEnumerator','SgAsmDwarfFileType','SgAsmDwarfFriend','SgAsmDwarfNamelist','SgAsmDwarfNamelistItem','SgAsmDwarfPackedType','SgAsmDwarfSubprogram','SgAsmDwarfTemplateTypeParameter','SgAsmDwarfTemplateValueParameter','SgAsmDwarfThrownType','SgAsmDwarfTryBlock','SgAsmDwarfVariantPart','SgAsmDwarfVariable','SgAsmDwarfVolatileType','SgAsmDwarfDwarfProcedure','SgAsmDwarfRestrictType','SgAsmDwarfInterfaceType','SgAsmDwarfNamespace','SgAsmDwarfImportedModule','SgAsmDwarfUnspecifiedType','SgAsmDwarfPartialUnit','SgAsmDwarfImportedUnit','SgAsmDwarfMutableType','SgAsmDwarfCondition','SgAsmDwarfSharedType','SgAsmDwarfFormatLabel','SgAsmDwarfFunctionTemplate','SgAsmDwarfClassTemplate','SgAsmDwarfUpcSharedType','SgAsmDwarfUpcStrictType','SgAsmDwarfUpcRelaxedType','SgAsmDwarfUnknownConstruct','SgAsmDwarfConstructList']), makeGround($0, 'SgNode*'), rescan])
 ]).
 :- prim(supportNode, 1,
 [rule([+('SgNode*')], [cond("isSgSupport($0)")
 ])
-,rule([-('SgNode*')], [iterMemoryPools($0, ['SgSupport','SgModifier','SgModifierNodes','SgConstVolatileModifier','SgStorageModifier','SgAccessModifier','SgFunctionModifier','SgUPC_AccessModifier','SgSpecialFunctionModifier','SgElaboratedTypeModifier','SgLinkageModifier','SgBaseClassModifier','SgTypeModifier','SgDeclarationModifier','SgName','SgSymbolTable','SgInitializedName','SgAttribute','SgPragma','SgBitAttribute','SgFuncDecl_attr','SgClassDecl_attr','Sg_File_Info','SgFile','SgSourceFile','SgBinaryFile','SgProject','SgOptions','SgUnparse_Info','SgBaseClass','SgTypedefSeq','SgTemplateParameter','SgTemplateArgument','SgDirectory','SgFileList','SgDirectoryList','SgFunctionParameterTypeList','SgQualifiedName','SgTemplateArgumentList','SgTemplateParameterList','SgGraph','SgDirectedGraph','SgGraphNode','SgDirectedGraphNode','SgGraphEdge','SgDirectedGraphEdge','SgNameGroup','SgCommonBlockObject','SgDimensionObject','SgFormatItem','SgFormatItemList','SgDataStatementGroup','SgDataStatementObject','SgDataStatementValue']), makeGround($0, 'SgNode*'), rescan])
+,rule([-('SgNode*')], [iterMemoryPools($0, ['SgSupport','SgModifier','SgModifierNodes','SgConstVolatileModifier','SgStorageModifier','SgAccessModifier','SgFunctionModifier','SgUPC_AccessModifier','SgSpecialFunctionModifier','SgElaboratedTypeModifier','SgLinkageModifier','SgBaseClassModifier','SgTypeModifier','SgDeclarationModifier','SgName','SgSymbolTable','SgInitializedName','SgAttribute','SgPragma','SgBitAttribute','SgFuncDecl_attr','SgClassDecl_attr','Sg_File_Info','SgFile','SgSourceFile','SgBinaryFile','SgUnknownFile','SgProject','SgOptions','SgUnparse_Info','SgBaseClass','SgTypedefSeq','SgTemplateParameter','SgTemplateArgument','SgDirectory','SgFileList','SgDirectoryList','SgFunctionParameterTypeList','SgQualifiedName','SgTemplateArgumentList','SgTemplateParameterList','SgGraph','SgDirectedGraph','SgGraphNode','SgDirectedGraphNode','SgGraphEdge','SgDirectedGraphEdge','SgNameGroup','SgCommonBlockObject','SgDimensionObject','SgFormatItem','SgFormatItemList','SgDataStatementGroup','SgDataStatementObject','SgDataStatementValue']), makeGround($0, 'SgNode*'), rescan])
 ]).
 :- prim(locatedNode, 1,
 [rule([+('SgNode*')], [cond("isSgLocatedNode($0)")

Modified: branches/testonly/projects/runtimeErrorCheck/Makefile.am
===================================================================
--- branches/testonly/projects/runtimeErrorCheck/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/runtimeErrorCheck/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -2,7 +2,7 @@
 
 
 # To keep compile commands tidy, please ONLY put required include flags here.
-INCLUDES = $(ROSE_INCLUDES) -I$(builddir) 
+INCLUDES = $(ROSE_INCLUDES) -I.
 INCLUDES2 = $(ROSE_INCLUDES) -I../../
 
 # This test program does not require the rest of ROSE so it can be handled locally

Modified: branches/testonly/projects/runtimeErrorCheck/runtimeCheck.cpp
===================================================================
--- branches/testonly/projects/runtimeErrorCheck/runtimeCheck.cpp	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/projects/runtimeErrorCheck/runtimeCheck.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -10,8 +10,8 @@
 #include <dlfcn.h>
 
 #include <sys/stat.h>
-#include <sys/types.h>
 
+
 #include "RuntimeInstrumentation.h"
 
 using namespace std;

Modified: branches/testonly/rose.docs.in
===================================================================
--- branches/testonly/rose.docs.in	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/rose.docs.in	2008-11-18 06:54:05 UTC (rev 129)
@@ -80,9 +80,7 @@
      about the ROSE project. Built in 2005, it has been slow to evolve since we wanted to 
      keep a low profile as long as possible while we focused on robustness issues within
      the ROSE project and infrastructure. \n
-     <a href="http://www.llnl.gov/casc/rose"> External LLNL ROSE Web Pages </a> \n
-     The LLNL ROSE internal web site is at:
-     <a href="http://cmg-1/casc/rose"> Internal LLNL ROSE Web Pages </a> \n
+     <a href="http://www.llnl.gov/casc/rose"> ROSE Web Site </a> \n
 
 \subsection dummyA ROSE User Manual Documentation
      The ROSE User Manual can be found at (link to LaTeX document): \n
@@ -114,42 +112,26 @@
 
 \subsection dummyD ROSE Email List
 
-    The ROSE project maintains a mailing list (casc-rose *at* llnl *dot* gov).
-    The email list is only used to get help and announce internal and external releases.
-    Anyone who would like to be on the email list can send email to dquinlan *at* llnl *dot* gov.
-    Those with access to LLNL internal web pages may check who is on the email list at the \n
-     <a href="http://cmg-r.llnl.gov/casc/computing/mailing_lists/casc-rose.html"> ROSE Email List </a> \n
+    The ROSE project supports three email lists, information about this is loacted in 
+    the ROSE Installation Guide and the ROSE User Manual (developers appendix).
 
 \subsection RosePublications ROSE Publications
 
     ROSE is a research project which emphasises publication about the new technologies
     that we are developing, every often as part of external collaborations.  Publications
-    specific to the ROSE project can be found at: \n
-    \ref ProjectPublications
+    specific to the ROSE project can be found at the main ROSE web page.
 
 \section DownLoadInstructions ROSE Download Instructions
 
-    \b ROSE will be released on the web late \b Summer \b 2006.
+    ROSE is an open source project. The ROSE project is publically release via the
+    outreach.scidac.gov web site (which hosts the main ROSE web page).
 
-    ROSE is an open source project. The ROSE project is however not yet presently 
-    distributed on the web.  A increasing 
-    number of groups world-wide have been given external access to ROSE
-    as part of an incremental approach to an initial external release.  In each case the 
-    propriatary EDG source can only be distributed to those research groups having a free 
-    research license (or a commerical license in a few cases).  The full source code to
-    ROSE \b will be made available as an \b open \b source \b project.  The code that
-    connects EDG to
-    ROSE can \b only be made available in binary form to those without the free EDG research
-    license.  ROSE by itself does not depend on EDG directly, only indirectly as one 
-    of a number of front-ends. \n
-    \ref ProjectDownLoadPage
+\if debuggingDocumentation
 
 \section RoseRelatedWork Related Work & Background Material
 
     For more information about related work and background material \ref ProjectRelatedWorkPage.
 
-\if debuggingDocumentation
-
    There are two levels of documentation: user level and developer level. 
       -# The user level documentation documents only the interfaces that are 
          important to the use of ROSE to build translators and express 

Modified: branches/testonly/src/3rdPartyLibraries/Makefile.am
===================================================================
--- branches/testonly/src/3rdPartyLibraries/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/3rdPartyLibraries/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,6 +1,6 @@
 # This should not depend on ROSE in any way so I don't think we need this
 # include $(top_srcdir)/config/Makefile.for.ROSE.includes.and.libs
 
-SUBDIRS = MSTL libltdl libharu-2.1.0 fortran-parser antlr-jars qrose
+SUBDIRS = MSTL libharu-2.1.0 fortran-parser antlr-jars qrose
 # checkPointLibrary
 

Modified: branches/testonly/src/Makefile.am
===================================================================
--- branches/testonly/src/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -76,6 +76,7 @@
    $(top_builddir)/src/midend/loopProcessing/depGraph/libdepGraph.la \
    $(top_builddir)/src/midend/loopProcessing/computation/libcomputation.la \
    $(top_builddir)/src/midend/loopProcessing/slicing/libslicing.la \
+   $(top_builddir)/src/midend/loopProcessing/outsideInterface/libarrayOptimization.la \
    $(top_builddir)/src/midend/loopProcessing/driver/libdriver.la \
    $(top_builddir)/src/roseSupport/libroseSupport.la \
    $(top_builddir)/src/util/support/libsupport.la \

Modified: branches/testonly/src/ROSETTA/Grammar/BinaryInstruction.code
===================================================================
--- branches/testonly/src/ROSETTA/Grammar/BinaryInstruction.code	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/ROSETTA/Grammar/BinaryInstruction.code	2008-11-18 06:54:05 UTC (rev 129)
@@ -375,8 +375,8 @@
 
      public:
        // DQ (8/21/2008): We need something to be in global scope (or not nested here) so that a few references in Node.code can be made.
-       // typedef uint64_t addr_t;    // address and size (file and memory)
           typedef rose_addr_t addr_t; // address and size (file and memory)
+	  typedef rose_rva_t rva_t;   // relative virtual address
 
        // DQ (8/21/2008): Moved this from Node.code to make it local since we can't reference the nested addr_t directly from glogal scope.
        // typedef Rose_STL_Container<addr_t> SgAddressList;
@@ -385,13 +385,13 @@
        /* Thrown when an attempt is made to read past the end of a file, section, header, segment, etc. */
           class ShortRead {
                public:
-                    ShortRead(class SgAsmGenericSection *section, size_t offset, size_t size)
+                    ShortRead(const class SgAsmGenericSection *section, size_t offset, size_t size)
                        : section(section), offset(offset), size(size) {}
-                    ShortRead(class SgAsmGenericSection *section, size_t offset, size_t size, const std::string &mesg)
+                    ShortRead(const class SgAsmGenericSection *section, size_t offset, size_t size, const std::string &mesg)
                        : section(section), offset(offset), size(size), mesg(mesg) {}
-                    ShortRead(class SgAsmGenericSection *section, size_t offset, size_t size, const char *mesg)
+                    ShortRead(const class SgAsmGenericSection *section, size_t offset, size_t size, const char *mesg)
                        : section(section), offset(offset), size(size), mesg(mesg) {}
-                    SgAsmGenericSection *section;   /* Section from which read occurred; null implies file-level write */
+                    const SgAsmGenericSection *section;   /* Section from which read occurred; null implies file-level write */
                     addr_t         offset;    /* Byte offset into section (or file) */
                     addr_t         size;      /* Number of bytes of attempted read */
                     std::string          mesg;      /* Optional message */
@@ -400,13 +400,13 @@
        /* Thrown when an attempt is made to write past the end of a file, section, header, segment, etc. */
           class ShortWrite {
                public:
-                    ShortWrite(class SgAsmGenericSection *section, size_t offset, size_t size)
+                    ShortWrite(const class SgAsmGenericSection *section, size_t offset, size_t size)
                        : section(section), offset(offset), size(size) {}
-                    ShortWrite(class SgAsmGenericSection *section, size_t offset, size_t size, const std::string &mesg)
+                    ShortWrite(const class SgAsmGenericSection *section, size_t offset, size_t size, const std::string &mesg)
                        : section(section), offset(offset), size(size), mesg(mesg) {}
-                    ShortWrite(class SgAsmGenericSection *section, size_t offset, size_t size, const char *mesg)
+                    ShortWrite(const class SgAsmGenericSection *section, size_t offset, size_t size, const char *mesg)
                        : section(section), offset(offset), size(size), mesg(mesg) {}
-                    SgAsmGenericSection *section;  /* Section to which write occurred; null implies file-level write */
+                    const SgAsmGenericSection *section;  /* Section to which write occurred; null implies file-level write */
                     addr_t         offset;   /* Byte offset into section (or file) */
                     addr_t         size;     /* Number of bytes of attempted write */
                     std::string          mesg;     /* Optional message */
@@ -656,6 +656,7 @@
        // DQ (12/8/2008): Hook into the construction of the binary file format support.
           static void parseBinaryFormat(const std::string & name, SgAsmFile* asmFile);
           static void unparseBinaryFormat(const std::string &name, SgAsmFile *asmFile);
+	  static void unparseBinaryFormat(std::ostream&, SgAsmFile*);
 
        // DQ (11/8/2008): used in the PE support.
        // Looking for function: hexdump(_IO_FILE*&, long unsigned int, const char[5], SgCharList&, size_t&)
@@ -695,6 +696,8 @@
           static void host_to_le(unsigned h, uint16_t *n);
           static void host_to_le(unsigned h, uint32_t *n);
           static void host_to_le(addr_t h, uint64_t *n);
+	  static void host_to_le(rva_t h, uint32_t *n);
+	  static void host_to_le(rva_t h, uint64_t *n);
           static void host_to_le(int h, int8_t *n);
           static void host_to_le(int h, int16_t *n);
           static void host_to_le(int h, int32_t *n);
@@ -714,6 +717,8 @@
           static void host_to_be(unsigned h, uint16_t *n);
           static void host_to_be(unsigned h, uint32_t *n);
           static void host_to_be(addr_t h, uint64_t *n);
+	  static void host_to_be(rva_t h, uint32_t *n);
+	  static void host_to_be(rva_t h, uint64_t *n);
           static void host_to_be(int h, int8_t *n);
           static void host_to_be(int h, int16_t *n);
           static void host_to_be(int h, int32_t *n);
@@ -734,6 +739,7 @@
           static void host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, unsigned h, uint16_t *np);
           static void host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, unsigned h, uint32_t *np);
           static void host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, addr_t h, uint64_t *np);
+	  static void host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, rva_t h, uint64_t *np);
           static void host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, int h, int8_t *np);
           static void host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, int h, int16_t *np);
           static void host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, int h, int32_t *np);
@@ -742,97 +748,102 @@
 HEADER_EXECUTABLE_FILE_FORMAT_END
 
 
+
 HEADER_GENERIC_SECTION_START
-       // RPM (8/27/2008): Is this right? get_offset() returns file offset; get_mapped_rva() returns memory addr*/
-       // This can be mapped to the offset data member
-          unsigned long get_starting_memory_address() { return get_offset(); }
+	public:
+		// RPM (8/27/2008): Is this right? get_offset() returns file offset; get_mapped_rva() returns memory addr*/
+		// This can be mapped to the offset data member
+		unsigned long get_starting_memory_address() { return get_offset(); }
 
-       // DQ (8/7/2008): These are a few data member access functions that were required 
-       // to compile when first adding the new IR nodes (these should be removed).
-          unsigned long get_starting_file_offset() { return 0; }
-          unsigned long get_flags() { return 0; }
-          unsigned long get_type() { return 0; }
+		// DQ (8/7/2008): These are a few data member access functions that were required 
+		// to compile when first adding the new IR nodes (these should be removed).
+		unsigned long get_starting_file_offset() { return 0; }
+		unsigned long get_flags() { return 0; }
+		unsigned long get_type() { return 0; }
 
-     public:
 
-       /* Reason for section's existence. This is a union of all the section purposes from the various supported file formats.
-        * However, at this time we're only interested in a few kinds of sections and therefore most will fall into the SP_OTHER
-        * category. */
-          enum SectionPurpose {
-              SP_UNSPECIFIED,                                     /* File format did not specify a reason and none could be determined */
-              SP_PROGRAM,                                         /* Program-supplied data, code, etc. */
-              SP_HEADER,                                          /* Section contains a header for the executable file format */
-              SP_SYMTAB,                                          /* Symbol table */
-              SP_OTHER                                            /* File-specified purpose other than any given in this enum */
-             };
+		/* Reason for section's existence. This is a union of all the section purposes from the various supported file
+		 * formats.  However, at this time we're only interested in a few kinds of sections and therefore most will fall
+		 * into the SP_OTHER category. */
+		enum SectionPurpose {
+			SP_UNSPECIFIED,			/* File format did not specify a reason and none could be determined */
+			SP_PROGRAM,             	/* Program-supplied data, code, etc. */
+			SP_HEADER,              	/* Section contains a header for the executable file format */
+			SP_SYMTAB,              	/* Symbol table */
+			SP_OTHER                	/* File-specified purpose other than any given in this enum */
+		};
 
-          SgAsmGenericSection(SgAsmGenericFile*, SgAsmGenericHeader*, addr_t offset, addr_t size);
+		SgAsmGenericSection(SgAsmGenericFile*, SgAsmGenericHeader*);
+		SgAsmGenericSection(SgAsmGenericFile*, SgAsmGenericHeader*, addr_t offset, addr_t size);
 
-       // This destructor modifies the SgAsmGenericFile data to remove its section from the section list!
-          virtual ~SgAsmGenericSection();
+		// This destructor modifies the SgAsmGenericFile data to remove its section from the section list!
+		virtual ~SgAsmGenericSection();
 
-          static void dump_containing_sections(FILE *f, const std::string &prefix, rose_rva_t rva, const SgAsmGenericSectionPtrList&);
-          virtual void        dump(FILE*, const char *prefix, ssize_t idx);
-	  virtual bool	      reallocate() {return false;}
-          virtual void        unparse(FILE*);
-          void                unparse(FILE*, const ExtentMap&);
-          void 	     	      unparse_holes(FILE*);
-          SgAsmGenericHeader *is_file_header();              /* true if section represents a top level file header */
+		static void dump_containing_sections(FILE *f, const std::string &prefix, rose_rva_t rva,
+			const SgAsmGenericSectionPtrList&);
+		virtual void dump(FILE*, const char *prefix, ssize_t idx);
+		virtual bool reallocate() {return false;}
+		virtual void unparse(std::ostream&) const;
+		void unparse(std::ostream&, const ExtentMap&) const;
+		void unparse_holes(std::ostream&) const;
+		SgAsmGenericHeader *is_file_header();	/* true if section represents a top level file header */
 
-       /* Functions for section extent within the file */
-          addr_t        get_size() const;
-	  virtual void  set_size(addr_t);		/* Resize a section w/o regard to other sections or mapping */
-	  addr_t        get_offset() const;
-	  virtual void  set_offset(addr_t);             /* Move a section w/o regard to other sections or mapping */
-          addr_t        get_end_offset(); /* file offset for end of section */
-          void          extend(addr_t nbytes);         /* make section larger by extending the end */
-          void          extend_up_to(addr_t nbytes);      /* like extend() but more relaxed at EOF */
-          addr_t        write(FILE *f, addr_t offset, size_t bufsize, const void *buf);
-          addr_t        write(FILE *f, addr_t offset, const std::string &str);
-          addr_t        write(FILE *f, addr_t offset, char c);
-	  addr_t        write(FILE *f, addr_t offset, const SgFileContentList &buf);
-	  addr_t	write(FILE *f, addr_t offset, const SgUnsignedCharList &buf);
+		/* Functions for section extent within the file */
+		addr_t        get_size() const;
+		virtual void  set_size(addr_t);		/* Resize a section w/o regard to other sections or mapping */
+		addr_t        get_offset() const;
+		virtual void  set_offset(addr_t);		/* Move a section w/o regard to other sections or mapping */
+		addr_t        get_end_offset(); /* file offset for end of section */
+		void          extend(addr_t nbytes);         	/* make section larger by extending the end */
+		void          extend_up_to(addr_t nbytes);      /* like extend() but more relaxed at EOF */
+		addr_t        write(std::ostream&, addr_t offset, size_t bufsize, const void *buf) const;
+		addr_t        write(std::ostream&, addr_t offset, const std::string &str) const;
+		addr_t        write(std::ostream&, addr_t offset, char c) const;
+		addr_t        write(std::ostream&, addr_t offset, const SgFileContentList &buf) const;
+		addr_t	write(std::ostream&, addr_t offset, const SgUnsignedCharList &buf) const;
 
-       /* Functions for accessing content */
-          const unsigned char *content(addr_t offset, addr_t size);/*returns ptr to SIZE bytes starting at OFFSET */
-          const SgUnsignedCharList content_ucl(addr_t offset, addr_t size);/*returns ptr to SIZE bytes starting at OFFSET */
-          void                 content(addr_t offset, addr_t size, void *buf); /* copies content into BUF */
-          const char          *content_str(addr_t offset);    /* returns ptr to NUL-terminated string starting at OFFSET */
-          const ExtentMap&    congeal();                      /* congeal referenced areas into holes */
-          const ExtentMap&    uncongeal();                    /* uncongeal holes back into references */
+		/* Functions for accessing content */
+		const unsigned char *content(addr_t offset, addr_t size);/*returns ptr to SIZE bytes starting at OFFSET */
+		const SgUnsignedCharList content_ucl(addr_t offset, addr_t size);/*returns ptr to SIZE bytes starting at OFFSET */
+		void content(addr_t offset, addr_t size, void *buf); /* copies content into BUF */
+		const char *content_str(addr_t offset);    	/* returns ptr to NUL-terminated string starting at OFFSET */
+		const ExtentMap& congeal();                     /* congeal referenced areas into holes */
+		const ExtentMap& uncongeal();                   /* uncongeal holes back into references */
 
-       /* Functions related to mapping of sections into executable memory */
-          bool   	      is_mapped();                    /* True iff non-zero mapped address and size */
-          void   	      clear_mapped();                 /* Set mapped address and size to zero (unmapped)*/
-	  addr_t              get_mapped_size() const;
-          virtual void        set_mapped_size(addr_t);	      /* Set mapped size w/o regard to other section mappings */
-	  addr_t	      get_mapped_rva() const;
-	  virtual void        set_mapped_rva(addr_t);         /* Move a section w/o regard to other section mappings */
-	  addr_t 	      get_base_va() const;            /* Convenience to get header's base VA */
-	  addr_t 	      get_mapped_va();		      /* Like get_mapped_rva() except returns VA */
-          addr_t              get_va_offset(addr_t va);       /* Return file offset for specified virtual address */
-	  addr_t	      get_rva_offset(addr_t rva);     /* Return file offset for specified relative virtual address */
+		/* Functions related to mapping of sections into executable memory */
+		bool   	      is_mapped();                    	/* True iff non-zero mapped address and size */
+		void   	      clear_mapped();                 	/* Set mapped address and size to zero (unmapped)*/
+		addr_t        get_mapped_size() const;
+		virtual void  set_mapped_size(addr_t);	      	/* Set mapped size w/o regard to other section mappings */
+		addr_t	      get_mapped_rva() const;
+		virtual void  set_mapped_rva(addr_t);         	/* Move a section w/o regard to other section mappings */
+		addr_t 	      get_base_va() const;            	/* Convenience to get header's base VA */
+		addr_t 	      get_mapped_va();		      	/* Like get_mapped_rva() except returns VA */
+		addr_t        get_va_offset(addr_t va);       	/* Return file offset for specified virtual address */
+		addr_t	      get_rva_offset(addr_t rva);     	/* Return file offset for specified relative virtual address */
 
-       /* Accessors for private members */
-          SgAsmGenericString *get_name() const;		      /* Same as standard ROSETTA accessor */
-	  void set_name(SgAsmGenericString *s);		      /* Like std accessor but sets parent of 's' */
+		/* Accessors for private members */
+		SgAsmGenericString *get_name() const;		/* Same as standard ROSETTA accessor */
+		void set_name(SgAsmGenericString *s);		/* Like std accessor but sets parent of 's' */
 
-       /* Convenience functions */
-	  ExtentPair get_file_extent() const;		      /* Returns get_offset() and get_size() */
-	  ExtentPair get_mapped_extent() const;	              /* Returns get_mapped_rva() and get_mapped_size() */
+		/* Convenience functions */
+		ExtentPair get_file_extent() const;		/* Returns get_offset() and get_size() */
+		ExtentPair get_mapped_extent() const;	        /* Returns get_mapped_rva() and get_mapped_size() */
 
-     protected:
-          void ctor(SgAsmGenericFile*, SgAsmGenericHeader*, addr_t offset, addr_t size);
-
+	protected:
+		void ctor(SgAsmGenericFile*, SgAsmGenericHeader*);
+		void ctor(SgAsmGenericFile*, SgAsmGenericHeader*, addr_t offset, addr_t size);
 HEADER_GENERIC_SECTION_END
 
+
+
 HEADER_GENERIC_HEADER_START
 
      public:
           SgAsmGenericHeader(SgAsmGenericFile *ef, addr_t offset, addr_t size);
           virtual ~SgAsmGenericHeader();
 	  virtual bool reallocate();
-	  virtual void unparse(FILE*);
+	  virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
        // DQ (8/8/2008): We can't make this pure virtual since then we can't allocate this class.
@@ -867,6 +878,7 @@
           void remove_section(SgAsmGenericSection*); 	      /* Remove section from the file */
 
        /* Section lookup functions (plural) */
+	  SgAsmGenericSectionPtrList get_mapped_sections();
 	  SgAsmGenericSectionPtrList get_sections_by_id(int id);
 	  SgAsmGenericSectionPtrList get_sections_by_name(std::string, char sep=0);
 	  SgAsmGenericSectionPtrList get_sections_by_offset(addr_t offset, addr_t size);
@@ -897,63 +909,81 @@
 HEADER_GENERIC_HEADER_END
 
 HEADER_GENERIC_FILE_START
-     public:
-          SgAsmGenericFile(std::string file_name);
+	public:
+		SgAsmGenericFile(std::string file_name);
+		virtual ~SgAsmGenericFile();				/* Destructor deletes children and unmaps/closes file */
+		void reallocate();					/* Make consistent before calling unparse */
+		void unparse(std::ostream&) const;			/* Unparse the file -- mirror image of parsing */
+		void dump(FILE*);                                   	/* Print some debugging info */
 
-          virtual ~SgAsmGenericFile();                                /* Destructor deletes children and munmaps and closes file */
-          void unparse(const std::string &filename);		/* Unparse the file -- mirror image of parsing */
-          void dump(FILE*);                                   /* Print some debugging info */
+		/* File contents */
+		rose_addr_t get_current_size();				/* Current size based on defined sections */
+		rose_addr_t get_orig_size() const;              	/* Original size based on actual file size */
+		const SgFileContentList& content() {			/* Entire file contents */
+			return p_data;
+		}
+		SgFileContentList content(addr_t offset, addr_t size);	/* Partial file contents */
 
-       /* File contents */
-	  rose_addr_t get_current_size();			/* Current size based on defined sections */
-	  rose_addr_t get_orig_size() const;                    /* Original size based on actual file size */
-          const SgFileContentList& content() { return p_data; }     	/* Entire file contents */
-          SgFileContentList content(addr_t offset, addr_t size);	/* Partial file contents */
+		/* Section lookup functions (plural) */
+		SgAsmGenericSectionPtrList get_mapped_sections();
+		SgAsmGenericSectionPtrList get_sections(bool include_holes=true);
+		SgAsmGenericSectionPtrList get_sections_by_id(int id);
+		SgAsmGenericSectionPtrList get_sections_by_name(std::string, char sep='\0');
+		SgAsmGenericSectionPtrList get_sections_by_offset(addr_t offset, addr_t size);
+		SgAsmGenericSectionPtrList get_sections_by_rva(addr_t rva);
+		SgAsmGenericSectionPtrList get_sections_by_va(addr_t va);
 
-       /* Section lookup functions (plural) */
-	  SgAsmGenericSectionPtrList get_sections();
-	  SgAsmGenericSectionPtrList get_sections_by_id(int id);
-	  SgAsmGenericSectionPtrList get_sections_by_name(std::string, char sep='\0');
-	  SgAsmGenericSectionPtrList get_sections_by_offset(addr_t offset, addr_t size);
-	  SgAsmGenericSectionPtrList get_sections_by_rva(addr_t rva);
-	  SgAsmGenericSectionPtrList get_sections_by_va(addr_t va);
+		/* Section lookup functions (singular) */
+		SgAsmGenericSection *get_section_by_id(int id, size_t *nfound=0);
+		SgAsmGenericSection *get_section_by_name(const std::string&, char sep=0, size_t *nfound=0);
+		SgAsmGenericSection *get_section_by_offset(addr_t offset, addr_t size, size_t *nfound=0);
+		SgAsmGenericSection *get_section_by_rva(addr_t rva, size_t *nfound=0);
+		SgAsmGenericSection *get_section_by_va(addr_t va, size_t *nfound=0);
+		SgAsmGenericSection *get_best_section_by_va(addr_t va, size_t *nfound=0);
+		static SgAsmGenericSection *best_section_by_va(const SgAsmGenericSectionPtrList &sections, addr_t va);
 
-       /* Section lookup functions (singular) */
-	  SgAsmGenericSection *get_section_by_id(int id, size_t *nfound=0);
-	  SgAsmGenericSection *get_section_by_name(const std::string&, char sep=0, size_t *nfound=0);
-	  SgAsmGenericSection *get_section_by_offset(addr_t offset, addr_t size, size_t *nfound=0);
-          SgAsmGenericSection *get_section_by_rva(addr_t rva, size_t *nfound=0);
-	  SgAsmGenericSection *get_section_by_va(addr_t va, size_t *nfound=0);
-	  SgAsmGenericSection *get_best_section_by_va(addr_t va, size_t *nfound=0);
-	  static SgAsmGenericSection *best_section_by_va(const SgAsmGenericSectionPtrList &sections, addr_t va);
+		/* Section modification functions */
+		enum AddressSpace {					/* Bit flags for address spaces for shift_extend() */
+			ADDRSP_MEMORY = 0x0001,
+			ADDRSP_FILE   = 0x0002,
+			ADDRSP_ALL    = 0x0003,
+		};
+		enum Elasticity {					/* Elasticity argument for shift_extend() */
+			ELASTIC_NONE  = 0,				/* Nothing is elastic; other parts of space are shifted */
+			ELASTIC_UNREF = 1,				/* Unreferenced address space is elastic */
+			ELASTIC_HOLE  = 2,				/* Unreferenced and "hole" sections are elastic */
+		};
+		void shift_extend(SgAsmGenericSection *s, addr_t sa, addr_t sn)
+			{shift_extend(s, sa, sn, ADDRSP_ALL, ELASTIC_UNREF);}
+		void shift_extend(SgAsmGenericSection*, addr_t sa, addr_t sn, AddressSpace, Elasticity);
 
-	/* Section modification functions */
-	  void shift_extend(SgAsmGenericSection*, addr_t sa, addr_t sn, bool filespace, bool elastic_holes);
+		/* Holes (unreferenced regions in the file) */	
+		void congeal();                                     	/* Identify and freeze all unreferenced regions */
+		addr_t get_next_section_offset(addr_t offset);      	/* Find file offset for next section */
+		void add_hole(SgAsmGenericSection*);		      	/* Add section to list of holes */
+		void remove_hole(SgAsmGenericSection*);             	/* Remove section from list of holes */
+		void fill_holes();                                  	/* Find holes in file and create sections to fill them */
+		void unfill_holes();                                	/* Undoes what fill_holes() did */
 
-       /* Holes (unreferenced regions in the file) */	
-	  void congeal();                                     /* Identify and freeze all unreferenced regions after parsing */
-          addr_t get_next_section_offset(addr_t offset);      /* Find file offset for next section */
-	  void add_hole(SgAsmGenericSection*);		      /* Add section to list of holes */
-	  void remove_hole(SgAsmGenericSection*);             /* Remove section from list of holes */
-          void fill_holes();                                  /* Find holes in file and create sections to fill them */
-          void unfill_holes();                                /* Undoes what fill_holes() did, returning hole sections to unused pool */
+		/* Functions for file headers (a kind of section) */
+		void add_header(SgAsmGenericHeader*);               	/* Add a new file header to the list of headers */
+		void remove_header(SgAsmGenericHeader*);            	/* Remove file header from the file */
+		SgAsmGenericHeader *get_header(SgAsmGenericFormat::ExecFamily);/* Returns the specified header or exception */
+		const char *format_name();                          	/* Return a string describing the file format */
 
-       /* Functions for file headers (a kind of section) */
-          void add_header(SgAsmGenericHeader*);               /* Add a new file header to the list of headers for this file */
-          void remove_header(SgAsmGenericHeader*);            /* Remove file header from the file */
+		const SgAsmGenericFormat::fileDetails &get_sb() {
+			return p_sb;
+		}
+		void set_sb(const SgAsmGenericFormat::fileDetails &sb) {
+			printf("set_sb() not implemented!\n");
+			ROSE_ASSERT(false);
+		}
 
-          SgAsmGenericHeader *get_header(SgAsmGenericFormat::ExecFamily);                 /* Returns the specified header (exception if more than one) */
-          const char *format_name();                          /* Return a string describing the file format */
+		// DQ (8/26/2008): Added support for alternative section selection for use in disassembler.
+		SgAsmGenericSection* get_best_possible_section_by_va(addr_t va);
 
-          const SgAsmGenericFormat::fileDetails & get_sb() { return p_sb; }
-          void set_sb ( const SgAsmGenericFormat::fileDetails & sb ) { printf ("set_sb() not implemented! \n"); ROSE_ASSERT(false); }
-
-       // DQ (8/26/2008): Added support for alternative section selection for use in disassembler.
-          SgAsmGenericSection* get_best_possible_section_by_va(addr_t va);
-
-     private:
-          void ctor(std::string file_name);
-
+	private:
+		void ctor(std::string file_name);
 HEADER_GENERIC_FILE_END
 
 HEADER_GENERIC_FORMAT_START
@@ -980,80 +1010,76 @@
 
 HEADER_GENERIC_FORMAT_END
 
-HEADER_GENERIC_DLL_START
-     public:
-          SgAsmGenericDLL(SgAsmGenericString *s);
 
-       // Use the ones automatically generated by ROSETTA.
-       // virtual ~SgAsmGenericDLL() {}
 
-          virtual void dump(FILE*, const char *prefix, ssize_t idx);
+HEADER_GENERIC_DLL_START
+	public:
+		SgAsmGenericDLL(SgAsmGenericString *s);
+		virtual void dump(FILE*, const char *prefix, ssize_t idx);
+		void add_symbol(const std::string &s) 			/* Add a needed symbol to the import list for this DLL */
+			{p_symbols.push_back(s);}
 
-          void add_function(std::string fname) { p_funcs.push_back(fname); } /* Add a needed function to the import list for this DLL */
+		/* Override ROSETTA accessors */
+		SgAsmGenericString *get_name() const;
+		void set_name(SgAsmGenericString *s);
+HEADER_GENERIC_DLL_END
 
-       /* Accessors for protected/private data members */
-          SgAsmGenericString *get_name() const;
-          void set_name(SgAsmGenericString *s);
 
-HEADER_GENERIC_DLL_END
 
 HEADER_GENERIC_DLL_LIST_START
 HEADER_GENERIC_DLL_LIST_END
 
-HEADER_GENERIC_SYMBOL_START
 
-     public:
-          enum SymbolDefState {
-              SYM_UNDEFINED,                                      /* Symbol has not been defined yet */
-              SYM_TENTATIVE,                                      /* Does not have size/value yet (uninitialized C or Fortran common blks) */
-              SYM_DEFINED                                         /* Created and assigned storage */
-          };
 
-          enum SymbolType {
-              SYM_NO_TYPE,                                        /* No type or type is unknown */
-              SYM_DATA,                                           /* Normal variable definitions */
-              SYM_FUNC,                                           /* Function */
-              SYM_SECTION,                                        /* Section of a file */
-              SYM_FILE,                                           /* Name of a file */
-              SYM_ARRAY,                                          /* Array of some other type */
-              SYM_TLS,                                            /* Thread-local storage */
-              SYM_REGISTER                                        /* CPU register value (see Sparc) */
-          };
+HEADER_GENERIC_SYMBOL_START
+	public:
+		enum SymbolDefState {
+			SYM_UNDEFINED,		/* Symbol has not been defined yet */
+			SYM_TENTATIVE,          /* Does not have size/value yet (uninitialized C or Fortran common blks) */
+			SYM_DEFINED             /* Created and assigned storage */
+		};
 
-          enum SymbolBinding {
-              SYM_NO_BINDING,                                     /* Unknown binding */
-              SYM_LOCAL,
-              SYM_GLOBAL,
-              SYM_WEAK
-          };
+		enum SymbolType {
+			SYM_NO_TYPE,            /* No type or type is unknown */
+			SYM_DATA,               /* Normal variable definitions */
+			SYM_FUNC,               /* Function or other code */
+			SYM_SECTION,            /* Section of a file */
+			SYM_FILE,               /* Name of a file */
+			SYM_ARRAY,              /* Array of some other type */
+			SYM_TLS,                /* Thread-local storage */
+			SYM_REGISTER,           /* CPU register value (see Sparc) */
+			SYM_COMMON		/* Common block */
+		};
 
-	  // Rosetta-generated version doesn't set the name
-          //SgAsmGenericSymbol()
-	  //    : p_def_state(SYM_UNDEFINED), p_binding(SYM_NO_BINDING), p_type(SYM_NO_TYPE), p_value(0), p_size(0),
-          //      p_bound(NULL), p_name(NULL)
-	  //    {set_name(new SgAsmBasicString(""));}
-          SgAsmGenericSymbol(SgAsmGenericString *name)
-	      : p_def_state(SYM_UNDEFINED), p_binding(SYM_NO_BINDING), p_type(SYM_NO_TYPE), p_value(0), p_size(0),
-	        p_bound(NULL), p_name(NULL)
-	        {set_name(name);}
-          //virtual ~SgAsmGenericSymbol() {}
+		enum SymbolBinding {
+			SYM_NO_BINDING,         /* Unknown binding */
+			SYM_LOCAL,
+			SYM_GLOBAL,
+			SYM_WEAK
+		};
 
-          virtual void dump(FILE*, const char *prefix, ssize_t idx);
+		SgAsmGenericSymbol(SgAsmGenericString *name)
+			: p_def_state(SYM_UNDEFINED), p_binding(SYM_NO_BINDING), p_type(SYM_NO_TYPE), p_value(0), p_size(0),
+			p_bound(NULL), p_name(NULL)
+			{set_name(name);}
 
-          std::string stringifyDefState() const;
-          std::string stringifyType() const;
-          std::string stringifyBinding() const;
+		virtual void dump(FILE*, const char *prefix, ssize_t idx);
+		std::string stringifyDefState() const;
+		std::string stringifyType() const;
+		std::string stringifyBinding() const;
 
-       // Accessors
-          SgAsmGenericString *get_name() const; // same as ROSETTA-generated version
-          void set_name(SgAsmGenericString *s); // also sets s.parent
-
+		// Accessors
+		SgAsmGenericString *get_name() const; // same as ROSETTA-generated version
+		void set_name(SgAsmGenericString *s); // also sets s.parent
 HEADER_GENERIC_SYMBOL_END
 
+
+
 HEADER_GENERIC_SYMBOL_LIST_START
 HEADER_GENERIC_SYMBOL_LIST_END
 
 
+
 HEADER_BASIC_STRING_START
 	public:
 		//SgAsmBasicString() {ctor();}
@@ -1063,10 +1089,14 @@
 			: p_string(s) {ctor();}
 		// virtual ~SgAsmBasicString() {}
 		virtual void dump(FILE*, const char *prefix, ssize_t idx);
+		virtual std::string get_string() const;
+		virtual void set_string(const std::string&);
 	private:
 		void ctor();
 HEADER_BASIC_STRING_END
 
+
+
 HEADER_GENERIC_STRING_START
 	public:
 		//virtual ~SgAsmGenericString() {};
@@ -1081,6 +1111,8 @@
 		virtual void dump(FILE*, const char *prefix, ssize_t idx);
 HEADER_GENERIC_STRING_END
 
+
+
 HEADER_STRING_STORAGE_START
      public:
           SgAsmStringStorage(SgAsmGenericStrtab *strtab, const std::string &string, rose_addr_t offset)
@@ -1126,7 +1158,7 @@
 HEADER_GENERIC_STRTAB_START
 	public:
 		SgAsmGenericStrtab(SgAsmGenericSection *container)
-			: p_container(container) {}
+			: p_container(container), p_dont_free(0), p_num_freed(0) {}
 		virtual ~SgAsmGenericStrtab() {}
 
 		virtual void dump(FILE*, const char *prefix, ssize_t idx);
@@ -1138,6 +1170,7 @@
 		bool reallocate(bool shrink); /*allocate storage for all unallocated strings*/
 
 		/* Free list accessors. Overriding ROSETTA because get_freelist() must return a modifiable free list. */
+		const ExtentMap& get_freelist() const;
 		ExtentMap& get_freelist();
 
 		//These should be pure virtual but ROSETTA apparently doesn't support that (RPM 2008-10-03)
@@ -1153,183 +1186,167 @@
 // ***********************************************
 
 HEADER_ELF_HEADER_START
+	public:
+		/* File format of an ELF header. Byte order of members depends on e_ident value. This code comes directly from
+		 * "System V Application Binary Interface, Edition 4.1" and the FreeBSD elf(5) man page, and the "Executable and
+		 * Linkable Format (ELF) Portable Formats Specifications, Version 1.2" and not from any header file. */
+		struct Elf32FileHeader_disk {
+			unsigned char       e_ident_magic[4];       /* 0x7f, 'E', 'L', 'F' */
+			unsigned char       e_ident_file_class;     /* 1=>32-bit; 2=>64-bit; other is error */
+			unsigned char       e_ident_data_encoding;  /* 1=>LSB; 2=>MSB; other is error */
+			unsigned char       e_ident_file_version;   /* Format version number (same as e_version); must be 1 */
+			unsigned char       e_ident_padding[9];     /* padding to byte 16; must be zero */
+			uint16_t            e_type;                 /* object file type: relocatable, executable, lib, core */
+			uint16_t            e_machine;              /* required architecture for an individual file */
+			uint32_t            e_version;              /* object file version, currently zero or one */
+			uint32_t            e_entry;                /* entry virtual address or zero if none */
+			uint32_t            e_phoff;                /* file offset of program header table or zero if none */
+			uint32_t            e_shoff;                /* file offset of section header table or zero if none */
+			uint32_t            e_flags;                /* processor-specific flags (EF_* constants in docs) */
+			uint16_t            e_ehsize;               /* size of ELF header in bytes */
+			uint16_t            e_phentsize;            /* size of each entry in the program header table */
+			uint16_t            e_phnum;                /* number of program headers, or PN_XNUM, or zero */
+			uint16_t            e_shentsize;            /* size of each entry in the section header table */
+			uint16_t            e_shnum;                /* number of section headers, or zero for extended entries */
+			uint16_t            e_shstrndx;             /* index of name section, or SHN_UNDEF, or SHN_XINDEX */
+		} __attribute__((packed));
 
-     public:
-       /* File format of an ELF header. Byte order of members depends on e_ident value. This code comes directly from "System V
-        * Application Binary Interface, Edition 4.1" and the FreeBSD elf(5) man page, and the "Executable and Linkable Format (ELF)
-        * Portable Formats Specifications, Version 1.2" and not from any header file. */
-          struct Elf32FileHeader_disk {
-               unsigned char       e_ident_magic[4];       /* 0x7f, 'E', 'L', 'F' */
-               unsigned char       e_ident_file_class;     /* 1=>32-bit; 2=>64-bit; other is error */
-               unsigned char       e_ident_data_encoding;  /* 1=>LSB; 2=>MSB; other is error */
-               unsigned char       e_ident_file_version;   /* Format version number (same as 'version' member); must be one. */
-               unsigned char       e_ident_padding[9];     /* padding to align next member at byte offset 16; must be zero */
-               uint16_t            e_type;                 /* object file type: relocatable, executable, shared object, core, etc. */
-               uint16_t            e_machine;              /* required architecture for an individual file */
-               uint32_t            e_version;              /* object file version, currently zero or one */
-               uint32_t            e_entry;                /* entry virtual address or zero if none */
-               uint32_t            e_phoff;                /* file offset of program header (segment) table or zero if none */
-               uint32_t            e_shoff;                /* file offset of section header table or zero if none */
-               uint32_t            e_flags;                /* processor-specific flags (EF_* constants in documentation) */
-               uint16_t            e_ehsize;               /* size of ELF header in bytes */
-               uint16_t            e_phentsize;            /* size in bytes of each entry in the program header table */
-               uint16_t            e_phnum;                /* number of entries in the program header (segment) table, or PN_XNUM, or zero */
-               uint16_t            e_shentsize;            /* size in bytes of each entry in the section header table */
-               uint16_t            e_shnum;                /* number of entries in the section header table, or zero for extended entries */
-               uint16_t            e_shstrndx;             /* index of section containing section name strings, or SHN_UNDEF, or SHN_XINDEX */
-             } __attribute__((packed));
+		struct Elf64FileHeader_disk {
+			unsigned char       e_ident_magic[4];
+			unsigned char       e_ident_file_class;
+			unsigned char       e_ident_data_encoding;
+			unsigned char       e_ident_file_version;
+			unsigned char       e_ident_padding[9];
+			uint16_t            e_type;
+			uint16_t            e_machine;
+			uint32_t            e_version;
+			uint64_t            e_entry;
+			uint64_t            e_phoff;
+			uint64_t            e_shoff;
+			uint32_t            e_flags;
+			uint16_t            e_ehsize;
+			uint16_t            e_phentsize;
+			uint16_t            e_phnum;
+			uint16_t            e_shentsize;
+			uint16_t            e_shnum;
+			uint16_t            e_shstrndx;
+		} __attribute__((packed));
 
-          struct Elf64FileHeader_disk {
-               unsigned char       e_ident_magic[4];
-               unsigned char       e_ident_file_class;
-               unsigned char       e_ident_data_encoding;
-               unsigned char       e_ident_file_version;
-               unsigned char       e_ident_padding[9];
-               uint16_t            e_type;
-               uint16_t            e_machine;
-               uint32_t            e_version;
-               uint64_t            e_entry;
-               uint64_t            e_phoff;
-               uint64_t            e_shoff;
-               uint32_t            e_flags;
-               uint16_t            e_ehsize;
-               uint16_t            e_phentsize;
-               uint16_t            e_phnum;
-               uint16_t            e_shentsize;
-               uint16_t            e_shnum;
-               uint16_t            e_shstrndx;
-             } __attribute__((packed));
+		SgAsmElfFileHeader(SgAsmGenericFile *f, addr_t offset)
+			: SgAsmGenericHeader(f, offset, 0)
+			{ctor(f, offset);}
+		//virtual ~SgAsmElfFileHeader() {}
 
-#if USING_OLD_EXECUTABLE_FORMAT_SUPPORT
-       // DQ (8/10/2008): This constructor is implemented in sageSupport.C and will be removed later once the new IR nodes are integrated into use.
-       // SgAsmElfFileHeader ( Exec::ELF::ElfFileHeader* elf_file_header );
-#endif
+		uint64_t max_page_size();
+		virtual bool reallocate();
+		virtual void unparse(std::ostream&) const;
 
-          SgAsmElfFileHeader(SgAsmGenericFile *f, addr_t offset)   /* assume 32-bit for now and fix inside ctor() if necessary */
-             : SgAsmGenericHeader(f, offset, 0)
-             { ctor(f, offset); }
-       // virtual ~SgAsmElfFileHeader() {}
+		void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfFileHeader::Elf32FileHeader_disk*) const;
+		void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfFileHeader::Elf64FileHeader_disk*) const;
 
-          uint64_t max_page_size();
-	  virtual bool reallocate();
-          virtual void unparse(FILE*);
+		virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
-          void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfFileHeader::Elf32FileHeader_disk*);
-          void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfFileHeader::Elf64FileHeader_disk*);
+		SgAsmGenericSectionPtrList get_sectab_sections();
+		SgAsmGenericSectionPtrList get_segtab_sections();
 
-          virtual void dump(FILE*, const char *prefix, ssize_t idx);
+	private:
+		void ctor(SgAsmGenericFile *f, addr_t offset);
 
-	// Override what ROSETTA would generate because we can't have users modifying these in the AST!
-	  addr_t get_e_shoff() const {return p_e_shoff;}
-	  addr_t get_e_phoff() const {return p_e_phoff;}
-	  void set_e_shoff(addr_t); //checks that we're parsing
-	  void set_e_phoff(addr_t); //checks that we're parsing
+	public:
+		virtual const char *format_name();
+		static bool is_ELF(SgAsmGenericFile*);
+		static SgAsmElfFileHeader *parse(SgAsmGenericFile*);
+HEADER_ELF_HEADER_END
 
-     private:
-          void ctor(SgAsmGenericFile *f, addr_t offset);
 
-     public:
-       // Forward reference
-       // class Exec::ELF::ElfFileHeader;
-       //   AsmElfHeader
-       // SgAsmElfFileHeader ( Exec::ELF::ElfFileHeader* elf_file_header );
 
-       // Overloaded base class virtual function
-          const char *format_name();
-
-          static bool is_ELF(SgAsmGenericFile*);
-          static SgAsmElfFileHeader *parse(SgAsmGenericFile*);
-
-HEADER_ELF_HEADER_END
-
 HEADER_ELF_SECTION_TABLE_START
-     public:
-          SgAsmElfSectionTable(SgAsmElfFileHeader *fhdr);
-       // virtual ~SgAsmElfSectionTable() {}
+	public:
+		SgAsmElfSectionTable(SgAsmElfFileHeader *fhdr);
+		void add_section(SgAsmElfSection*);
+		rose_addr_t calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount) const;
+		virtual bool reallocate();
+		virtual void unparse(std::ostream&) const;
+		virtual void dump(FILE*, const char *prefix, ssize_t idx);
+	private:
+		void ctor();    
+HEADER_ELF_SECTION_TABLE_END
 
-	  rose_addr_t calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount);
-	  virtual bool reallocate();
-          virtual void unparse(FILE*);
-          virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
-     private:
-          void ctor();    
 
-HEADER_ELF_SECTION_TABLE_END
-
 HEADER_ELF_SECTION_TABLE_ENTRY_START
+	public:
+		/* Section types (host order). All other values are reserved. */
+		enum SectionType {
+			SHT_NULL        = 0,            /* Section header is inactive */
+			SHT_PROGBITS	= 1,            /* Info defined by the program; format and meaning determined by prog */
+			SHT_SYMTAB      = 2,            /* Complete symbol table */
+			SHT_STRTAB      = 3,            /* String table */
+			SHT_RELA        = 4,            /* Relocation entries with explicit addends (e.g., Elf32_Rela types) */
+			SHT_HASH        = 5,            /* Symbol hash table (used by dynamic linking) */
+			SHT_DYNAMIC     = 6,            /* Information for dynamic linking */
+			SHT_NOTE        = 7,            /* Information that marks the file in some way */
+			SHT_NOBITS      = 8,            /* Like SHT_PROGBITS but occupies no file space */
+			SHT_REL         = 9,            /* Relocation entries without explicit addends (e.g., Elf32_Rel types) */
+			SHT_SHLIB       = 10,           /* Reserved, unspecified semantics; Present only in non-conforming files */
+			SHT_DYNSYM      = 11,           /* Minimal set of dynamic linking symbols */
+			SHT_LOPROC      = 0x70000000,	/* Processor specific semantics */
+			SHT_HIPROC      = 0x7fffffff,
+			SHT_LOUSER      = 0x80000000,   /* Application specific semantics */
+			SHT_HIUSER      = 0xffffffff
+		};
 
-     public:
-       /* Section types (host order). All other values are reserved. */
-          enum SectionType {
-              SHT_NULL            = 0,                    /* Section header is inactive */
-              SHT_PROGBITS        = 1,                    /* Information defined by the program; format and meaning determined by prog */
-              SHT_SYMTAB          = 2,                    /* Complete symbol table */
-              SHT_STRTAB          = 3,                    /* String table */
-              SHT_RELA            = 4,                    /* Relocation entries with explicit addends (e.g., Elf32_Rela types) */
-              SHT_HASH            = 5,                    /* Symbol hash table (used by dynamic linking) */
-              SHT_DYNAMIC         = 6,                    /* Information for dynamic linking */
-              SHT_NOTE            = 7,                    /* Information that marks the file in some way */
-              SHT_NOBITS          = 8,                    /* Like SHT_PROGBITS but occupies no file space */
-              SHT_REL             = 9,                    /* Relocation entries without explicit addends (e.g., Elf32_Rel types) */
-              SHT_SHLIB           = 10,                   /* Reserved, unspecified semantics; Present only in non-conforming files */
-              SHT_DYNSYM          = 11,                   /* Minimal set of dynamic linking symbols */
-              SHT_LOPROC          = 0x70000000,           /* Processor specific semantics */
-              SHT_HIPROC          = 0x7fffffff,
-              SHT_LOUSER          = 0x80000000,           /* Application specific semantics */
-              SHT_HIUSER          = 0xffffffff
-          };
+		/* File format of an ELF Section header. Byte order of members depends on e_ident value in file header. This code
+		 * comes directly from "Executable and Linkable Format (ELF)", Portable Formats Specification, Version 1.1, Tool
+                 * Interface Standards (TIS) and not from any header file. The 64-bit structure is gleaned from the Linux
+                 * elf(5) man page. */
+		struct Elf32SectionTableEntry_disk {
+			uint32_t	sh_name;	/* 0x00 Section name; index into section header string table */
+			uint32_t        sh_type;        /* 0x04 Section contents and semantics (see SectionType enum) */
+			uint32_t        sh_flags;       /* 0x08 Bit flags */
+			uint32_t        sh_addr;        /* 0x0c Desired mapped address */
+			uint32_t        sh_offset;      /* 0x10 Section location in file unless sh_type==SHT_NOBITS */
+			uint32_t        sh_size;        /* 0x14 Section size in bytes */
+			uint32_t        sh_link;        /* 0x18 Section ID of another section; meaning depends on section type */
+			uint32_t        sh_info;        /* 0x1c Extra info depending on section type */
+			uint32_t        sh_addralign;   /* 0x20 Mapped alignment (0 and 1=>byte aligned); sh_addr must be aligned*/
+			uint32_t        sh_entsize;     /* 0x24 If non-zero, size in bytes of each array member in the section */
+		} __attribute__((packed));              /* 0x28 */
 
-       /* File format of an ELF Section header. Byte order of members depends on e_ident value in file header. This code comes
-        * directly from "Executable and Linkable Format (ELF)", Portable Formats Specification, Version 1.1, Tool Interface
-        * Standards (TIS) and not from any header file. The 64-bit structure is gleaned from the Linux elf(5) man page. */
-          struct Elf32SectionTableEntry_disk {
-              uint32_t            sh_name;                /* 0x00 Section name; index into section header string table */
-              uint32_t            sh_type;                /* 0x04 Section contents and semantics (see SectionType enum) */
-              uint32_t            sh_flags;               /* 0x08 Bit flags */
-              uint32_t            sh_addr;                /* 0x0c Desired mapped address */
-              uint32_t            sh_offset;              /* 0x10 Section location in file unless sh_type==SHT_NOBITS */
-              uint32_t            sh_size;                /* 0x14 Section size in bytes */
-              uint32_t            sh_link;                /* 0x18 Section ID of another section; meaning depends on section type */
-              uint32_t            sh_info;                /* 0x1c Extra info depending on section type */
-              uint32_t            sh_addralign;           /* 0x20 Mapped alignment (0 and 1=>byte aligned); sh_addr must be aligned */
-              uint32_t            sh_entsize;             /* 0x24 If non-zero, size in bytes of each array member in the section */
-          } __attribute__((packed));                      /* 0x28 */
+		struct Elf64SectionTableEntry_disk {
+			uint32_t	sh_name;	/* 0x00 see Elf32SectionTableEntry_disk */
+			uint32_t        sh_type;	/* 0x04 */
+			uint64_t        sh_flags;	/* 0x08 */
+			uint64_t        sh_addr;	/* 0x10 */
+			uint64_t        sh_offset;	/* 0x18 */
+			uint64_t        sh_size;	/* 0x20 */
+			uint32_t        sh_link;	/* 0x28 */
+			uint32_t        sh_info;	/* 0x2c */
+			uint64_t        sh_addralign;	/* 0x30 */
+			uint64_t        sh_entsize;	/* 0x38 */
+		} __attribute__((packed));		/* 0x40 */
 
-          struct Elf64SectionTableEntry_disk {
-              uint32_t            sh_name;		  /* 0x00 see Elf32SectionTableEntry_disk */
-              uint32_t            sh_type;		  /* 0x04 */
-              uint64_t            sh_flags;		  /* 0x08 */
-              uint64_t            sh_addr;		  /* 0x10 */
-              uint64_t            sh_offset;		  /* 0x18 */
-              uint64_t            sh_size;		  /* 0x20 */
-              uint32_t            sh_link;		  /* 0x28 */
-              uint32_t            sh_info;		  /* 0x2c */
-              uint64_t            sh_addralign;		  /* 0x30 */
-              uint64_t            sh_entsize;		  /* 0x38 */
-          } __attribute__((packed));			  /* 0x40 */
-
-
-          SgAsmElfSectionTableEntry(SgAsmExecutableFileFormat::ByteOrder sex, const SgAsmElfSectionTableEntry::Elf32SectionTableEntry_disk *disk);
-          SgAsmElfSectionTableEntry(SgAsmExecutableFileFormat::ByteOrder sex, const SgAsmElfSectionTableEntry::Elf64SectionTableEntry_disk *disk);
-
-       // virtual ~SgAsmElfSectionTableEntry() {};
-
-          void *encode(SgAsmExecutableFileFormat::ByteOrder sex, SgAsmElfSectionTableEntry::Elf32SectionTableEntry_disk *disk);
-          void *encode(SgAsmExecutableFileFormat::ByteOrder sex, SgAsmElfSectionTableEntry::Elf64SectionTableEntry_disk *disk);
-
-	  void update_from_section(SgAsmElfSection*);
-          virtual void dump(FILE*, const char *prefix, ssize_t idx);
-
-     private:
-          void ctor(SgAsmExecutableFileFormat::ByteOrder sex, const SgAsmElfSectionTableEntry::Elf32SectionTableEntry_disk *disk);
-          void ctor(SgAsmExecutableFileFormat::ByteOrder sex, const SgAsmElfSectionTableEntry::Elf64SectionTableEntry_disk *disk);
-
-
+		SgAsmElfSectionTableEntry(SgAsmExecutableFileFormat::ByteOrder sex,
+			const SgAsmElfSectionTableEntry::Elf32SectionTableEntry_disk *disk);
+		SgAsmElfSectionTableEntry(SgAsmExecutableFileFormat::ByteOrder sex,
+			const SgAsmElfSectionTableEntry::Elf64SectionTableEntry_disk *disk);
+		void *encode(SgAsmExecutableFileFormat::ByteOrder sex,
+		SgAsmElfSectionTableEntry::Elf32SectionTableEntry_disk *disk) const;
+		void *encode(SgAsmExecutableFileFormat::ByteOrder sex,
+		SgAsmElfSectionTableEntry::Elf64SectionTableEntry_disk *disk) const;
+		void update_from_section(SgAsmElfSection*);
+		virtual void dump(FILE*, const char *prefix, ssize_t idx);
+	private:
+		void ctor(SgAsmExecutableFileFormat::ByteOrder, const SgAsmElfSectionTableEntry::Elf32SectionTableEntry_disk*);
+		void ctor(SgAsmExecutableFileFormat::ByteOrder, const SgAsmElfSectionTableEntry::Elf64SectionTableEntry_disk*);
+		static const char *to_string(SectionType);
 HEADER_ELF_SECTION_TABLE_ENTRY_END
 
 HEADER_ELF_SECTION_START
 	public:
+		/* Constructor for a non-attached, not-parsed Elf section */
+		SgAsmElfSection(SgAsmGenericHeader *fhdr);
+
 		/* Constructor for size based on section table entry (normal sections) */
 		SgAsmElfSection(SgAsmElfFileHeader *fhdr, SgAsmElfSectionTableEntry *shdr);
 		SgAsmElfSection(SgAsmElfFileHeader *fhdr, SgAsmElfSegmentTableEntry *shdr);
@@ -1340,19 +1357,20 @@
 		//virtual ~ElfSection() {}
 
 		rose_addr_t calculate_sizes(size_t r32size, size_t r64size, const std::vector<size_t> &optsizes,
-					    size_t *entsize, size_t *required, size_t *optional, size_t *entcount);
-		virtual rose_addr_t calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount);
+					    size_t *entsize, size_t *required, size_t *optional, size_t *entcount) const;
+		virtual rose_addr_t calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount) const;
 		virtual bool reallocate();
 		virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
 		/* Convenience functions */
-		SgAsmElfFileHeader *get_elf_header();
+		SgAsmElfFileHeader *get_elf_header() const;
 
 		// DQ (8/22/2008): These are not automatically generated since one of them must be virtual.
 		SgAsmElfSection* get_linked_section () const;
 		virtual void set_linked_section(SgAsmElfSection*);
 
 	private:
+		void ctor();
 		void ctor(SgAsmElfSectionTableEntry*);
 		void ctor(SgAsmElfSegmentTableEntry*);
 HEADER_ELF_SECTION_END
@@ -1390,7 +1408,7 @@
 			: SgAsmGenericStrtab(containing_section)
 			{ctor();}
 		virtual ~SgAsmElfStrtab();
-		virtual void unparse(FILE*);
+		virtual void unparse(std::ostream&) const;
 		virtual SgAsmStringStorage *create_storage(addr_t offset, bool shared);
 		virtual addr_t get_storage_size(const SgAsmStringStorage*);
 		virtual void allocate_overlap(SgAsmStringStorage*);
@@ -1407,7 +1425,7 @@
 		virtual void dump(FILE*, const char *prefix, ssize_t idx);
 		virtual void set_size(addr_t newsize);
 		virtual bool reallocate();
-		virtual void unparse(FILE*);
+		virtual void unparse(std::ostream&) const;
 	private:
 		void ctor();
 HEADER_ELF_STRING_SECTION_END
@@ -1419,8 +1437,8 @@
 			{ctor(fhdr, shdr);}
 		//virtual ~SgAsmElfRelaSection() {}
 		using SgAsmElfSection::calculate_sizes;
-		virtual rose_addr_t calculate_sizes(size_t *total, size_t *required, size_t *optional, size_t *entcount);
-		virtual void unparse(FILE*);
+		virtual rose_addr_t calculate_sizes(size_t *total, size_t *required, size_t *optional, size_t *entcount) const;
+		virtual void unparse(std::ostream&) const;
 		virtual void dump(FILE*, const char *prefix, ssize_t idx);
 	private:
 		void ctor(SgAsmElfFileHeader*, SgAsmElfSectionTableEntry*);
@@ -1447,8 +1465,8 @@
 			{ctor(sex, disk);}
 		//virtual ~SgAsmElfDynamicEntry() {}
 
-		void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfRelaEntry::Elf32RelaEntry_disk*);
-		void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfRelaEntry::Elf64RelaEntry_disk*);
+		void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfRelaEntry::Elf32RelaEntry_disk*) const;
+		void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfRelaEntry::Elf64RelaEntry_disk*) const;
 
 		void dump(FILE *f, const char *prefix, ssize_t idx, SgAsmElfSymbolSection *symtab);
 		virtual void dump(FILE *f, const char *prefix, ssize_t idx)
@@ -1465,9 +1483,9 @@
 			{ctor(fhdr, shdr);}
 		//virtual ~SgAsmElfDynamicSection() {}
 		using SgAsmElfSection::calculate_sizes;
-		virtual rose_addr_t calculate_sizes(size_t *total, size_t *required, size_t *optional, size_t *entcount);
+		virtual rose_addr_t calculate_sizes(size_t *total, size_t *required, size_t *optional, size_t *entcount) const;
 		virtual void set_linked_section(SgAsmElfSection*);   /* Parsing happens here rather than in constructor */
-		virtual void unparse(FILE*);
+		virtual void unparse(std::ostream&) const;
 		virtual void dump(FILE*, const char *prefix, ssize_t idx);
 	private:
 		void ctor(SgAsmElfFileHeader*, SgAsmElfSectionTableEntry*);
@@ -1567,8 +1585,8 @@
        // virtual ~SgAsmElfDynamicEntry() {}
 
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
-          void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfDynamicEntry::Elf32DynamicEntry_disk*);
-          void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfDynamicEntry::Elf64DynamicEntry_disk*);
+          void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfDynamicEntry::Elf32DynamicEntry_disk*) const;
+          void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfDynamicEntry::Elf64DynamicEntry_disk*) const;
 	  const char *stringify_tag(EntryType);
 
      private:
@@ -1582,9 +1600,9 @@
 		SgAsmElfSegmentTable(SgAsmElfFileHeader *fhdr);
 		//virtual ~ElfSegmentTable() {}
 
-		rose_addr_t calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount);
+		rose_addr_t calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount) const;
 		virtual bool reallocate();
-		virtual void unparse(FILE*);
+		virtual void unparse(std::ostream&) const;
 		virtual void dump(FILE*, const char *prefix, ssize_t idx);
 	private:
 		void ctor();
@@ -1604,8 +1622,8 @@
               PT_PHDR             = 6,                    /* Segment contains the segment table itself (program header array) */
 
 	      /* OS- and Processor-specific ranges */
-	      PT_LOOS		  = 0x60000000,		  /* Values reserved for OS-specific semantics */
-	      PT_HIOS             = 0x6fffffff,
+              PT_LOOS             = 0x60000000,           /* Values reserved for OS-specific semantics */
+              PT_HIOS             = 0x6fffffff,
               PT_LOPROC           = 0x70000000,           /* Values reserved for processor-specific semantics */
               PT_HIPROC           = 0x7fffffff,
 
@@ -1664,8 +1682,8 @@
           SgAsmElfSegmentTableEntry(SgAsmExecutableFileFormat::ByteOrder sex, const SgAsmElfSegmentTableEntry::Elf64SegmentTableEntry_disk *disk);
        // virtual ~ElfSegmentTableEntry() {};
 
-          void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfSegmentTableEntry::Elf32SegmentTableEntry_disk*);
-          void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfSegmentTableEntry::Elf64SegmentTableEntry_disk*);
+          void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfSegmentTableEntry::Elf32SegmentTableEntry_disk*) const;
+          void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfSegmentTableEntry::Elf64SegmentTableEntry_disk*) const;
 	  void update_from_section(SgAsmElfSection*);
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
@@ -1687,9 +1705,10 @@
 		SgAsmElfSymbolSection(SgAsmElfFileHeader *fhdr, SgAsmElfSectionTableEntry *shdr);
 		//virtual ~SgAsmElfSymbolSection() {}
 		using SgAsmElfSection::calculate_sizes;
-		virtual rose_addr_t calculate_sizes(size_t *total, size_t *required, size_t *optional, size_t *nentries);
+		virtual rose_addr_t calculate_sizes(size_t *total, size_t *required, size_t *optional, size_t *nentries) const;
 		virtual void set_linked_section(SgAsmElfSection*);
-		virtual void unparse(FILE*);
+		virtual bool reallocate();
+		virtual void unparse(std::ostream&) const;
 		virtual void dump(FILE*, const char *prefix, ssize_t idx);
 	private:
 		void ctor(SgAsmElfSectionTableEntry*);
@@ -1707,11 +1726,13 @@
 		};
 
 		enum ElfSymType {
-			STT_NOTYPE  = 0,
-			STT_OBJECT  = 1,
-			STT_FUNC    = 2,
-			STT_SECTION = 3,
-			STT_FILE    = 4
+			STT_NOTYPE  	= 0,	/* unspecified type */
+			STT_OBJECT  	= 1,	/* data object */
+			STT_FUNC    	= 2,	/* code object */
+			STT_SECTION 	= 3,	/* associated with a section */
+			STT_FILE    	= 4,	/* name of a file */
+			STT_COMMON  	= 5,	/* common data object */
+			STT_TLS		= 6	/* thread-local data object */
 		};
 
 		struct Elf32SymbolEntry_disk {
@@ -1736,8 +1757,11 @@
 		SgAsmElfSymbol(SgAsmExecutableFileFormat::ByteOrder sex, const SgAsmElfSymbol::Elf64SymbolEntry_disk *disk);
 		//virtual ~SgAsmElfSymbol() {};
 
-		void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfSymbol::Elf32SymbolEntry_disk*, SgAsmGenericStrtab*);
-		void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfSymbol::Elf64SymbolEntry_disk*, SgAsmGenericStrtab*);
+		void reallocate(SgAsmGenericStrtab*);
+		void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfSymbol::Elf32SymbolEntry_disk*,
+			     SgAsmGenericStrtab*) const;
+		void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmElfSymbol::Elf64SymbolEntry_disk*,
+			     SgAsmGenericStrtab*) const;
 		virtual void dump(FILE *f, const char *prefix, ssize_t idx);
 		void dump(FILE*, const char *prefix, ssize_t idx, SgAsmGenericSection*);
 		SgAsmElfSymbol::ElfSymBinding get_elf_binding();
@@ -1767,7 +1791,7 @@
              } __attribute__((packed));
 
           SgAsmPERVASizePair(const SgAsmPERVASizePair::RVASizePair_disk *disk);
-          void *encode(SgAsmPERVASizePair::RVASizePair_disk *disk);
+          void *encode(SgAsmPERVASizePair::RVASizePair_disk *disk) const;
 
        // addr_t e_rva;
        // addr_t e_size;
@@ -1780,160 +1804,148 @@
 
 
 HEADER_PE_FILE_HEADER_START
+	public:
+		/* File format of a PE File Header. All fields are little endian. */
+		struct PEFileHeader_disk {
+			unsigned char e_magic[4];	/* magic number "PE\0\0" */
+			uint16_t    e_cpu_type;         /* e.g., 0x014c = Intel 386 */
+			uint16_t    e_nsections;        /* number of sections defined in the Section Table */
+			uint32_t    e_time;             /* time and date file was created or modified by the linker */
+			uint32_t    e_coff_symtab;      /* offset to COFF symbol table */
+			uint32_t    e_coff_nsyms;       /* number of symbols in COFF symbol table */
+			uint16_t    e_nt_hdr_size;      /* num remaining bytes in the header following the 'flags' field */
+			uint16_t    e_flags;            /* Bit flags: exe file, program/library image, fixed address, etc. */
+		} __attribute__((packed));
 
-     public:
-       // Overloaded base class virtual function
-          const char *format_name();
+		struct PE32OptHeader_disk {
+			uint16_t    e_opt_magic;        /* magic number */
+			uint16_t    e_lmajor;           /* linker version */
+			uint16_t    e_lminor;
+			uint16_t    e_code_size;        /* Size of .text or sum of all code sections */
+			uint32_t    e_data_size;        /* Sum size of initialized data */
+			uint32_t    e_bss_size;         /* Sum size of uninitialized data */
+			uint32_t    e_entrypoint_rva;   /* RVA="relative virtual address"; relative to 'image_base', below */
+			uint32_t    e_code_rva;         /* Address relative to image base for code section when memory mapped */
+			uint32_t    e_data_rva;         /* Address relative to image base for data section */
+			uint32_t    e_image_base;       /* Virtual base of image (first byte of file, DOS header). 64k aligned */
+			uint32_t    e_section_align;    /* Alignment of sections in memory. Power of two 512<=x<=256M */
+			uint32_t    e_file_align;       /* Alignment factor (in bytes) for image pages */
+			uint16_t    e_os_major;         /* OS version number required to run this image */
+			uint16_t    e_os_minor;
+			uint16_t    e_user_major;       /* User-specified at link time for differentiating between image revs */
+			uint16_t    e_user_minor;
+			uint16_t    e_subsys_major;     /* Subsystem version number */
+			uint16_t    e_subsys_minor;
+			uint32_t    e_reserved9;
+			uint32_t    e_image_size;       /* Virtual size (bytes) of the image inc. all headers; section_align */
+			uint32_t    e_header_size;      /* Total header size (DOS Header + PE Header + Section table */
+			uint32_t    e_file_checksum;    /* Checksum for entire file; Set to zero by the linker */
+			uint16_t    e_subsystem;        /* Unknown, Native, WindowsGUI, WindowsCharacter, OS/2 Character, etc. */
+			uint16_t    e_dll_flags;        /* Bit flags for library init/terminate per process or thread */
+			uint32_t    e_stack_reserve_size;/* Virtual memory reserved for stack; non-committed pages are guards */
+			uint32_t    e_stack_commit_size;/* Size of valid stack; other pages are guards; <= 'stack_reserve_size' */
+			uint32_t    e_heap_reserve_size;/* Size (bytes) of local heap to reserve */
+			uint32_t    e_heap_commit_size; /* Size (bytes) of valid local heap */
+			uint32_t    e_loader_flags;     /* Reserved, must be zero */
+			uint32_t    e_num_rvasize_pairs;/* Number of RVASizePair entries that follow this member; part of header */
+		} __attribute__((packed));
 
-          static bool is_PE (SgAsmGenericFile*);
-          static SgAsmPEFileHeader *parse(SgAsmGenericFile*);
+		struct PE64OptHeader_disk {
+			uint16_t    e_opt_magic;
+			uint16_t    e_lmajor;
+			uint16_t    e_lminor;
+			uint16_t    e_code_size;
+			uint32_t    e_data_size;
+			uint32_t    e_bss_size;
+			uint32_t    e_entrypoint_rva;
+			uint32_t    e_code_rva;
+			// uint32_t  e_data_rva;             /* Not present in PE32+ */
+			uint64_t    e_image_base;
+			uint32_t    e_section_align;
+			uint32_t    e_file_align;
+			uint16_t    e_os_major;
+			uint16_t    e_os_minor;
+			uint16_t    e_user_major;
+			uint16_t    e_user_minor;
+			uint16_t    e_subsys_major;
+			uint16_t    e_subsys_minor;
+			uint32_t    e_reserved9;
+			uint32_t    e_image_size;
+			uint32_t    e_header_size;
+			uint32_t    e_file_checksum;
+			uint16_t    e_subsystem;
+			uint16_t    e_dll_flags;
+			uint64_t    e_stack_reserve_size;
+			uint64_t    e_stack_commit_size;
+			uint64_t    e_heap_reserve_size;
+			uint64_t    e_heap_commit_size;
+			uint32_t    e_loader_flags;
+			uint32_t    e_num_rvasize_pairs;
+		} __attribute__((packed));
 
-       /* File format of a PE File Header. All fields are little endian. */
-          struct PEFileHeader_disk {
-               unsigned char e_magic[4];           /* magic number "PE\0\0" */
-               uint16_t    e_cpu_type;             /* e.g., 0x014c = Intel 386 */
-               uint16_t    e_nsections;            /* number of sections defined in the Section Table */
-               uint32_t    e_time;                 /* time and date file was created or modified by the linker */
-               uint32_t    e_coff_symtab;          /* offset to COFF symbol table */
-               uint32_t    e_coff_nsyms;           /* number of symbols in COFF symbol table */
-               uint16_t    e_nt_hdr_size;          /* number of remaining bytes in the header following the 'flags' field */
-               uint16_t    e_flags;                /* Bit flags: executable file, program/library image, fixed address, etc. */
-             } __attribute__((packed));
+		/* Bit flags for the PE header 'flags' member */
+		enum HeaderFlags {
+			HF_PROGRAM          = 0x0000,       /* Program image (no non-reserved bits set) */
+			HF_EXECUTABLE       = 0x0002,       /* Clear indicates can't load: link errors or incrementally linked */
+			HF_FIXED            = 0x0200,       /* Image *must* be loaded at image_base address or error */
+			HF_LIBRARY          = 0x2000,       /* Library image */
+			HF_RESERVED_MASK    = 0xddfd        /* Reserved bits */
+		};
 
-          struct PE32OptHeader_disk {
-               uint16_t    e_opt_magic;            /* magic number */
-               uint16_t    e_lmajor;               /* linker version */
-               uint16_t    e_lminor;
-               uint16_t    e_code_size;            /* Size of .text or sum of all code sections */
-               uint32_t    e_data_size;            /* Sum size of initialized data */
-               uint32_t    e_bss_size;             /* Sum size of uninitialized data */
-               uint32_t    e_entrypoint_rva;       /* RVA="relative virtual address"; relative to 'image_base', below */
-               uint32_t    e_code_rva;             /* Address relative to image base for code section when memory mapped */
-               uint32_t    e_data_rva;             /* Address relative to image base for data section */
-               uint32_t    e_image_base;           /* Virtual base of the image (first byte of file, DOS header). Multiple of 64k. */
-               uint32_t    e_section_align;        /* Alignment of sections in memory. Power of two 512<=x<=256M */
-               uint32_t    e_file_align;           /* Alignment factor (in bytes) for image pages */
-               uint16_t    e_os_major;             /* OS version number required to run this image */
-               uint16_t    e_os_minor;
-               uint16_t    e_user_major;           /* User-specified at link time. Useful for differentiating between image revisions */
-               uint16_t    e_user_minor;
-               uint16_t    e_subsys_major;         /* Subsystem version number */
-               uint16_t    e_subsys_minor;
-               uint32_t    e_reserved9;
-               uint32_t    e_image_size;           /* Virtual size (bytes) of the image inc. all headers; multiple of 'section_align' */
-               uint32_t    e_header_size;          /* Total header size (DOS Header + PE Header + Section table */
-               uint32_t    e_file_checksum;        /* Checksum for entire file; Set to zero by the linker */
-               uint16_t    e_subsystem;            /* Unknown, Native, WindowsGUI, WindowsCharacter, OS/2 Character, POSIX Character */
-               uint16_t    e_dll_flags;            /* Bit flags for library init/terminate per process or thread */
-               uint32_t    e_stack_reserve_size;   /* Virtual memory reserved for stack; non-committed pages are guards */
-               uint32_t    e_stack_commit_size;    /* Size (bytes) of valid stack; other pages are guards; <= 'stack_reserve_size' */
-               uint32_t    e_heap_reserve_size;    /* Size (bytes) of local heap to reserve */
-               uint32_t    e_heap_commit_size;     /* Size (bytes) of valid local heap */
-               uint32_t    e_loader_flags;         /* Reserved, must be zero */
-               uint32_t    e_num_rvasize_pairs;    /* Number of RVASizePair entries that follow this member; also part of the PE header */
-             } __attribute__((packed));
+		/* Values for the PE header 'subsystem' member */
+		enum Subsystem {
+			HF_SPEC_UNKNOWN     = 0x0000,       /* Specified as 'unknown' in the file */
+			HF_NATIVE           = 0x0001,       /* Native */
+			HF_WINGUI           = 0x0002,       /* Windows GUI */
+			HF_WINCHAR          = 0x0003,       /* Windows character */
+			HF_OS2CHAR          = 0x0005,       /* OS/2 character */
+			HF_POSIX            = 0x0007        /* POSIX character */
+		};
 
-          struct PE64OptHeader_disk {
-               uint16_t    e_opt_magic;
-               uint16_t    e_lmajor;
-               uint16_t    e_lminor;
-               uint16_t    e_code_size;
-               uint32_t    e_data_size;
-               uint32_t    e_bss_size;
-               uint32_t    e_entrypoint_rva;
-               uint32_t    e_code_rva;
-            // uint32_t  e_data_rva;             /* Not present in PE32+ */
-               uint64_t    e_image_base;
-               uint32_t    e_section_align;
-               uint32_t    e_file_align;
-               uint16_t    e_os_major;
-               uint16_t    e_os_minor;
-               uint16_t    e_user_major;
-               uint16_t    e_user_minor;
-               uint16_t    e_subsys_major;
-               uint16_t    e_subsys_minor;
-               uint32_t    e_reserved9;
-               uint32_t    e_image_size;
-               uint32_t    e_header_size;
-               uint32_t    e_file_checksum;
-               uint16_t    e_subsystem;
-               uint16_t    e_dll_flags;
-               uint64_t    e_stack_reserve_size;
-               uint64_t    e_stack_commit_size;
-               uint64_t    e_heap_reserve_size;
-               uint64_t    e_heap_commit_size;
-               uint32_t    e_loader_flags;
-               uint32_t    e_num_rvasize_pairs;
-             } __attribute__((packed));
+		/* Bit flags for the PE header 'dll_flags' member */
+		enum DLLFlags {
+			DLL_PROC_INIT       = 0x0001,       /* Per-process library initialization */
+			DLL_PROC_TERM       = 0x0002,       /* Per-process library termination */
+			DLL_THRD_INIT       = 0x0004,       /* Per-thread library initialization */
+			DLL_THRD_TERM       = 0x0008,       /* Per-thread library termination */
+			DLL_RESERVED_MASK   = 0xfff0        /* Reserved bits */
+		};
 
-          /* Bit flags for the PE header 'flags' member */
-          enum HeaderFlags {
-               HF_PROGRAM          = 0x0000,       /* Program image (no non-reserved bits set) */
-               HF_EXECUTABLE       = 0x0002,       /* Clear indicates can't load: either link errors or image is being incrementally linked */
-               HF_FIXED            = 0x0200,       /* Image *must* be loaded at image_base address or error */
-               HF_LIBRARY          = 0x2000,       /* Library image */
-               HF_RESERVED_MASK    = 0xddfd        /* Reserved bits */
-             };
+	public:
+		SgAsmPEFileHeader(SgAsmGenericFile *f, addr_t offset);
+		virtual ~SgAsmPEFileHeader();
 
-          /* Values for the PE header 'subsystem' member */
-          enum Subsystem {
-               HF_SPEC_UNKNOWN     = 0x0000,       /* Specified as 'unknown' in the file */
-               HF_NATIVE           = 0x0001,       /* Native */
-               HF_WINGUI           = 0x0002,       /* Windows GUI */
-               HF_WINCHAR          = 0x0003,       /* Windows character */
-               HF_OS2CHAR          = 0x0005,       /* OS/2 character */
-               HF_POSIX            = 0x0007        /* POSIX character */
-             };
+		virtual const char *format_name();
+		static bool is_PE (SgAsmGenericFile*);
+		static SgAsmPEFileHeader *parse(SgAsmGenericFile*);
+		void add_rvasize_pairs();
 
-          /* Bit flags for the PE header 'dll_flags' member */
-          enum DLLFlags {
-               DLL_PROC_INIT       = 0x0001,       /* Per-process library initialization */
-               DLL_PROC_TERM       = 0x0002,       /* Per-process library termination */
-               DLL_THRD_INIT       = 0x0004,       /* Per-thread library initialization */
-               DLL_THRD_TERM       = 0x0008,       /* Per-thread library termination */
-               DLL_RESERVED_MASK   = 0xfff0        /* Reserved bits */
-             };
+		virtual bool reallocate();
+		virtual void unparse(std::ostream&) const;
+		virtual void dump(FILE*, const char *prefix, ssize_t idx);
+		void create_table_sections();
 
-     public:
-          SgAsmPEFileHeader(SgAsmGenericFile *f, addr_t offset);
+		/* Override some ROSETTA accessors */
+		rose_addr_t get_e_coff_symtab() const {return p_e_coff_symtab;}
+		void set_e_coff_symtab(addr_t);
+		unsigned get_e_coff_nsyms() const {return p_e_coff_nsyms;}
+		void set_e_coff_nsyms(unsigned);
+		unsigned get_e_nsections() const {return p_e_nsections;}
+		void set_e_nsections(unsigned);
+		unsigned get_e_header_size() const {return p_e_header_size;}
+		void set_e_header_size(unsigned);
+		unsigned get_e_num_rvasize_pairs() const {return p_e_num_rvasize_pairs;}
+		void set_e_num_rvasize_pairs(unsigned);
+		unsigned get_e_lmajor() const {return p_e_lmajor;}
+		void set_e_lmajor(unsigned);
+		unsigned get_e_lminor() const {return p_e_lminor;}
+		void set_e_lminor(unsigned);
 
-       // DQ (8/16/2008): Implemented destructor to delete the p_rvasize_pairs
-          virtual ~SgAsmPEFileHeader();
-
-          void add_rvasize_pairs();
-          virtual void unparse(FILE*);
-          virtual void dump(FILE*, const char *prefix, ssize_t idx);
-	  void create_table_sections();
-
-       /* Accessors for protected/private data members */
-       // ExtendedDOSHeader *get_dos2_header() {return dos2_header;}
-       // void set_dos2_header(ExtendedDOSHeader *h) {dos2_header=h;}
-       // PESectionTable *get_section_table() {return section_table;}
-       // void set_section_table(PESectionTable *ot) {section_table=ot;}
-       // COFFSymtab *get_coff_symtab() {return coff_symtab;}
-       // void set_coff_symtab(COFFSymtab *st) {coff_symtab=st;}
-    
-    /* These are the native-format versions of the same members described in the PEFileHeader_disk format struct. */
-       // unsigned    e_cpu_type, e_nsections, e_time;
-       // addr_t      e_coff_symtab, e_nt_hdr_size;
-       // unsigned    e_coff_nsyms, e_flags, e_opt_magic;
-       // unsigned    e_lmajor, e_lminor, e_code_size, e_data_size, e_bss_size, e_entrypoint_rva, e_code_rva, e_data_rva;
-      //  addr_t      e_image_base;
-       // unsigned    e_section_align, e_file_align, e_os_major, e_os_minor, e_user_major, e_user_minor;
-       // unsigned    e_subsys_major, e_subsys_minor, e_reserved9, e_image_size, e_header_size, e_file_checksum, e_subsystem;
-       // unsigned    e_dll_flags, e_stack_reserve_size, e_stack_commit_size, e_heap_reserve_size, e_heap_commit_size;
-       // unsigned    e_loader_flags, e_num_rvasize_pairs;
-       // std::vector<RVASizePair> rvasize_pairs;
-
-     private:
-          void ctor(SgAsmGenericFile *f, addr_t offset);
-          void *encode(SgAsmPEFileHeader::PEFileHeader_disk*);
-          void *encode(SgAsmPEFileHeader::PE32OptHeader_disk*);
-          void *encode(SgAsmPEFileHeader::PE64OptHeader_disk*);
-       // ExtendedDOSHeader *dos2_header;
-       // PESectionTable *section_table;
-       // COFFSymtab *coff_symtab;
-
+	private:
+		void ctor(SgAsmGenericFile *f, addr_t offset);
+		void *encode(SgAsmPEFileHeader::PEFileHeader_disk*) const;
+		void *encode(SgAsmPEFileHeader::PE32OptHeader_disk*) const;
+		void *encode(SgAsmPEFileHeader::PE64OptHeader_disk*) const;
 HEADER_PE_FILE_HEADER_END
 
 HEADER_PE_SECTION_START
@@ -1952,30 +1964,171 @@
 
 HEADER_PE_SECTION_END
 
-HEADER_PE_IMPORT_SECTION_START
-     public:
-          SgAsmPEImportSection(SgAsmPEFileHeader *fhdr, addr_t offset, addr_t size, addr_t mapped_rva);
-       // virtual ~PEImportSection() {}
 
-          virtual void unparse(FILE*);
-          virtual void dump(FILE*, const char *prefix, ssize_t idx);
-          void add_dll(SgAsmPEDLL *d);
 
-       /* Accessors for protected/private data members */
-       // const std::vector<PEDLL*>& get_dlls() {return dlls;}
+HEADER_PE_IMPORT_DIRECTORY_START
+	public:
+		struct PEImportDirectory_disk {
+			uint32_t ilt_rva;		/* 0x00 Import Lookup Table RVA */
+			uint32_t time;			/* 0x04 Zero until the image is bound, then time stamp of the DLL */
+			uint32_t forwarder_chain;	/* 0x08 Index of the first forwarder chain */
+			uint32_t dll_name_rva;    	/* 0x0c address of NUL-terminated DLL name */
+			uint32_t iat_rva;		/* 0x10 Import Address Table (Thunk Table) RVA */
+		} __attribute__((packed));		/* 0x14 */
 
-     private:
-          void ctor(addr_t offset, addr_t size, addr_t mapped_rva);
-       // std::vector<PEDLL*> dlls;
+		SgAsmPEImportDirectory(SgAsmPEImportSection *isec, size_t idx)
+			{ctor(isec,idx);}
+		void *encode(SgAsmPEImportDirectory::PEImportDirectory_disk*) const;
+		virtual void unparse(std::ostream&, const SgAsmPEImportSection*) const;
+		virtual void dump(FILE*, const char *prefix, ssize_t idx);
+	private:
+		void ctor(SgAsmPEImportSection*, size_t idx);
+HEADER_PE_IMPORT_DIRECTORY_END
 
+
+
+HEADER_PE_IMPORT_ILT_ENTRY_START
+	// PE -> Import Table -> Import Lookup Table -> Entry
+	public:
+		enum ILTEntryType {
+			ILT_ORDINAL,			/* Entry is an ordinal */
+			ILT_HNT_ENTRY_RVA,		/* Entry is the RVA of a Hint/Name Pair in the Hint/Name Table */
+			ILT_BOUND_RVA,			/* Entry is the actual memory address of the symbol */
+		};
+
+		SgAsmPEImportILTEntry(SgAsmPEImportSection *isec, uint64_t entry_word)
+			{ctor(isec,entry_word);}
+		uint64_t encode(const SgAsmPEFileHeader*) const;
+		void unparse(std::ostream&, const SgAsmPEFileHeader *fhdr, rva_t rva, size_t idx) const;
+		virtual void dump(FILE *f, const char *prefix, ssize_t idx);
+	private:
+		void ctor(SgAsmPEImportSection*, uint64_t);
+HEADER_PE_IMPORT_ILT_ENTRY_END
+
+
+
+HEADER_PE_IMPORT_LOOKUP_TABLE_START
+	// PE -> Import Table -> Import Lookup Table   or
+	// PE -> Import Table -> Import Address Table
+	public:
+		SgAsmPEImportLookupTable(SgAsmPEImportSection *isec, rose_rva_t table_rva, size_t idir_idx, bool is_iat=false)
+			: p_entries(NULL)
+			{ctor(isec, table_rva, idir_idx, is_iat);}
+		void add_ilt_entry(SgAsmPEImportILTEntry*);
+		virtual void unparse(std::ostream&, const SgAsmPEFileHeader*, rose_rva_t) const;
+		virtual void dump(FILE *f, const char *prefix, ssize_t idx);
+	private:
+		void ctor(SgAsmPEImportSection*, rose_rva_t table_rva, size_t idir_idx, bool is_iat);
+HEADER_PE_IMPORT_LOOKUP_TABLE_END
+
+
+
+HEADER_PE_IMPORT_HNT_ENTRY_START
+	// PE -> Import Table -> Hint/Name Table -> Entry
+	public:
+		SgAsmPEImportHNTEntry(rose_rva_t offset)
+			{ctor(offset);}
+		void unparse(std::ostream&, rva_t rva) const;
+		virtual void dump(FILE*, const char *prefix, ssize_t idx);
+	private:
+		void ctor(rose_rva_t offset);
+HEADER_PE_IMPORT_HNT_ENTRY_END
+
+
+
+HEADER_PE_IMPORT_SECTION_START
+	public:
+		SgAsmPEImportSection(SgAsmPEFileHeader *fhdr, addr_t offset, addr_t size, addr_t mapped_rva)
+			: SgAsmPESection(fhdr, offset, size)
+			{ctor(offset, size, mapped_rva);}
+		virtual void unparse(std::ostream&) const;
+		virtual void dump(FILE*, const char *prefix, ssize_t idx);
+		void add_import_directory(SgAsmPEImportDirectory*);
+	private:
+		void ctor(addr_t offset, addr_t size, addr_t mapped_rva);
 HEADER_PE_IMPORT_SECTION_END
 
+
+
+HEADER_PE_EXPORT_DIRECTORY_START
+	public:
+		/* An Export Section begins with the Export Directory */
+		struct PEExportDirectory_disk {
+			uint32_t res1;         /* 0x00 Reserved, must be zero */
+			uint32_t timestamp;    /* 0x04 Time that export data was created */
+			uint16_t vmajor;       /* 0x08 Major version number (user defined) */
+			uint16_t vminor;       /* 0x0a Minor version number (user defined) */
+			uint32_t name_rva;     /* 0x0c Location of name of DLL */
+			uint32_t ord_base;     /* 0x10 Starting ordinal for exports in this image (usually 1) */
+			uint32_t expaddr_n;    /* 0x14 Number of entries in the export address table */
+			uint32_t nameptr_n;    /* 0x18 Number of entries in the name pointer table and ordinal table */
+			uint32_t expaddr_rva;  /* 0x1c Location of Export Address Table */
+			uint32_t nameptr_rva;  /* 0x20 Location of Export Name Pointer Table */
+			uint32_t ordinals_rva; /* 0x24 Location of Ordinal Table */
+		} __attribute__((packed));     /* 0x28 */
+
+		SgAsmPEExportDirectory(SgAsmPEExportSection *s)
+			{ctor(s);}
+		void dump(FILE *f, const char *prefix, ssize_t idx);
+	private:
+		void ctor(SgAsmPEExportSection*);
+HEADER_PE_EXPORT_DIRECTORY_END
+
+
+
+HEADER_PE_EXPORT_ENTRY_START
+	public:
+		SgAsmPEExportEntry(SgAsmGenericString *name, unsigned ordinal, rose_rva_t export_rva,
+				   SgAsmGenericString *forwarder)
+			{ctor(name, ordinal, export_rva, forwarder);}
+
+		void dump(FILE *f,const char *prefix,ssize_t idx);
+
+		/* Accessors. Override ROSETTA because we adjust parents. */
+		SgAsmGenericString *get_name() const {return p_name;}
+		void set_name(SgAsmGenericString*);
+		SgAsmGenericString *get_forwarder() const {return p_forwarder;}
+		void set_forwarder(SgAsmGenericString*);
+	private:
+		void ctor(SgAsmGenericString *name, unsigned ordinal, rose_rva_t export_rva, SgAsmGenericString *forwarder);
+HEADER_PE_EXPORT_ENTRY_END
+
+
+
+
+HEADER_PE_EXPORT_SECTION_START
+	public:
+		/* The PE Export Address Table is an array of expaddr_n 4-byte RVAs. If the address is not in the export section
+		 * (as defined by the address and length that are indicated in the NT Optional Header) then the RVA is an actual
+		 * address in code or data. Otherwise its a Forwarder RVA that names a symbol in another DLL. */
+		typedef uint32_t ExportAddress_disk;
+
+		/* The PE Export Name Pointer Table is an array of nameptr_n 4-byte RVAs pointing into the Export Name Table. The
+		 * pointers are ordered lexically to allow binary searches.  An export name is defined only if the export name
+		 * pointer table contains a pointer to it. */
+		typedef uint32_t ExportNamePtr_disk;
+
+		/* The PE Export Ordinal Table is an array of nameptr_n (yes) 2-byte indices into the Export Address Table biased
+		 * by ord_base. In other words, the ord_base must be subtracted from the ordinals to obtain true indices into the
+		 * Export Address Table. */
+		typedef uint16_t ExportOrdinal_disk;
+
+		SgAsmPEExportSection(SgAsmPEFileHeader *fhdr, addr_t offset, addr_t size, addr_t mapped_rva)
+			: SgAsmPESection(fhdr, offset, size)
+			{ctor(offset, size, mapped_rva);}
+
+		virtual void dump(FILE*, const char *prefix, ssize_t idx);
+		void add_entry(SgAsmPEExportEntry*);
+	private:
+		void ctor(addr_t offset, addr_t size, addr_t mapped_rva);
+HEADER_PE_EXPORT_SECTION_END
+
 HEADER_PE_SECTION_TABLE_START
      public:
           SgAsmPESectionTable(SgAsmPEFileHeader *fhdr, addr_t offset, addr_t size);
        // virtual ~SgAsmPESectionTable() {}
 
-          virtual void unparse(FILE*);
+          virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
   private:
@@ -1988,7 +2141,7 @@
           SgAsmCoffSymbolTable(SgAsmPEFileHeader *fhdr);
        // virtual ~COFFSymtab() {}
 
-          virtual void unparse(FILE*);
+          virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
        /* Accessors for protected/private data members */
@@ -2002,60 +2155,7 @@
 
 HEADER_PE_COFF_SYMBOL_TABLE_END
 
-HEADER_PE_IMPORT_HINT_NAME_START
-     public:
-       /* Hint/name pairs */
-          struct PEImportHintName_disk {
-               uint16_t            hint;  /* Possible index into lib's export name pointer table */
-            /* NUL-terminated name follows */
-            /* Optional byte to pad struct to an even number of bytes */
-             };
 
-          SgAsmPEImportHintName(SgAsmGenericSection*, addr_t offset);
-       // virtual ~PEImportHintName() {};
-
-          void unparse(FILE *f, SgAsmGenericSection*, addr_t spos); /*not the standard unparse() function*/
-          virtual void dump(FILE*, const char *prefix, ssize_t idx);
-
-       /* Accessors for protected/private data members */
-       // void set_name(std::string name) {this->name=name;}
-       // std::string get_name() {return name;}
-
-     private:
-          void ctor(SgAsmGenericSection*, addr_t offset);
-       // unsigned hint;
-       // std::string name;
-       // unsigned char padding;
-
-HEADER_PE_IMPORT_HINT_NAME_END
-
-HEADER_PE_IMPORT_DIRECTORY_START
-
-     public:
-          struct PEImportDirectory_disk {
-               uint32_t            hintnames_rva;   /* address (RVA) of array of addresses (RVAs) of hint/name pairs */
-               uint32_t            time;
-               uint32_t            forwarder_chain;
-               uint32_t            dll_name_rva;    /* address of NUL-terminated library name */
-               uint32_t            bindings_rva;    /* address (RVA) of array of object addresses after binding to DLL */
-             } __attribute__((packed));
-
-          SgAsmPEImportDirectory(const SgAsmPEImportDirectory::PEImportDirectory_disk *disk);
-       // virtual ~PEImportDirectory() {}
-
-          void *encode(SgAsmPEImportDirectory::PEImportDirectory_disk*);
-          virtual void dump(FILE*, const char *prefix, ssize_t idx);
-
-       /* Native versions of the fields in PEImportDirectory_disk */
-       // addr_t              hintnames_rva, bindings_rva, dll_name_rva;
-       // time_t              time;
-       // unsigned            forwarder_chain;
-
-     private:
-          void ctor(const SgAsmPEImportDirectory::PEImportDirectory_disk*);
-
-HEADER_PE_IMPORT_DIRECTORY_END
-
 HEADER_PE_EXTENDED_DOS_HEADER_START
 
      public:
@@ -2064,15 +2164,15 @@
                uint16_t    e_oemid;        /* 0x04 OEM Identifier */
                uint16_t    e_oeminfo;      /* 0x06 other OEM information; oemid specific */
                uint16_t    e_res2[10];     /* 0x08 reserved */
-               uint32_t    e_lfanew;       /* 0x1c file offset of new exe (PE) header */
-             } __attribute__((packed));    /* 0x20 */
+               uint32_t    e_lfanew;       /* 0x12 file offset of new exe (PE) header */
+             } __attribute__((packed));    /* 0x16 */
 
      public:
           SgAsmPEExtendedDOSHeader(SgAsmGenericFile *f, addr_t offset);
        // virtual ~SgAsmPEExtendedDOSHeader() {}
 
-          void *encode(SgAsmPEExtendedDOSHeader::ExtendedDOSHeader_disk*);
-          virtual void unparse(FILE*);
+          void *encode(SgAsmPEExtendedDOSHeader::ExtendedDOSHeader_disk*) const;
+         virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
      private:
@@ -2134,7 +2234,7 @@
           SgAsmPESectionTableEntry(const SgAsmPESectionTableEntry::PESectionTableEntry_disk *disk);
        // virtual ~SgAsmPESectionTableEntry() {};
 
-          void *encode(SgAsmPESectionTableEntry::PESectionTableEntry_disk*);
+          void *encode(SgAsmPESectionTableEntry::PESectionTableEntry_disk*) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
     
        /* These are the native-format versions of the same members described in the PESectionTableEntry_disk struct. */
@@ -2147,33 +2247,8 @@
 
 HEADER_PE_SECTION_TABLE_ENTRY_END
 
-HEADER_PE_DLL_START
-     public:
-          SgAsmPEDLL(SgAsmGenericString *name);
-       // virtual ~SgAsmPEDLL() {}
 
-          virtual void dump(FILE*, const char *prefix, ssize_t idx);
-          void add_hintname_rva(addr_t a);
-          void add_hintname(SgAsmPEImportHintName *hn);
-          void add_binding(addr_t a);
 
-       /* Accessors for protected/private data members */
-       // PEImportDirectory *get_idir() {return idir;}
-       // void set_idir(PEImportDirectory *d) {idir=d;}
-       // const std::vector<addr_t>& get_hintname_rvas() const {return hintname_rvas;}
-       // const std::vector<PEImportHintName*>& get_hintnames() const {return hintnames;}
-       // const std::vector<addr_t>& get_bindings() const {return bindings;}
-
-  // private:
-       // PEImportDirectory *idir;
-       // std::vector<addr_t> hintname_rvas;          /* RVAs for the hint/name pairs of the DLL functions */
-       // std::vector<PEImportHintName*> hintnames;   /* The hint/name pairs */
-       // std::vector<addr_t> bindings;               /* Bindings (RVA) for each function */
-	  void ctor();
-HEADER_PE_DLL_END
-
-
-
 HEADER_PE_COFF_SYMBOL_LIST_START
 HEADER_PE_COFF_SYMBOL_LIST_END
 
@@ -2200,7 +2275,7 @@
 
           SgAsmCoffSymbol(SgAsmPEFileHeader *fhdr, SgAsmGenericSection *symtab, SgAsmGenericSection *strtab, size_t idx);
        // virtual ~COFFSymbol() {}
-          void *encode(SgAsmCoffSymbol::COFFSymbol_disk*);
+          void *encode(SgAsmCoffSymbol::COFFSymbol_disk*) const;
           virtual void dump(FILE *f, const char *prefix, ssize_t idx);
 
        /* Auxilliary data for the symbol */
@@ -2226,7 +2301,7 @@
 			: SgAsmGenericStrtab(containing_section)
 			{}
 		virtual ~SgAsmCoffStrtab();
-		virtual void unparse(FILE*);
+		virtual void unparse(std::ostream&) const;
 		virtual SgAsmStringStorage *create_storage(addr_t offset, bool shared);
 		virtual addr_t get_storage_size(const SgAsmStringStorage*);
 HEADER_COFF_STRING_TABLE_END
@@ -2240,7 +2315,7 @@
 		virtual bool reallocate();
 		virtual void dump(FILE*, const char *prefix, ssize_t idx);
 		virtual void set_size(addr_t newsize);
-	        virtual void unparse(FILE*);
+	        virtual void unparse(std::ostream&) const;
 	private:
 		void ctor();
 HEADER_PE_STRING_SECTION_END
@@ -2324,7 +2399,7 @@
           SgAsmNEFileHeader(SgAsmGenericFile *f, addr_t offset);
        // virtual ~NEFileHeader() {}
 
-          virtual void unparse(FILE*);
+          virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
        // virtual const char *format_name() {return "NE";}
 
@@ -2351,7 +2426,7 @@
 
      private:
           void ctor(SgAsmGenericFile *f, addr_t offset);
-          void *encode(SgAsmNEFileHeader::NEFileHeader_disk*);
+          void *encode(SgAsmNEFileHeader::NEFileHeader_disk*) const;
 
        // ExtendedDOSHeader *dos2_header;
        // NESectionTable *section_table;
@@ -2367,7 +2442,7 @@
           SgAsmNESection(SgAsmNEFileHeader*, addr_t offset, addr_t size);
        // virtual ~NESection() {}
 
-          virtual void unparse(FILE*);
+          virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
        /* Accessors for protected/private data */
@@ -2386,7 +2461,7 @@
           SgAsmNESectionTable(SgAsmNEFileHeader *fhdr);
        // virtual ~NESectionTable() {}
 
-          virtual void unparse(FILE*);
+          virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
      private:
@@ -2399,7 +2474,7 @@
           SgAsmNENameTable(SgAsmNEFileHeader *fhdr, addr_t offset);
        // virtual ~NENameTable() {}
 
-          virtual void unparse(FILE*);
+          virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
           std::vector<std::string> get_names_by_ordinal(unsigned ordinal);
 
@@ -2415,7 +2490,7 @@
           SgAsmNEModuleTable(SgAsmNEFileHeader *fhdr, addr_t offset, addr_t size, SgAsmNEStringTable *strtab);
        // virtual ~NEModuleTable() {}
 
-          virtual void unparse(FILE*);
+          virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
      private:
@@ -2430,7 +2505,7 @@
           SgAsmNEStringTable(SgAsmNEFileHeader *fhdr, addr_t offset, addr_t length);
        // virtual ~NEStringTable() {}
 
-       // virtual void unparse(FILE*); /*not needed; use parent's implementation*/
+       // virtual void unparse(std::ostream&); /*not needed; use parent's implementation*/
 
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
           std::string get_string(addr_t offset);
@@ -2446,7 +2521,7 @@
        // virtual ~NEEntryTable() {}
 
           void populate_entries();
-          virtual void unparse(FILE*);
+          virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
      private:
@@ -2462,7 +2537,7 @@
           SgAsmNERelocTable(SgAsmNEFileHeader *fhdr, addr_t offset);
        // virtual ~NERelocTable() {}
 
-          virtual void unparse(FILE*);
+          virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
      private:
@@ -2482,8 +2557,8 @@
           SgAsmNEExtendedDOSHeader(SgAsmGenericFile *f, addr_t offset);
        // virtual ~ExtendedDOSHeader() {};
 
-          void *encode(SgAsmNEExtendedDOSHeader::ExtendedDOSHeader_disk*);
-          virtual void unparse(FILE*);
+          void *encode(SgAsmNEExtendedDOSHeader::ExtendedDOSHeader_disk*) const;
+          virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
        /* These are the native-format versions of the same members described in the ExtendedDOSHeader_disk struct. */
@@ -2605,7 +2680,7 @@
           SgAsmNERelocEntry(SgAsmGenericSection *relocs, addr_t at, addr_t *rec_size);
 
           void ctor(SgAsmGenericSection*, addr_t at, addr_t *rec_size);
-          addr_t unparse(FILE*, SgAsmGenericSection*, addr_t spos);
+          addr_t unparse(std::ostream&, const SgAsmGenericSection*, addr_t spos) const;
           void dump(FILE*, const char *prefix, ssize_t idx);
 
        // NERelocSrcType      src_type;       /* low nibble of first byte of relocation record */
@@ -2652,7 +2727,7 @@
           SgAsmNESectionTableEntry(const SgAsmNESectionTableEntry::NESectionTableEntry_disk *disk);
        // virtual ~NESectionTableEntry() {};
 
-          void *encode(SgAsmNESectionTableEntry::NESectionTableEntry_disk*);
+          void *encode(SgAsmNESectionTableEntry::NESectionTableEntry_disk*) const;
           virtual void dump(FILE *f, const char *prefix, ssize_t idx) {dump(f, prefix, idx, NULL);}
           void dump(FILE*, const char *prefix, ssize_t idx, SgAsmNEFileHeader *fhdr);
 
@@ -2752,7 +2827,7 @@
           SgAsmLEFileHeader(SgAsmGenericFile *f, addr_t offset);
        // virtual ~LEFileHeader() {}
 
-          virtual void unparse(FILE*);
+          virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
        // virtual const char *format_name();
 
@@ -2786,7 +2861,7 @@
 
      private:
           void ctor(SgAsmGenericFile *f, addr_t offset);
-          void *encode(SgAsmExecutableFileFormat::ByteOrder sex, SgAsmLEFileHeader::LEFileHeader_disk*);
+          void *encode(SgAsmExecutableFileFormat::ByteOrder sex, SgAsmLEFileHeader::LEFileHeader_disk*) const;
 
        // ExtendedDOSHeader *dos2_header;
        // LESectionTable *section_table;
@@ -2803,7 +2878,7 @@
           SgAsmLESection(SgAsmLEFileHeader*, addr_t offset, addr_t size);
        // virtual ~LESection() {}
 
-       // virtual void unparse(FILE*); /*nothing special to do*/
+       // virtual void unparse(std::ostream&) const; /*nothing special to do*/
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
        /* Accessors for protected/private data */
@@ -2820,7 +2895,7 @@
           SgAsmLESectionTable(SgAsmLEFileHeader *fhdr, addr_t offset, addr_t size);
        // virtual ~LESectionTable() {}
 
-          virtual void unparse(FILE*);
+          virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
      private:
@@ -2840,7 +2915,7 @@
           SgAsmLENameTable(SgAsmLEFileHeader *fhdr, addr_t offset);
        // virtual ~LENameTable() {}
 
-          virtual void unparse(FILE*);
+          virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
      private:
@@ -2856,7 +2931,7 @@
           SgAsmLEPageTable(SgAsmLEFileHeader *fhdr, addr_t offset, addr_t size);
        // virtual ~LEPageTable() {}
 
-          virtual void unparse(FILE*);
+          virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
           SgAsmLEPageTableEntry *get_page(size_t idx);
 
@@ -2872,7 +2947,7 @@
           SgAsmLEEntryTable(SgAsmLEFileHeader *fhdr, addr_t offset);
        // virtual ~LEEntryTable() {}
 
-          virtual void unparse(FILE*);
+          virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
      private:
@@ -2888,7 +2963,7 @@
           SgAsmLERelocTable(SgAsmLEFileHeader *fhdr, addr_t offset);
        // virtual ~LERelocTable() {}
 
-       // virtual void unparse(FILE*);
+       // virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
      private:
@@ -2916,7 +2991,7 @@
           SgAsmLEPageTableEntry(SgAsmExecutableFileFormat::ByteOrder sex, const SgAsmLEPageTableEntry::LEPageTableEntry_disk *disk);
 
           void dump(FILE*, const char *prefix, ssize_t idx);
-          void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmLEPageTableEntry::LEPageTableEntry_disk*);
+          void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmLEPageTableEntry::LEPageTableEntry_disk*) const;
 
        // unsigned get_pageno() {return pageno;}
 
@@ -2944,7 +3019,7 @@
           SgAsmLEEntryPoint(SgAsmExecutableFileFormat::ByteOrder sex, const SgAsmLEEntryPoint::LEEntryPoint_disk *disk);
           SgAsmLEEntryPoint(SgAsmExecutableFileFormat::ByteOrder sex, unsigned flags);
 
-          addr_t unparse(FILE*, SgAsmExecutableFileFormat::ByteOrder, SgAsmGenericSection*, addr_t spos);
+          addr_t unparse(std::ostream&, SgAsmExecutableFileFormat::ByteOrder, const SgAsmGenericSection*, addr_t spos) const;
           void dump(FILE*, const char *prefix, ssize_t idx);
 
      private:
@@ -3003,7 +3078,7 @@
           SgAsmLESectionTableEntry(SgAsmExecutableFileFormat::ByteOrder sex, const SgAsmLESectionTableEntry::LESectionTableEntry_disk *disk);
        // virtual ~LESectionTableEntry() {};
 
-          void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmLESectionTableEntry::LESectionTableEntry_disk*);
+          void *encode(SgAsmExecutableFileFormat::ByteOrder, SgAsmLESectionTableEntry::LESectionTableEntry_disk*) const;
           virtual void dump(FILE *f, const char *prefix, ssize_t idx);
     
        /* These are the native-format versions of the same members described in the NESectionTableEntry_disk struct. */
@@ -3050,7 +3125,7 @@
           SgAsmDOSFileHeader(SgAsmGenericFile *f, addr_t offset);
        // virtual ~DOSFileHeader() {}
 
-          virtual void unparse(FILE*);
+          virtual void unparse(std::ostream&) const;
           virtual void dump(FILE*, const char *prefix, ssize_t idx);
 
        // Required function to overload base class (ROSETTA does not permit the base class function to be pure virtual, as I recall)
@@ -3071,7 +3146,7 @@
 
      private:
           void ctor(SgAsmGenericFile *f, addr_t offset);
-          void *encode(SgAsmDOSFileHeader::DOSFileHeader_disk*);
+          void *encode(SgAsmDOSFileHeader::DOSFileHeader_disk*) const;
 
 HEADER_DOS_HEADER_END
 
@@ -3344,8 +3419,141 @@
 
 
 
+// ************************************
+//           DWARF SUPPORT
+// ************************************
 
+HEADER_DWARF_INFORMATION_START
+HEADER_DWARF_INFORMATION_END
 
+HEADER_DWARF_COMPILATION_UNIT_START
+
+     public:
+          SgAsmDwarfConstructList* get_children();
+
+HEADER_DWARF_COMPILATION_UNIT_END
+
+HEADER_DWARF_COMPILATION_UNIT_LIST_START
+HEADER_DWARF_COMPILATION_UNIT_LIST_END
+
+HEADER_DWARF_MACRO_START
+HEADER_DWARF_MACRO_END
+
+HEADER_DWARF_LINE_START
+HEADER_DWARF_LINE_END
+
+HEADER_DWARF_MACRO_LIST_START
+HEADER_DWARF_MACRO_LIST_END
+
+HEADER_DWARF_LINE_LIST_START
+
+       // Once the maps are setup using a valid SgAsmDwarfCompilationUnit, NULL is an acceptable value.
+      //! Support for building maps to and from instruction addresses to source positions (files, line numbers, column numbers).
+          static DwarfInstructionSourceMapReturnType buildInstructionAddressSourcePositionMaps( SgAsmDwarfCompilationUnit* dwarf_cu = NULL );
+
+      //! Output information about instruction address <--> source position
+          void display( const std::string & label );
+
+          static std::pair<uint64_t,uint64_t> instructionRange();
+          static std::pair<LineColumnFilePosition,LineColumnFilePosition> sourceCodeRange( int file_id );
+
+          static uint64_t sourceCodeToAddress ( FileIdLineColumnFilePosition sourcePosition );
+          static FileIdLineColumnFilePosition addressToSourceCode ( uint64_t address );
+
+HEADER_DWARF_LINE_LIST_END
+
+HEADER_DWARF_CONSTRUCT_START
+
+     public:
+      //! Factory pattern to build IR nodes based on the tag
+          static SgAsmDwarfConstruct* createDwarfConstruct( int tag, int nesting_level, uint64_t offset, uint64_t overall_offset );
+
+          virtual SgAsmDwarfConstructList* get_children();
+
+HEADER_DWARF_CONSTRUCT_END
+
+HEADER_DWARF_CONSTRUCT_LIST_START
+HEADER_DWARF_CONSTRUCT_LIST_END
+
+HEADER_DWARF_SUBPROGRAM_START
+
+     public:
+          SgAsmDwarfConstructList* get_children();
+
+HEADER_DWARF_SUBPROGRAM_END
+
+HEADER_DWARF_STRUCTURE_TYPE_START
+
+     public:
+          SgAsmDwarfConstructList* get_children();
+
+HEADER_DWARF_STRUCTURE_TYPE_END
+
+HEADER_DWARF_ARRAY_TYPE_START
+
+     public:
+          SgAsmDwarfConstructList* get_children();
+
+HEADER_DWARF_ARRAY_TYPE_END
+
+HEADER_DWARF_LEXICAL_BLOCK_START
+
+     public:
+          SgAsmDwarfConstructList* get_children();
+
+HEADER_DWARF_LEXICAL_BLOCK_END
+
+
+HEADER_DWARF_INLINED_SUBROUTINE_START
+
+     public:
+          SgAsmDwarfConstructList* get_children();
+
+HEADER_DWARF_INLINED_SUBROUTINE_END
+
+HEADER_DWARF_ENUMERATION_TYPE_START
+
+     public:
+          SgAsmDwarfConstructList* get_children();
+
+HEADER_DWARF_ENUMERATION_TYPE_END
+
+HEADER_DWARF_SUBROUTINE_TYPE_START
+
+     public:
+          SgAsmDwarfConstructList* get_children();
+
+HEADER_DWARF_SUBROUTINE_TYPE_END
+
+HEADER_DWARF_UNION_TYPE_START
+
+     public:
+          SgAsmDwarfConstructList* get_children();
+
+HEADER_DWARF_UNION_TYPE_END
+
+HEADER_DWARF_NAMESPACE_START
+
+     public:
+          SgAsmDwarfConstructList* get_children();
+
+HEADER_DWARF_NAMESPACE_END
+
+HEADER_DWARF_CLASS_TYPE_START
+
+     public:
+          SgAsmDwarfConstructList* get_children();
+
+HEADER_DWARF_CLASS_TYPE_END
+
+HEADER_DWARF_COMMON_BLOCK_START
+
+     public:
+          SgAsmDwarfConstructList* get_children();
+
+HEADER_DWARF_COMMON_BLOCK_END
+
+
 /* --------------------------------------------------------------------------------- */
 /* --------------------------------------------------------------------------------- */
 /* --------------------------------------------------------------------------------- */
@@ -3889,393 +4097,19 @@
 // *************************************
 
 SOURCE_EXECUTABLE_FILE_FORMAT_START
+SOURCE_EXECUTABLE_FILE_FORMAT_END
 
-SgAsmExecutableFileFormat::ByteOrder
-SgAsmExecutableFileFormat::host_order()
-   {
-     static const int i = 1;
-     return *(unsigned char*)&i ? ORDER_LSB : ORDER_MSB;
-   }
 
-/* Swap (reverse) bytes taking care of sign extension */
-uint8_t
-SgAsmExecutableFileFormat::swap_bytes(uint8_t n)
-   {
-     return n;
-   }
+SOURCE_GENERIC_SECTION_START
 
-uint16_t
-SgAsmExecutableFileFormat::swap_bytes(uint16_t n)
+SgAsmGenericSection::SgAsmGenericSection(SgAsmGenericFile *f, SgAsmGenericHeader *fhdr)
+   : p_header(NULL), p_offset(0), p_purpose(SP_UNSPECIFIED), p_synthesized(false), p_id(-1), p_name(0),
+     p_mapped_rva(0), p_mapped_size(0), p_mapped_rperm(false), p_mapped_wperm(false), p_mapped_xperm(false),
+     p_congealed(false)
    {
-     return ((n>>8) & 0xff) | ((n<<8) & 0xff00);
+     ctor(f, fhdr);
    }
 
-uint32_t
-SgAsmExecutableFileFormat::swap_bytes(uint32_t n)
-   {
-     return ((n>>24) & 0xff) | ((n>>8) & 0xff00) | ((n<<8) & 0xff0000) | ((n<<24) & 0xff000000u);
-   }
-
-uint64_t
-SgAsmExecutableFileFormat::swap_bytes(uint64_t n)
-   {
-     return (((n>>56) & (0xffull<<0 )) | ((n>>40) & (0xffull<<8 )) | ((n>>24) & (0xffull<<16)) | ((n>>8 ) & (0xffull<<24)) |
-             ((n<<8 ) & (0xffull<<32)) | ((n<<24) & (0xffull<<40)) | ((n<<40) & (0xffull<<48)) | ((n<<56) & (0xffull<<56)));
-   }
-
-int8_t
-SgAsmExecutableFileFormat::swap_bytes(int8_t n)
-   {
-     return swap_bytes((uint8_t)n);
-   }
-
-int16_t
-SgAsmExecutableFileFormat::swap_bytes(int16_t n)
-   {
-     return swap_bytes((uint16_t)n);
-   }
-
-int32_t
-SgAsmExecutableFileFormat::swap_bytes(int32_t n)
-   {
-     return swap_bytes((uint32_t)n);
-   }
-
-int64_t
-SgAsmExecutableFileFormat::swap_bytes(int64_t n)
-   {
-     return swap_bytes((uint64_t)n);
-   }
-
-/* Little-endian byte order conversions */
-uint8_t
-SgAsmExecutableFileFormat::le_to_host(uint8_t n)
-   {
-     return ORDER_LSB==host_order() ? n : swap_bytes(n);
-   }
-
-uint16_t
-SgAsmExecutableFileFormat::le_to_host(uint16_t n)
-   {
-     return ORDER_LSB==host_order() ? n : swap_bytes(n);
-   }
-
-uint32_t
-SgAsmExecutableFileFormat::le_to_host(uint32_t n)
-   {
-     return ORDER_LSB==host_order() ? n : swap_bytes(n);
-   }
-
-uint64_t
-SgAsmExecutableFileFormat::le_to_host(uint64_t n)
-   {
-     return ORDER_LSB==host_order() ? n : swap_bytes(n);
-   }
-
-int8_t
-SgAsmExecutableFileFormat::le_to_host(int8_t n)
-   {
-     return ORDER_LSB==host_order() ? n : swap_bytes(n);
-   }
-
-int16_t
-SgAsmExecutableFileFormat::le_to_host(int16_t n)
-   {
-     return ORDER_LSB==host_order() ? n : swap_bytes(n);
-   }
-
-int32_t
-SgAsmExecutableFileFormat::le_to_host(int32_t n)
-   {
-     return ORDER_LSB==host_order() ? n : swap_bytes(n);
-   }
-
-int64_t
-SgAsmExecutableFileFormat::le_to_host(int64_t n)
-   {
-     return ORDER_LSB==host_order() ? n : swap_bytes(n);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_le(unsigned h, uint8_t *n)
-   {
-     assert(0==(h & ~0xff));
-     uint8_t hh = h;
-     *n = ORDER_LSB==host_order() ? hh : swap_bytes(hh);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_le(unsigned h, uint16_t *n)
-   {
-     assert(0==(h & ~0xffff));
-     uint16_t hh = h;
-     *n = ORDER_LSB==host_order() ? hh : swap_bytes(hh);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_le(unsigned h, uint32_t *n)
-   {
-     assert(0==(h & ~0xfffffffful));
-     uint32_t hh = h;
-     *n = ORDER_LSB==host_order() ? hh : swap_bytes(hh);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_le(addr_t h, uint64_t *n)
-   {
-     assert(0==(h & ~0xffffffffffffffffull));
-     uint64_t hh = h;
-     *n = ORDER_LSB==host_order() ? hh : swap_bytes(hh);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_le(int h, int8_t *n)
-   {
-     assert((unsigned)h<=0x8f || ((unsigned)h|0xff)==(unsigned)-1);
-     int8_t hh = h;
-     *n = ORDER_LSB==host_order() ? hh : swap_bytes(hh);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_le(int h, int16_t *n)
-   {
-     assert((unsigned)h<=0x8fff || ((unsigned)h|0xffff)==(unsigned)-1);
-     int16_t hh = h;
-     *n = ORDER_LSB==host_order() ? hh : swap_bytes(hh);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_le(int h, int32_t *n)
-   {
-     assert((unsigned)h<=0x8fffffffu || ((unsigned)h|0xffffffffu)==(unsigned)-1);
-     int32_t hh = h;
-     *n = ORDER_LSB==host_order() ? hh : swap_bytes(hh);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_le(int64_t h, int64_t *n)
-   {
-     *n = ORDER_LSB==host_order() ? h : swap_bytes(h);
-   }
-
-/* Big-endian byte order conversions */
-uint8_t
-SgAsmExecutableFileFormat::be_to_host(uint8_t n)
-   {
-     return ORDER_MSB==host_order() ? n : swap_bytes(n);
-   }
-
-uint16_t
-SgAsmExecutableFileFormat::be_to_host(uint16_t n)
-   {
-     return ORDER_MSB==host_order() ? n : swap_bytes(n);
-   }
-
-uint32_t
-SgAsmExecutableFileFormat::be_to_host(uint32_t n)
-   {
-     return ORDER_MSB==host_order() ? n : swap_bytes(n);
-   }
-
-uint64_t
-SgAsmExecutableFileFormat::be_to_host(uint64_t n)
-   {
-     return ORDER_MSB==host_order() ? n : swap_bytes(n);
-   }
-
-int8_t
-SgAsmExecutableFileFormat::be_to_host(int8_t n)
-   {
-     return ORDER_MSB==host_order() ? n : swap_bytes(n);
-   }
-
-int16_t
-SgAsmExecutableFileFormat::be_to_host(int16_t n)
-   {
-     return ORDER_MSB==host_order() ? n : swap_bytes(n);
-   }
-
-int32_t
-SgAsmExecutableFileFormat::be_to_host(int32_t n)
-   {
-     return ORDER_MSB==host_order() ? n : swap_bytes(n);
-   }
-
-int64_t
-SgAsmExecutableFileFormat::be_to_host(int64_t n)
-   {
-     return ORDER_MSB==host_order() ? n : swap_bytes(n);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_be(unsigned h, uint8_t *n)
-   {
-     assert(0==(h & ~0xff));
-     uint8_t hh = h;
-     *n = ORDER_MSB==host_order() ? hh : swap_bytes(hh);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_be(unsigned h, uint16_t *n)
-   {
-     assert(0==(h & ~0xffff));
-     uint16_t hh = h;
-     *n = ORDER_MSB==host_order() ? hh : swap_bytes(hh);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_be(unsigned h, uint32_t *n)
-   {
-     assert(0==(h & ~0xfffffffful));
-     uint32_t hh = h;
-     *n = ORDER_MSB==host_order() ? hh : swap_bytes(hh);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_be(addr_t h, uint64_t *n)
-   {
-     assert(0==(h & ~0xffffffffffffffffull));
-     uint64_t hh = h;
-     *n = ORDER_MSB==host_order() ? hh : swap_bytes(hh);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_be(int h, int8_t *n)
-   {
-     assert((unsigned)h<0x8f || ((unsigned)h|0xff)==(unsigned)-1);
-     int8_t hh = h;
-     *n = ORDER_MSB==host_order() ? hh : swap_bytes(hh);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_be(int h, int16_t *n)
-   {
-     assert((unsigned)h<0x8fff || ((unsigned)h|0xffff)==(unsigned)-1);
-     int16_t hh = h;
-     *n = ORDER_MSB==host_order() ? hh : swap_bytes(hh);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_be(int h, int32_t *n)
-   {
-     assert((unsigned)h<0x8ffffffful || ((unsigned)h|0xfffffffful)==(unsigned)-1);
-     int32_t hh = h;
-     *n = ORDER_MSB==host_order() ? hh : swap_bytes(hh);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_be(int64_t h, int64_t *n)
-   {
-     *n = ORDER_MSB==host_order() ? h : swap_bytes(h);
-   }
-
-/* Caller-specified byte order conversions */
-uint8_t
-SgAsmExecutableFileFormat::disk_to_host(SgAsmExecutableFileFormat::ByteOrder sex, uint8_t n)
-   {
-     return ORDER_LSB==sex ? le_to_host(n) : be_to_host(n);
-   }
-
-uint16_t
-SgAsmExecutableFileFormat::disk_to_host(SgAsmExecutableFileFormat::ByteOrder sex, uint16_t n)
-   {
-     return ORDER_LSB==sex ? le_to_host(n) : be_to_host(n);
-   }
-
-uint32_t
-SgAsmExecutableFileFormat::disk_to_host(SgAsmExecutableFileFormat::ByteOrder sex, uint32_t n)
-   {
-     return ORDER_LSB==sex ? le_to_host(n) : be_to_host(n);
-   }
-
-uint64_t
-SgAsmExecutableFileFormat::disk_to_host(SgAsmExecutableFileFormat::ByteOrder sex, uint64_t n)
-   {
-     return ORDER_LSB==sex ? le_to_host(n) : be_to_host(n);
-   }
-
-int8_t
-SgAsmExecutableFileFormat::disk_to_host(SgAsmExecutableFileFormat::ByteOrder sex, int8_t n)
-   {
-     return ORDER_LSB==sex ? le_to_host(n) : be_to_host(n);
-   }
-
-int16_t
-SgAsmExecutableFileFormat::disk_to_host(SgAsmExecutableFileFormat::ByteOrder sex, int16_t n)
-   {
-     return ORDER_LSB==sex ? le_to_host(n) : be_to_host(n);
-   }
-
-int32_t
-SgAsmExecutableFileFormat::disk_to_host(SgAsmExecutableFileFormat::ByteOrder sex, int32_t n)
-   {
-     return ORDER_LSB==sex ? le_to_host(n) : be_to_host(n);
-   }
-
-int64_t
-SgAsmExecutableFileFormat::disk_to_host(SgAsmExecutableFileFormat::ByteOrder sex, int64_t n)
-   {
-     return ORDER_LSB==sex ? le_to_host(n) : be_to_host(n);
-   }
-
-// void SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder, unsigned char h, unsigned char *np)
-//    {
-//      *np = h;
-//    }
-
-void
-SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, unsigned h, uint8_t *np)
-   {
-     ORDER_LSB==sex ? host_to_le(h, np) : host_to_be(h, np);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, unsigned h, uint16_t *np)
-   {
-     ORDER_LSB==sex ? host_to_le(h, np) : host_to_be(h, np);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, unsigned h, uint32_t *np)
-   {
-     ORDER_LSB==sex ? host_to_le(h, np) : host_to_be(h, np);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, addr_t h, uint64_t *np)
-   {
-     ORDER_LSB==sex ? host_to_le(h, np) : host_to_be(h, np);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, int h, int8_t *np)
-   {
-     ORDER_LSB==sex ? host_to_le(h, np) : host_to_be(h, np);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, int h, int16_t *np)
-   {
-     ORDER_LSB==sex ? host_to_le(h, np) : host_to_be(h, np);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, int h, int32_t *np)
-   {
-     ORDER_LSB==sex ? host_to_le(h, np) : host_to_be(h, np);
-   }
-
-void
-SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, int64_t h, int64_t *np)
-   {
-     ORDER_LSB==sex ? host_to_le(h, np) : host_to_be(h, np);
-   }
-
-SOURCE_EXECUTABLE_FILE_FORMAT_END
-
-
-SOURCE_GENERIC_SECTION_START
-
 SgAsmGenericSection::SgAsmGenericSection(SgAsmGenericFile *f, SgAsmGenericHeader *fhdr, addr_t offset, addr_t size)
    : p_header(NULL), p_offset(0), p_purpose(SP_UNSPECIFIED), p_synthesized(false), p_id(-1), p_name(0),
      p_mapped_rva(0), p_mapped_size(0), p_mapped_rperm(false), p_mapped_wperm(false), p_mapped_xperm(false),
@@ -4341,145 +4175,6 @@
 SOURCE_GENERIC_ARCHITECTURE_END
 
 SOURCE_GENERIC_SYMBOL_START
-
-std::string
-SgAsmGenericSymbol::stringifyDefState() const
-   {
-     std::string s;
-     switch (p_def_state)
-        {
-          case SYM_UNDEFINED: 
-             {
-               s = "SYM_UNDEFINED";
-               break;
-             }
-
-          case SYM_TENTATIVE: 
-             {
-               s = "SYM_TENTATIVE";
-               break;
-             }
-
-          case SYM_DEFINED:
-             {
-               s = "SYM_DEFINED";
-               break;
-             }
-
-          default:
-             {
-               printf ("Error: (out of range) p_def_state = %d \n",p_def_state);
-               ROSE_ASSERT(false);
-             }
-        }
-
-     return s;
-   }
-
-std::string
-SgAsmGenericSymbol::stringifyType() const
-   {
-     std::string s;
-     switch (p_type)
-        {
-          case SYM_NO_TYPE: 
-             {
-               s = "SYM_NO_TYPE";
-               break;
-             }
-
-          case SYM_DATA: 
-             {
-               s = "SYM_DATA";
-               break;
-             }
-
-          case SYM_FUNC:
-             {
-               s = "SYM_FUNC";
-               break;
-             }
-
-          case SYM_SECTION:
-             {
-               s = "SYM_SECTION";
-               break;
-             }
-
-          case SYM_FILE:
-             {
-               s = "SYM_FILE";
-               break;
-             }
-
-          case SYM_ARRAY:
-             {
-               s = "SYM_ARRAY";
-               break;
-             }
-
-          case SYM_TLS:
-             {
-               s = "SYM_TLS";
-               break;
-             }
-
-          case SYM_REGISTER:
-             {
-               s = "SYM_REGISTER";
-               break;
-             }
-
-          default:
-             {
-               printf ("Error: (out of range) p_def_state = %d \n",p_def_state);
-               ROSE_ASSERT(false);
-             }
-        }
-
-     return s;
-   }
-
-std::string
-SgAsmGenericSymbol::stringifyBinding() const
-   {
-     std::string s;
-     switch (p_binding)
-        {
-          case SYM_NO_BINDING: 
-             {
-               s = "SYM_NO_BINDING";
-               break;
-             }
-
-          case SYM_LOCAL: 
-             {
-               s = "SYM_LOCAL";
-               break;
-             }
-
-          case SYM_GLOBAL:
-             {
-               s = "SYM_GLOBAL";
-               break;
-             }
-
-          case SYM_WEAK:
-             {
-               s = "SYM_WEAK";
-               break;
-             }
-
-          default:
-             {
-               printf ("Error: (out of range) p_def_state = %d \n",p_def_state);
-               ROSE_ASSERT(false);
-             }
-        }
-
-     return s;
-   }
-
 SOURCE_GENERIC_SYMBOL_END
 
 SOURCE_GENERIC_SYMBOL_LIST_START
@@ -4502,28 +4197,6 @@
 SOURCE_BASIC_STRING_END
 
 SOURCE_GENERIC_STRING_START
-
-std::string
-SgAsmGenericString::get_string() const
-   {
-     printf ("Based class SgAsmGenericString::get_string() should not be called! \n");
-     ROSE_ASSERT(false);
-   }
-
-void
-SgAsmGenericString::set_string(const std::string &s)
-   {
-     printf ("Based class SgAsmGenericString::set_string() should not be called! \n");
-     ROSE_ASSERT(false);
-   }
-
-void
-SgAsmGenericString::dump(FILE*, const char *prefix, ssize_t idx)
-   {
-     printf ("Based class SgAsmGenericString::dump() should not be called! \n");
-     ROSE_ASSERT(false);
-   }
-
 SOURCE_GENERIC_STRING_END
 
 SOURCE_STRING_STORAGE_START
@@ -4569,6 +4242,13 @@
 SOURCE_ELF_SEGMENT_TABLE_ENTRY_LIST_END
 
 SOURCE_ELF_SECTION_START
+/* Constructor for a non-attached, not-parsed Elf section */
+SgAsmElfSection::SgAsmElfSection(SgAsmGenericHeader *fhdr)
+   : SgAsmGenericSection(fhdr->get_file(), fhdr),
+     p_linked_section(NULL), p_section_entry(NULL), p_segment_entry(NULL)
+   {
+     ctor();
+   }
 
 /* Constructor for sections defined in the ELF Section Table */
 SgAsmElfSection::SgAsmElfSection(SgAsmElfFileHeader *fhdr, SgAsmElfSectionTableEntry *shdr)
@@ -4594,13 +4274,6 @@
      ctor(shdr);
    }
 
-SgAsmElfFileHeader*
-SgAsmElfSection::get_elf_header()
-   {
-     return dynamic_cast<SgAsmElfFileHeader*>(get_header());
-   }
-
-
 // DQ (8/22/2008): These are not automatically generated since one of them must be virtual.
 SgAsmElfSection* 
 SgAsmElfSection::get_linked_section () const
@@ -4720,7 +4393,7 @@
    }
 
 void*
-SgAsmPERVASizePair::encode(SgAsmPERVASizePair::RVASizePair_disk *disk)
+SgAsmPERVASizePair::encode(SgAsmPERVASizePair::RVASizePair_disk *disk) const
    {
      host_to_le(p_e_rva,  &(disk->e_rva));
      host_to_le(p_e_size, &(disk->e_size));
@@ -4786,23 +4459,6 @@
 
 SOURCE_PE_SECTION_END
 
-SOURCE_PE_IMPORT_SECTION_START
-
-SgAsmPEImportSection::SgAsmPEImportSection(SgAsmPEFileHeader *fhdr, addr_t offset, addr_t size, addr_t mapped_rva)
-   : SgAsmPESection(fhdr, offset, size)
-   {
-     ctor(offset, size, mapped_rva);
-   }
-
-void
-SgAsmPEImportSection::add_dll(SgAsmPEDLL *d)
-   {
-     ROSE_ASSERT(p_dlls != NULL);
-     p_dlls->get_dlls().push_back(d);
-   }
-
-SOURCE_PE_IMPORT_SECTION_END
-
 SOURCE_PE_SECTION_TABLE_START
 SgAsmPESectionTable::SgAsmPESectionTable(SgAsmPEFileHeader *fhdr, addr_t offset, addr_t size)
    : SgAsmGenericSection(fhdr->get_file(), fhdr, offset, size)
@@ -4823,20 +4479,9 @@
 SOURCE_PE_COFF_SYMBOL_TABLE_END
 
 SOURCE_PE_IMPORT_HINT_NAME_START
-SgAsmPEImportHintName::SgAsmPEImportHintName(SgAsmGenericSection *section, addr_t offset)
-   : p_hint(0), p_padding('\0')
-   {
-     ctor(section, offset);
-   }
-
 SOURCE_PE_IMPORT_HINT_NAME_END
 
 SOURCE_PE_IMPORT_DIRECTORY_START
-SgAsmPEImportDirectory::SgAsmPEImportDirectory(const SgAsmPEImportDirectory::PEImportDirectory_disk *disk)
-   {
-     ctor(disk);
-   }
-
 SOURCE_PE_IMPORT_DIRECTORY_END
 
 SOURCE_PE_EXTENDED_DOS_HEADER_START
@@ -4865,34 +4510,6 @@
 
 SOURCE_PE_COFF_SYMBOL_END
 
-SOURCE_PE_DLL_START
-SgAsmPEDLL::SgAsmPEDLL(SgAsmGenericString *name)
-   : SgAsmGenericDLL(name), p_idir(NULL)
-   {
-     ctor();
-   }
-
-void
-SgAsmPEDLL::add_hintname_rva(addr_t a)
-   {
-     p_hintname_rvas.push_back(a);
-   }
-
-void
-SgAsmPEDLL::add_hintname(SgAsmPEImportHintName *hn)
-   {
-     ROSE_ASSERT(p_hintnames != NULL);
-     p_hintnames->get_hintnames().push_back(hn);
-   }
-
-void
-SgAsmPEDLL::add_binding(addr_t a)
-   {
-     p_bindings.push_back(a);
-   }
-
-SOURCE_PE_DLL_END
-
 SOURCE_COFF_STRING_TABLE_START
 SOURCE_COFF_STRING_TABLE_END
 
@@ -5184,10 +4801,302 @@
    {
      return "DOS";
    }
+SOURCE_DOS_HEADER_END
 
 
-SOURCE_DOS_HEADER_END
 
+SOURCE_DWARF_INFORMATION_START
+SOURCE_DWARF_INFORMATION_END
 
+SOURCE_DWARF_COMPILATION_UNIT_START
 
+SgAsmDwarfConstructList*
+SgAsmDwarfCompilationUnit::get_children()
+   {
+     ROSE_ASSERT(this != NULL);
 
+     if (p_language_constructs == NULL)
+          p_language_constructs = new SgAsmDwarfConstructList();
+
+     return p_language_constructs;
+   }
+
+SOURCE_DWARF_COMPILATION_UNIT_END
+
+SOURCE_DWARF_COMPILATION_UNIT_LIST_START
+SOURCE_DWARF_COMPILATION_UNIT_LIST_END
+
+SOURCE_DWARF_MACRO_START
+SOURCE_DWARF_MACRO_END
+
+SOURCE_DWARF_LINE_START
+SOURCE_DWARF_LINE_END
+
+SOURCE_DWARF_MACRO_LIST_START
+SOURCE_DWARF_MACRO_LIST_END
+
+SOURCE_DWARF_LINE_LIST_START
+
+DwarfInstructionSourceMapReturnType
+SgAsmDwarfLineList::buildInstructionAddressSourcePositionMaps( SgAsmDwarfCompilationUnit* dwarf_cu )
+   {
+  // SgInstructionAddressSourcePositionMapPtrList* instruction_source_code_map = new SgInstructionAddressSourcePositionMapPtrList;
+  // SgSourcePositionInstructionAddressMapPtrList* source_code_instruction_map = new SgSourcePositionInstructionAddressMapPtrList;
+
+  // Build this as static local data
+     static SgInstructionAddressSourcePositionMapPtrList* instruction_source_code_map = NULL;
+
+     bool recomputeMap = false;
+     if (instruction_source_code_map == NULL)
+        {
+          recomputeMap = true;
+          instruction_source_code_map = new SgInstructionAddressSourcePositionMapPtrList;
+        }
+
+     ROSE_ASSERT(instruction_source_code_map != NULL);
+
+     static SgSourcePositionInstructionAddressMapPtrList* source_code_instruction_map = NULL;
+     if (source_code_instruction_map == NULL)
+          source_code_instruction_map = new SgSourcePositionInstructionAddressMapPtrList;
+     ROSE_ASSERT(source_code_instruction_map != NULL);
+
+     if (recomputeMap == true)
+        {
+          ROSE_ASSERT(dwarf_cu != NULL);
+          ROSE_ASSERT(dwarf_cu->get_line_info() != NULL);
+
+          SgAsmDwarfLinePtrList & line_list = dwarf_cu->get_line_info()->get_line_list();
+
+          int listSize = (int) line_list.size();
+          for (int i = 0; i < listSize; i++)
+             {
+            // Loop over each of the entries in the Dwarf line section.
+               uint64_t address = line_list[i]->get_address();
+
+            // Note that file_id values are already in terms of the Sg_File_Info maps 
+            // between file name integers and file name strings.
+               int file_id      = line_list[i]->get_file_id();
+
+               int line         = line_list[i]->get_line();
+               int column       = line_list[i]->get_column();
+
+            // printf ("address = 0x%lx file_id = %d line = %d  column = %d \n",address,file_id,line,column);
+
+               FileIdLineColumnFilePosition file_info(file_id,std::pair<int,int>(line,column));
+
+            // This works for stp::map, but for std::multimap
+            // instruction_source_code_map->operator[](address)   = file_info;
+            // source_code_instruction_map->operator[](file_info) = address;
+
+            // This is the std::multiset version ...
+               instruction_source_code_map->insert(AddressFileIdLineColumnFilePositionPair(address,file_info));
+               source_code_instruction_map->insert(FileIdLineColumnFilePositionAddressPair(file_info,address));
+             }
+        }
+       else
+        {
+       // printf ("Maps were computed previously \n");
+        }
+
+     DwarfInstructionSourceMapReturnType returnValue(instruction_source_code_map,source_code_instruction_map);
+
+     return returnValue;
+   }
+
+SOURCE_DWARF_LINE_LIST_END
+
+SOURCE_DWARF_CONSTRUCT_START
+
+SgAsmDwarfConstructList*
+SgAsmDwarfConstruct::get_children()
+   {
+     ROSE_ASSERT(this != NULL);
+
+#if 0
+     printf ("Error: base class of virtual function called by mistake: class_name = %s \n",class_name().c_str());
+     ROSE_ASSERT(false);
+#else
+     printf ("Warning: base class of virtual function called by mistake: class_name = %s \n",class_name().c_str());
+#endif
+     return NULL;
+   }
+
+SOURCE_DWARF_CONSTRUCT_END
+
+SOURCE_DWARF_CONSTRUCT_LIST_START
+SOURCE_DWARF_CONSTRUCT_LIST_END
+
+SOURCE_DWARF_SUBPROGRAM_START
+
+SgAsmDwarfConstructList*
+SgAsmDwarfSubprogram::get_children()
+   {
+     ROSE_ASSERT(this != NULL);
+
+     if (p_body == NULL)
+          p_body = new SgAsmDwarfConstructList();
+
+     return p_body;
+   }
+
+SOURCE_DWARF_SUBPROGRAM_END
+
+SOURCE_DWARF_STRUCTURE_TYPE_START
+
+SgAsmDwarfConstructList*
+SgAsmDwarfStructureType::get_children()
+   {
+     ROSE_ASSERT(this != NULL);
+
+     if (p_body == NULL)
+          p_body = new SgAsmDwarfConstructList();
+
+     return p_body;
+   }
+
+SOURCE_DWARF_STRUCTURE_TYPE_END
+
+SOURCE_DWARF_ARRAY_TYPE_START
+
+SgAsmDwarfConstructList*
+SgAsmDwarfArrayType::get_children()
+   {
+     ROSE_ASSERT(this != NULL);
+
+     if (p_body == NULL)
+          p_body = new SgAsmDwarfConstructList();
+
+     return p_body;
+   }
+
+SOURCE_DWARF_ARRAY_TYPE_END
+
+
+SOURCE_DWARF_LEXICAL_BLOCK_START
+
+SgAsmDwarfConstructList*
+SgAsmDwarfLexicalBlock::get_children()
+   {
+     ROSE_ASSERT(this != NULL);
+
+     if (p_body == NULL)
+          p_body = new SgAsmDwarfConstructList();
+
+     return p_body;
+   }
+
+SOURCE_DWARF_LEXICAL_BLOCK_END
+
+
+SOURCE_DWARF_INLINED_SUBROUTINE_START
+
+SgAsmDwarfConstructList*
+SgAsmDwarfInlinedSubroutine::get_children()
+   {
+     ROSE_ASSERT(this != NULL);
+
+     if (p_body == NULL)
+          p_body = new SgAsmDwarfConstructList();
+
+     return p_body;
+   }
+
+SOURCE_DWARF_INLINED_SUBROUTINE_END
+
+
+SOURCE_DWARF_ENUMERATION_TYPE_START
+
+SgAsmDwarfConstructList*
+SgAsmDwarfEnumerationType::get_children()
+   {
+     ROSE_ASSERT(this != NULL);
+
+     if (p_body == NULL)
+          p_body = new SgAsmDwarfConstructList();
+
+     return p_body;
+   }
+
+SOURCE_DWARF_ENUMERATION_TYPE_END
+
+
+SOURCE_DWARF_SUBROUTINE_TYPE_START
+
+SgAsmDwarfConstructList*
+SgAsmDwarfSubroutineType::get_children()
+   {
+     ROSE_ASSERT(this != NULL);
+
+     if (p_body == NULL)
+          p_body = new SgAsmDwarfConstructList();
+
+     return p_body;
+   }
+
+SOURCE_DWARF_SUBROUTINE_TYPE_END
+
+
+SOURCE_DWARF_UNION_TYPE_START
+
+SgAsmDwarfConstructList*
+SgAsmDwarfUnionType::get_children()
+   {
+     ROSE_ASSERT(this != NULL);
+
+     if (p_body == NULL)
+          p_body = new SgAsmDwarfConstructList();
+
+     return p_body;
+   }
+
+SOURCE_DWARF_UNION_TYPE_END
+
+
+SOURCE_DWARF_NAMESPACE_START
+
+SgAsmDwarfConstructList*
+SgAsmDwarfNamespace::get_children()
+   {
+     ROSE_ASSERT(this != NULL);
+
+     if (p_body == NULL)
+          p_body = new SgAsmDwarfConstructList();
+
+     return p_body;
+   }
+
+SOURCE_DWARF_NAMESPACE_END
+
+
+SOURCE_DWARF_CLASS_TYPE_START
+
+SgAsmDwarfConstructList*
+SgAsmDwarfClassType::get_children()
+   {
+     ROSE_ASSERT(this != NULL);
+
+     if (p_body == NULL)
+          p_body = new SgAsmDwarfConstructList();
+
+     return p_body;
+   }
+
+SOURCE_DWARF_CLASS_TYPE_END
+
+
+SOURCE_DWARF_COMMON_BLOCK_START
+
+SgAsmDwarfConstructList*
+SgAsmDwarfCommonBlock::get_children()
+   {
+     ROSE_ASSERT(this != NULL);
+
+     if (p_body == NULL)
+          p_body = new SgAsmDwarfConstructList();
+
+     return p_body;
+   }
+
+SOURCE_DWARF_COMMON_BLOCK_END
+
+

Modified: branches/testonly/src/ROSETTA/Grammar/Common.code
===================================================================
--- branches/testonly/src/ROSETTA/Grammar/Common.code	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/ROSETTA/Grammar/Common.code	2008-11-18 06:54:05 UTC (rev 129)
@@ -181,18 +181,16 @@
        */
           virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const;
 
-      /*! \brief \b FOR \b INTERNAL \b USE Returns STL vector of pairs of references to SgNode* and strings for use in AST tools
+      /*! \brief \b FOR \b INTERNAL \b USE Processes pairs of references to SgNode* and strings for use in AST tools
 
-          This functions similar to returnDataMemberPointers() except that it containes pointers to SgNode* instead 
-          of SgNode pointers as values.  As a result there is FAR more damage that can be done by using this function.
+          This functions similar to returnDataMemberPointers() except that it passes references to a handler object.
+          As a result there is FAR more damage that can be done by using this function, but it is type-safe.
           This is provided for support of internal tools that operate on the AST, e.g the AST Merge mechanism.
 
           \warning This function can return unexpected data members and thus the order and the number of elements is unpredicable 
                    and subject to change.
-
-          \returns STL vector of pairs of SgNode** and strings
        */
-          virtual std::vector<std::pair<SgNode**,std::string> > returnDataMemberReferenceToPointers();
+          virtual void processDataMemberReferenceToPointers(ReferenceToPointerHandler*);
 
       /*! \brief \b FOR \b INTERNAL \b USE Returns a unique index value for the childNode in the list of children at this IR node.
 

Modified: branches/testonly/src/ROSETTA/Grammar/Cxx_GlobalDeclarations.macro
===================================================================
--- branches/testonly/src/ROSETTA/Grammar/Cxx_GlobalDeclarations.macro	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/ROSETTA/Grammar/Cxx_GlobalDeclarations.macro	2008-11-18 06:54:05 UTC (rev 129)
@@ -66,3 +66,25 @@
 */
 #define DISABLE_REALLOCATION_OF_DELETED_POINTERS 1
 
+#ifndef REFERENCETOPOINTERHANDLER_DEFINED
+#define REFERENCETOPOINTERHANDLER_DEFINED
+
+// JJW (11/1/2008): This is the base class for handler objects given to
+// processReferenceToDataMembers(); just override operator()() to do your
+// replacement; apply() calls it and appropriately checks and writes back the
+// result.
+
+struct ReferenceToPointerHandler {
+  template <typename NodeSubclass>
+  void apply(NodeSubclass*& r, const SgName& n) {
+    SgNode* sgn = r;
+    (*this)(sgn, n);
+    ROSE_ASSERT (sgn == NULL || dynamic_cast<NodeSubclass*>(sgn));
+    r = dynamic_cast<NodeSubclass*>(sgn);
+  }
+
+  virtual void operator()(SgNode*&, const SgName&) = 0;
+  virtual ~ReferenceToPointerHandler() {}
+};
+
+#endif // REFERENCETOPOINTERHANDLER_DEFINED

Modified: branches/testonly/src/ROSETTA/Grammar/Node.code
===================================================================
--- branches/testonly/src/ROSETTA/Grammar/Node.code	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/ROSETTA/Grammar/Node.code	2008-11-18 06:54:05 UTC (rev 129)
@@ -20,19 +20,22 @@
  * with an SgAsmGenericSection so that if the section address (mapped_rva) is changed then all rose_rva_t objects bound to
  * that section are also automatically adjusted. */
 class rose_rva_t {
-  public:
-    rose_rva_t() : addr(0), section(0) {}
-    rose_rva_t(rose_addr_t rva) : addr(rva), section(0) {} //implicit
-    rose_rva_t(rose_addr_t rva, SgAsmGenericSection *section) : addr(rva), section(0) {set_section(section);}
-
-    /* Accessors */
-    rose_addr_t get_rva() const;
-    void set_rva(rose_addr_t rva);
-    SgAsmGenericSection *get_section() const;
-    void set_section(SgAsmGenericSection *section);
-  private:
-    rose_addr_t addr;             /* virtual address (relative to section if section is not null) */
-    SgAsmGenericSection *section; /* rva is relative to header base_va if section is null */
+	public:
+		rose_rva_t() : addr(0), section(0) {}
+		rose_rva_t(const rose_rva_t &rva) : addr(rva.addr), section(rva.section) {}
+		rose_rva_t(rose_addr_t rva) : addr(rva), section(0) {} //implicit
+		rose_rva_t(rose_addr_t rva, SgAsmGenericSection *section) : addr(rva), section(0) {set_section(section);}
+		rose_addr_t get_rva() const;
+		rose_addr_t get_rel() const;	/* returns address relative to linked section */
+		rose_addr_t get_rel(SgAsmGenericSection*); /*returns address relative to specified section*/
+		rose_rva_t& set_rva(rose_addr_t rva);
+		SgAsmGenericSection *get_section() const;
+		rose_rva_t& set_section(SgAsmGenericSection *section);
+		rose_rva_t& bind(SgAsmGenericHeader*);
+		std::string to_string() const;
+	private:
+		rose_addr_t addr;             /* virtual address (relative to section if section is not null) */
+		SgAsmGenericSection *section; /* rva is relative to header base_va if section is null */
 };
 std::ostream &operator<<(std::ostream&, const rose_rva_t&);
 
@@ -190,9 +193,15 @@
 // typedef SgAsmElfSegmentEntryPtrList*              SgAsmElfSegmentEntryPtrListPtr;
 
 // DQ (8/3/2008): Added support for new IR nodes for new binary file formate work by Robb.
-typedef Rose_STL_Container<SgAsmPEImportHintName*> SgAsmPEImportHintNamePtrList;
-typedef SgAsmPEImportHintNamePtrList*              SgAsmPEImportHintNamePtrListPtr;
+typedef Rose_STL_Container<SgAsmPEImportHNTEntry*> SgAsmPEImportHNTEntryPtrList;
+typedef SgAsmPEImportHNTEntryPtrList*              SgAsmPEImportHNTEntryPtrListPtr;
 
+typedef Rose_STL_Container<SgAsmPEImportILTEntry*> SgAsmPEImportILTEntryPtrList;
+typedef SgAsmPEImportILTEntryPtrList*              SgAsmPEImportILTEntryPtrListPtr;
+
+typedef Rose_STL_Container<SgAsmPEImportDirectory*> SgAsmPEImportDirectoryPtrList;
+typedef SgAsmPEImportDirectoryPtrList*              SgAsmPEImportDirectoryPtrListPtr;
+
 // DQ (6/14/2008): Added to support new exec format IR nodes
 typedef Rose_STL_Container<SgAsmElfSymbol*> SgAsmElfSymbolPtrList;
 typedef SgAsmElfSymbolPtrList*              SgAsmElfSymbolPtrListPtr;
@@ -379,8 +388,8 @@
 typedef Rose_STL_Container<rose_rva_t>         SgRVAList;
 typedef SgRVAList*                             SgRVAListPtr;
 
-typedef Rose_STL_Container<SgAsmPEDLL*>        SgAsmPEDLLPtrList;
-typedef SgAsmPEDLLPtrList*                     SgAsmPEDLLPtrListPtr;
+typedef Rose_STL_Container<SgAsmPEExportEntry*> SgAsmPEExportEntryPtrList;
+typedef SgAsmPEExportEntryPtrList*		SgAsmPEExportEntryPtrListPtr;
 
 typedef Rose_STL_Container<unsigned>           SgUnsignedList;
 typedef SgUnsignedList*                        SgUnsignedListPtr;
@@ -429,7 +438,20 @@
 typedef Rose_STL_Container<SgInterfaceBody*> SgInterfaceBodyPtrList;
 typedef SgInterfaceBodyPtrList*              SgInterfaceBodyPtrListPtr;
 
+// DQ (11/5/2008): Addes as part of general Dwarf support in the AST for binary executables.
+typedef Rose_STL_Container<SgAsmDwarfLine*> SgAsmDwarfLinePtrList;
+typedef SgAsmDwarfLinePtrList*              SgAsmDwarfLinePtrListPtr;
 
+typedef Rose_STL_Container<SgAsmDwarfMacro*> SgAsmDwarfMacroPtrList;
+typedef SgAsmDwarfMacroPtrList*              SgAsmDwarfMacroPtrListPtr;
+
+typedef Rose_STL_Container<SgAsmDwarfConstruct*> SgAsmDwarfConstructPtrList;
+typedef SgAsmDwarfConstructPtrList*              SgAsmDwarfConstructPtrListPtr;
+
+typedef Rose_STL_Container<SgAsmDwarfCompilationUnit*> SgAsmDwarfCompilationUnitPtrList;
+typedef SgAsmDwarfCompilationUnitPtrList*              SgAsmDwarfCompilationUnitPtrListPtr;
+
+
 // FIXME: This might not the the right place for this class. (RPM 2008-08-26)
 /* An SgSharedVector is like an STL vector except for two things:
  *
@@ -702,8 +724,25 @@
 typedef SgIntegerStringMapPtrList* SgIntegerStringMapPtrListPtr;
 #endif
 
+// DQ (11/6/2008): This is the support for mapping instructions to source code and back.
+// When it is further along it will be moved to the SgAsmDwarfCompilationUnit as a member
+// function which will built it if it has not previously been built.
+// This is how a triplet would be built (in the future), instead of a pair, but for now use a pair.
+// std::tr1::tuple<int, int, int> tp;
+typedef std::pair<int,int> LineColumnFilePosition;
+typedef std::pair<int,LineColumnFilePosition> FileIdLineColumnFilePosition;
 
+typedef std::pair<uint64_t,FileIdLineColumnFilePosition> AddressFileIdLineColumnFilePositionPair;
+typedef std::pair<FileIdLineColumnFilePosition,uint64_t> FileIdLineColumnFilePositionAddressPair;
 
+// typedef std::multimap<uint64_t,FileIdLineColumnFilePosition> SgInstructionAddressSourcePositionMapPtrList;
+// typedef std::multimap<FileIdLineColumnFilePosition,uint64_t> SgSourcePositionInstructionAddressMapPtrList;
+typedef std::multimap<uint64_t,FileIdLineColumnFilePosition> SgInstructionAddressSourcePositionMapPtrList;
+typedef std::multimap<FileIdLineColumnFilePosition,uint64_t> SgSourcePositionInstructionAddressMapPtrList;
+
+typedef std::pair<SgInstructionAddressSourcePositionMapPtrList*,SgSourcePositionInstructionAddressMapPtrList*> DwarfInstructionSourceMapReturnType;
+
+
 // DQ (11/26/2005): Support for visitor pattern.
 class ROSE_VisitTraversal;
 class ROSE_VisitorPattern;
@@ -761,7 +800,9 @@
 
 typedef std::vector<RTIMemberData> RTIReturnType;
 
+struct ReferenceToPointerHandler;
 
+
 /*! \brief Supporting class from copy mechanism within ROSE.
 
     This class forms a base class for the SgShallowCopy and SgTreeCopy

Modified: branches/testonly/src/ROSETTA/Grammar/Support.code
===================================================================
--- branches/testonly/src/ROSETTA/Grammar/Support.code	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/ROSETTA/Grammar/Support.code	2008-11-18 06:54:05 UTC (rev 129)
@@ -3493,8 +3493,18 @@
        // DQ (2/15/2003): added copy constructor
           Sg_File_Info(const Sg_File_Info & X);
 
+       // DQ (11/6/2008): Added to support construction of objects using Dwarf information.
+          Sg_File_Info( int file_id, int line, int column );
+
           void post_construction_initialization();
 
+       // DQ (11/6/2008): Added support for extending the internal static filename to integer id map
+      //! Access function to permit files referenced in Dwarf to be mapped to integers using the same scheme as for source code.
+          static int addFilenameToMap ( const std::string & filename );
+
+      //! Returns the number of entries in the filename map
+          static int numberOfSourceFiles();
+
           void set_filename (const char* filename) ROSE_DEPRECATED_FUNCTION;
           void set_filenameString ( const std::string & filename );
           void set_line (int line);
@@ -3738,11 +3748,13 @@
       //! errorCode is the return value assembled from the multiple error codes associated with the 
       //! different phases of the compilation.  The fileNameIndex is the index into the list of
       //! file names input on the user's command line.  We need a way to process them individually!
-          SgFile ( int & argc, char** & argv, int & errorCode, int fileNameIndex = 0, SgProject* project = NULL );
-          SgFile(std::vector<std::string>& argv, int& errorCode, int fileNameIndex = 0, SgProject* project = NULL);
+          SgFile ( int & argc, char** & argv,  SgProject* project = NULL );
+          SgFile(std::vector<std::string>& argv,  SgProject* project = NULL);
 
        // SgFile ( int & argc, char** & argv, int & errorCode, int fileNameIndex, SgProject* project );
-          void doSetupForConstructor(const std::vector<std::string>& argv, int& errorCode, int fileNameIndex, SgProject* project);
+       //   virtual void doSetupForConstructor(const std::vector<std::string>& argv, int& errorCode, int fileNameIndex, SgProject* project);
+       //AS(10/04/08) Changed semantics of doSetupForConstructor to not call frontend
+          virtual void doSetupForConstructor(const std::vector<std::string>& argv, SgProject* project);
 
        // DQ (8/16/2008): Added this function to the SgFile IR node (defined in sageSupport.C).
           void generateBinaryExecutableFileInformation ( std::string sourceFilename, SgAsmFile* asmFile );
@@ -3800,7 +3812,7 @@
        // int callFrontEnd ( int & argc, char** & argv );
 
        // Get the commandline from where it is stored internally
-          int callFrontEnd();
+          virtual int callFrontEnd();
 
        // DQ (9/2/2008): Added to factor out detail fo building the AST in callFrontEnd().
           virtual int buildAST( std::vector<std::string> argv, std::vector<std::string> inputCommandLine );
@@ -3870,7 +3882,7 @@
 
       //! Sets up the source file name (there should only be one source file in the 
       //! commandline to a SgFile, there can be multiple ones to a SgProject).
-          void setupSourceFilename ( const std::vector<std::string>& argv );
+      //    void setupSourceFilename ( const std::vector<std::string>& argv );
 
       //! Access function calling get_startOfConstruct(), provided to support older interface.
           Sg_File_Info* get_file_info() const;
@@ -3896,7 +3908,8 @@
 HEADER_APPLICATION_SOURCE_FILE_START
      public:
        // SgSourceFile ( int & argc, char** & argv, int & errorCode, int fileNameIndex = 0, SgProject* project = NULL );
-          SgSourceFile(std::vector<std::string>& argv, int& errorCode, int fileNameIndex = 0, SgProject* project = NULL);
+          SgSourceFile(std::vector<std::string>& argv, SgProject* project = NULL);
+          virtual int callFrontEnd();
        // SgSourceFile ( const SgSourceFile & X );
 
       //! Default constructor (not meant to be used)
@@ -3911,6 +3924,7 @@
           int build_Fortran_AST( std::vector<std::string> argv, std::vector<std::string> inputCommandLine );
           int build_C_and_Cxx_AST( std::vector<std::string> argv, std::vector<std::string> inputCommandLine );
           int build_PHP_AST();
+          virtual void doSetupForConstructor(const std::vector<std::string>& argv, SgProject* project);
 
        // DQ (9/5/2008): Support for older name of the SgGlobal in SgSourceFile
        // SgGlobal* get_root() const;
@@ -3930,18 +3944,31 @@
 HEADER_APPLICATION_BINARY_FILE_START
      public:
        // SgBinaryFile ( int & argc, char** & argv, int & errorCode, int fileNameIndex = 0, SgProject* project = NULL );
-          SgBinaryFile(std::vector<std::string>& argv, int& errorCode, int fileNameIndex = 0, SgProject* project = NULL);
+          SgBinaryFile(std::vector<std::string>& argv,  SgProject* project = NULL);
        // SgBinaryFile ( const SgBinaryFile & X );
 
+          virtual int callFrontEnd();
       //  Default constructor (not meant to be used)
       //  JJW (9/5/2008): the normal constructor has defaults for all of its arguments, so this is ambiguous
       //  SgBinaryFile() ROSE_DEPRECATED_FUNCTION;
 
+           virtual void doSetupForConstructor(const std::vector<std::string>& argv, SgProject* project);
+
           virtual int buildAST( std::vector<std::string> argv, std::vector<std::string> inputCommandLine );
 
 HEADER_APPLICATION_BINARY_FILE_END
 
+HEADER_APPLICATION_UNKNOWN_FILE_START
+     public:
+          SgUnknownFile(std::vector<std::string>& argv, SgProject* project = NULL);
 
+          virtual int callFrontEnd();
+          virtual void doSetupForConstructor(const std::vector<std::string>& argv, SgProject* project);
+
+HEADER_APPLICATION_UNKNOWN_FILE_END
+
+
+
 HEADER_APPLICATION_FILE_LIST_START
 HEADER_APPLICATION_FILE_LIST_END
 
@@ -4314,6 +4341,9 @@
 
                b_SkipFormatting                = 42,/*!< Fortran code generation requires that we skip some formatting (e.g. column 7 formatting, even if fixed format output). */
 
+            // FMZ: Added for generate fortran xxx.rose_mod file
+               b_outputFortranModFile      = 43, /*!< Fortran mod file generation */
+
             //! DQ (12/6/2003): Added last value to use a upper bound in loops
                UNPARSE_TYPE_LAST /*!< last value used for debugging */
              };
@@ -4584,6 +4614,12 @@
           static bool get_forceDefaultConstructorToTriggerError();
           static void set_forceDefaultConstructorToTriggerError( bool forceDefaultConstructorToTriggerError);
 
+       // FMZ (5/8/2008) Added to support to generate fortran XX.rose_mod file for a module
+       // the code will based on fortran unparser code
+          int outputFortranModFile() const;
+          void set_outputFortranModFile();
+          void unset_outputFortranModFile();
+
 HEADER_UNPARSE_INFO_END
 
 
@@ -6059,7 +6095,7 @@
 
      while(p_iterator != p_table->end())
         {
-          if ( p_iterator->second->variantT() == V_SgFunctionSymbol)
+          if (isSgFunctionSymbol(p_iterator->second))
              {
                p_name    = nm;
                p_no_name = false;
@@ -8580,6 +8616,22 @@
    }
 #endif
 
+// DQ (11/6/2008): added constructor to support building objects from Dwarf 
+// information (which uses a pre-resolved integer file_id instead of a string)
+Sg_File_Info::Sg_File_Info( int file_id, int line, int column )
+   : p_file_id(file_id),
+     p_line(line),
+     p_col(column),
+     p_classificationBitField(0)
+   {
+     ROSE_ASSERT(this != NULL);
+
+     ROSE_ASSERT (p_col >= 0);
+
+  // Provide a common function called for initialization support.
+     post_construction_initialization();
+   }
+
 void
 Sg_File_Info::post_construction_initialization()
    {
@@ -8654,6 +8706,35 @@
      p_file_id = file_id;
    }
 
+int
+Sg_File_Info::numberOfSourceFiles()
+   {
+     return p_nametofileid_map.size();
+   }
+
+int
+Sg_File_Info::addFilenameToMap ( const std::string & filename )
+   {
+  // DQ (11/6/2008): Added support for extending the internal static filename to integer id map.
+  // This static function is used the the Dwarf support to convert filenames to integer values and 
+  // maintain a map similar to the Dwarf mapping of integers to filenames as a way to save space
+  // in the represnetation of source position mappings of the instructions in the binary.
+
+     int returnValue = 0;
+     if (p_nametofileid_map.count(filename) == 0)
+        {
+          returnValue = p_nametofileid_map.size();
+          p_nametofileid_map[filename]  = returnValue;
+          p_fileidtoname_map[returnValue] = filename;
+        }
+       else
+        {
+          returnValue = p_nametofileid_map[filename];
+        }
+
+     return returnValue;
+   }
+
 void
 // DQ (9/5/2006): renamed functions to swap the implementations
 // Sg_File_Info::set_filename(const char* filename)
@@ -9404,21 +9485,21 @@
 // Moved to sageSupport.C: void SgFile::setupSourceFilename ( const vector<string>& argv )
 // Moved to sageSupport.C: void SgFile::doSetupForConstructor(const vector<string>& argv, int& errorCode, int fileNameIndex, SgProject* project)
 
-SgFile::SgFile ( int & argc, char** & argv , int & errorCode, int fileNameIndex, SgProject* project )
+SgFile::SgFile ( int & argc, char** & argv , SgProject* project )
 // : p_numberOfCommandLineArguments(argc) , p_commandLineArgumentList(NULL)
    {
   // This constructor actually makes the call to EDG to build the AST (via callFrontEnd()).
      ROSE_ASSERT (argv && argc >= 0);
 
   // Note use of pointer arithmetic in the computation of "argv + argc", this is standard STL fair.
-     doSetupForConstructor(vector<string>(argv, argv + argc), errorCode, fileNameIndex, project);
+     doSetupForConstructor(vector<string>(argv, argv + argc),  project);
    }
 
-SgFile::SgFile ( vector<string> & argv , int & errorCode, int fileNameIndex, SgProject* project )
+SgFile::SgFile ( vector<string> & argv ,  SgProject* project )
 // : p_numberOfCommandLineArguments(argc) , p_commandLineArgumentList(NULL)
    {
   // This constructor actually makes the call to EDG to build the AST (via callFrontEnd()).
-     doSetupForConstructor(argv, errorCode, fileNameIndex, project);
+     doSetupForConstructor(argv,  project);
    }
 
 #if 0
@@ -9575,7 +9656,7 @@
      p_outputFormat            = SgFile::e_unknown_output_format;
      p_backendCompileFormat    = SgFile::e_unknown_output_format;
      p_fortran_implicit_none   = false;
-     p_fortran_openmp          = false;
+     p_openmp          = false;
 
   // DQ (12/8/2007): Added commandline support for cray pointers.
      p_cray_pointer_support = false;
@@ -9793,8 +9874,16 @@
   // DQ (10/19/2007): Added initialization new data member added to support handing of binary AST and source code AST.
   // p_binaryFile = NULL;
 
+  // This will cause only the binary file format to be read and skipps instruction disassembly
      p_read_executable_file_format_only = false;
 
+  // DQ (11/11/2008): Added to support visualization of only parts of the AST.
+  // this will cause attributes to be added to IR nodes that will be skipped 
+  // in the generation of DOT files.  This is helpful for debugging and in 
+  // tutorial examples/presentations.
+     p_visualize_executable_file_format_skip_symbols = false;
+     p_visualize_dwarf_only = false;
+
      p_read_instructions_only = false;
 
   // DQ (9/2/2008): This is moved to the new SgBinaryFile (derived from SgFile)
@@ -10199,7 +10288,7 @@
      printf ("     p_backendCompileFormat                 = %s output format \n",backendCompileFormatName.c_str());
 
      printf ("     p_fortran_implicit_none                = %s \n",(p_fortran_implicit_none == true) ? "true" : "false");
-     printf ("     p_fortran_openmp                       = %s \n",(p_fortran_openmp == true) ? "true" : "false");
+     printf ("     p_openmp                       = %s \n",(p_openmp == true) ? "true" : "false");
      printf ("     p_cray_pointer_support                 = %s \n",(p_cray_pointer_support == true) ? "true" : "false");
      printf ("     p_output_parser_actions                = %s \n",(p_output_parser_actions == true) ? "true" : "false");
      printf ("     p_exit_after_parser                    = %s \n",(p_exit_after_parser == true) ? "true" : "false");
@@ -10405,6 +10494,16 @@
 SOURCE_APPLICATION_BINARY_FILE_START
 SOURCE_APPLICATION_BINARY_FILE_END
 
+SOURCE_APPLICATION_UNKNOWN_FILE_START
+SgUnknownFile::SgUnknownFile ( vector<string> & argv ,  SgProject* project )
+   : SgFile(argv, project)
+   {
+  // set_parent(project);
+   }
+
+SOURCE_APPLICATION_UNKNOWN_FILE_END
+
+
 SOURCE_APPLICATION_FILE_LIST_START
 SOURCE_APPLICATION_FILE_LIST_END
 
@@ -11848,7 +11947,22 @@
 SgUnparse_Info::unset_array_index_list()
    { p_array_index_list=0; }
 
+// FMZ : Added to support to generated XX.rose_mod file for a module
+//       (based on fortran unparser).
+int
+SgUnparse_Info::outputFortranModFile() const
+   { return checkBit(b_outputFortranModFile); }
+
 void
+SgUnparse_Info::set_outputFortranModFile()
+   { setBit(b_outputFortranModFile); }
+
+void
+SgUnparse_Info::unset_outputFortranModFile()
+   { unsetBit(b_outputFortranModFile); }
+
+
+void
 SgUnparse_Info::display ( const std::string & label ) const
    {
      printf ("Inside of SgUnparse_Info::display(%s) \n",label.c_str());

Copied: branches/testonly/src/ROSETTA/Grammar/grammarProcessDataMemberReferenceToPointers.macro (from rev 128, trunk/src/ROSETTA/Grammar/grammarProcessDataMemberReferenceToPointers.macro)
===================================================================
--- branches/testonly/src/ROSETTA/Grammar/grammarProcessDataMemberReferenceToPointers.macro	                        (rev 0)
+++ branches/testonly/src/ROSETTA/Grammar/grammarProcessDataMemberReferenceToPointers.macro	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,11 @@
+
+void
+$CLASSNAME::processDataMemberReferenceToPointers(ReferenceToPointerHandler* handler)
+   {
+  // ------------ checking pointers of $CLASSNAME -------------------
+     ROSE_ASSERT ( p_freepointer == AST_FileIO::IS_VALID_POINTER() );
+
+     $CODE_STRING
+
+   }
+

Deleted: branches/testonly/src/ROSETTA/Grammar/grammarReturnDataMemberReferenceToPointers.macro
===================================================================
--- branches/testonly/src/ROSETTA/Grammar/grammarReturnDataMemberReferenceToPointers.macro	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/ROSETTA/Grammar/grammarReturnDataMemberReferenceToPointers.macro	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,11 +0,0 @@
-
-std::vector<std::pair<SgNode**,std::string> >
-$CLASSNAME::returnDataMemberReferenceToPointers()
-   {
-  // ------------ checking pointers of $CLASSNAME -------------------
-     ROSE_ASSERT ( p_freepointer == AST_FileIO::IS_VALID_POINTER() );
-
-     $CODE_STRING
-
-   }
-

Modified: branches/testonly/src/ROSETTA/astNodeList
===================================================================
--- branches/testonly/src/ROSETTA/astNodeList	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/ROSETTA/astNodeList	2008-11-18 06:54:05 UTC (rev 129)
@@ -161,6 +161,7 @@
 SgFile
 SgSourceFile
 SgBinaryFile
+SgUnknownFile
 Sg_File_Info
 SgFileList
 SgFloatVal
@@ -409,8 +410,6 @@
 SgUpcForAllStatement
 SgUpcThreads
 SgUpcMythread
-SgAsmLEDLL
-SgAsmPEDLL
 SgAsmGenericDLL
 SgAsmPEFileHeader
 SgAsmLEFileHeader
@@ -430,6 +429,7 @@
 SgAsmPESection
 SgAsmPESectionTable
 SgAsmPEImportSection
+SgAsmPEExportSection
 SgAsmCoffSymbolTable
 SgAsmNESection
 SgAsmNESectionTable
@@ -460,10 +460,17 @@
 SgAsmElfSymbolList
 SgAsmElfSegmentTableEntryList
 SgAsmPEExtendedDOSHeader
+SgAsmPEImportILTEntry
+SgAsmPEImportILTEntryList
 SgAsmPEImportDirectory
-SgAsmPEImportHintName
+SgAsmPEImportDirectoryList
+SgAsmPEExportDirectory
+SgAsmPEExportEntry
+SgAsmPEExportEntryList
+SgAsmPEImportHNTEntry
+SgAsmPEImportLookupTable
 SgAsmPESectionTableEntry
-SgAsmPEImportHintNameList
+SgAsmPEImportHNTEntryList
 SgAsmPERVASizePair
 SgAsmPERVASizePairList
 SgAsmCoffSymbol
@@ -477,7 +484,6 @@
 SgAsmLESectionTableEntry
 SgAsmDOSFileHeader
 SgAsmExecutableFileFormat
-SgAsmPEDLLList
 SgStringKeyedBidirectionalGraph
 SgIntKeyedBidirectionalGraph
 SgDummyGraph
@@ -506,5 +512,77 @@
 SgRenameSymbol
 SgAsmPowerpcInstruction
 SgAsmPowerpcRegisterReferenceExpression
+SgAsmDwarfInformation
+SgAsmDwarfMacro
+SgAsmDwarfMacroList
+SgAsmDwarfLine
+SgAsmDwarfLineList
+SgAsmDwarfConstruct
+SgAsmDwarfArrayType
+SgAsmDwarfClassType
+SgAsmDwarfEntryPoint
+SgAsmDwarfEnumerationType
+SgAsmDwarfFormalParameter
+SgAsmDwarfImportedDeclaration
+SgAsmDwarfLabel
+SgAsmDwarfLexicalBlock
+SgAsmDwarfMember
+SgAsmDwarfPointerType
+SgAsmDwarfReferenceType
+SgAsmDwarfCompilationUnit
+SgAsmDwarfStringType
+SgAsmDwarfStructureType
+SgAsmDwarfSubroutineType
+SgAsmDwarfTypedef
+SgAsmDwarfUnionType
+SgAsmDwarfUnspecifiedParameters
+SgAsmDwarfVariant
+SgAsmDwarfCommonBlock
+SgAsmDwarfCommonInclusion
+SgAsmDwarfInheritance
+SgAsmDwarfInlinedSubroutine
+SgAsmDwarfModule
+SgAsmDwarfPtrToMemberType
+SgAsmDwarfSetType
+SgAsmDwarfSubrangeType
+SgAsmDwarfWithStmt
+SgAsmDwarfAccessDeclaration
+SgAsmDwarfBaseType
+SgAsmDwarfCatchBlock
+SgAsmDwarfConstType
+SgAsmDwarfConstant
+SgAsmDwarfEnumerator
+SgAsmDwarfFileType
+SgAsmDwarfFriend
+SgAsmDwarfNamelist
+SgAsmDwarfNamelistItem
+SgAsmDwarfPackedType
+SgAsmDwarfSubprogram
+SgAsmDwarfTemplateTypeParameter
+SgAsmDwarfTemplateValueParameter
+SgAsmDwarfThrownType
+SgAsmDwarfTryBlock
+SgAsmDwarfVariantPart
+SgAsmDwarfVariable
+SgAsmDwarfVolatileType
+SgAsmDwarfDwarfProcedure
+SgAsmDwarfRestrictType
+SgAsmDwarfInterfaceType
+SgAsmDwarfNamespace
+SgAsmDwarfImportedModule
+SgAsmDwarfUnspecifiedType
+SgAsmDwarfPartialUnit
+SgAsmDwarfImportedUnit
+SgAsmDwarfMutableType
+SgAsmDwarfCondition
+SgAsmDwarfSharedType
+SgAsmDwarfFormatLabel
+SgAsmDwarfFunctionTemplate
+SgAsmDwarfClassTemplate
+SgAsmDwarfUpcSharedType
+SgAsmDwarfUpcStrictType
+SgAsmDwarfUpcRelaxedType
+SgAsmDwarfUnknownConstruct
+SgAsmDwarfConstructList
+SgAsmDwarfCompilationUnitList
 
-

Modified: branches/testonly/src/ROSETTA/src/Makefile.am
===================================================================
--- branches/testonly/src/ROSETTA/src/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/ROSETTA/src/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -56,7 +56,7 @@
      ../Grammar/grammarStaticDataManagingClassHeader.macro \
      ../Grammar/grammarStaticDataManagingClassStorageClassHeader.macro \
      ../Grammar/grammarReturnDataMemberPointers.macro \
-     ../Grammar/grammarReturnDataMemberReferenceToPointers.macro \
+     ../Grammar/grammarProcessDataMemberReferenceToPointers.macro \
      ../Grammar/grammarGetChildIndex.macro \
      ../astNodeList
 
@@ -124,8 +124,8 @@
 	rm -f $(CXX_GRAMMAR_DIR)/Cxx_GrammarReturnDataMemberPointers.C
 	mv Cxx_GrammarReturnDataMemberPointers.C $(CXX_GRAMMAR_DIR)/Cxx_GrammarReturnDataMemberPointers.C
 #	DQ (4/30/2006): Added support for function to return references to IR nodes pointers
-	rm -f $(CXX_GRAMMAR_DIR)/Cxx_GrammarReturnDataMemberReferenceToPointers.C
-	mv Cxx_GrammarReturnDataMemberReferenceToPointers.C $(CXX_GRAMMAR_DIR)/Cxx_GrammarReturnDataMemberReferenceToPointers.C
+	rm -f $(CXX_GRAMMAR_DIR)/Cxx_GrammarProcessDataMemberReferenceToPointers.C
+	mv Cxx_GrammarProcessDataMemberReferenceToPointers.C $(CXX_GRAMMAR_DIR)/Cxx_GrammarProcessDataMemberReferenceToPointers.C
 #	DQ (4/6/2006): Added from Jochen's multifile I/O support
 	rm -f $(CXX_GRAMMAR_DIR)/astFileIO/SourcesOfIRNodesAstFileIOSupport.C
 	mv SourcesOfIRNodesAstFileIOSupport.C $(CXX_GRAMMAR_DIR)/astFileIO/SourcesOfIRNodesAstFileIOSupport.C

Modified: branches/testonly/src/ROSETTA/src/binaryInstruction.C
===================================================================
--- branches/testonly/src/ROSETTA/src/binaryInstruction.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/ROSETTA/src/binaryInstruction.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -143,14 +143,11 @@
                                       AsmType128bitFloat | AsmTypeSingleFloat    | AsmTypeDoubleFloat | 
                                       AsmTypeVector, "AsmType", "AsmTypeTag", false /* canHaveInstances = false */ );
 
-  // Support for DLL's for different file formats (there appears to only be a PE form of DLL)
-  // NEW_TERMINAL_MACRO ( AsmLEDLL, "AsmLEDLL", "AsmLEDLLTag" );
+     NEW_TERMINAL_MACRO ( AsmGenericDLL,           "AsmGenericDLL",           "AsmGenericDLLTag");
+     NEW_TERMINAL_MACRO ( AsmPEImportHNTEntryList, "AsmPEImportHNTEntryList", "AsmPEImportHNTEntryListTag" );
+     NEW_TERMINAL_MACRO ( AsmPEImportILTEntryList, "AsmPEImportILTEntryList", "AsmPEImportILTEntryListTag" );
+     NEW_TERMINAL_MACRO ( AsmPEImportDirectoryList, "AsmPEImportDirectoryList", "AsmPEImportDirectoryListTag" );
 
-     NEW_TERMINAL_MACRO ( AsmPEDLL, "AsmPEDLL", "AsmPEDLLTag" );
-     NEW_NONTERMINAL_MACRO ( AsmGenericDLL, AsmPEDLL , "AsmGenericDLL",    "AsmGenericDLLTag", false );
-
-     NEW_TERMINAL_MACRO ( AsmPEImportHintNameList, "AsmPEImportHintNameList", "AsmPEImportHintNameListTag" );
-
      NEW_TERMINAL_MACRO ( AsmGenericFormat,      "AsmGenericFormat",      "AsmGenericFormatTag" );
 
      NEW_TERMINAL_MACRO ( AsmGenericFile,        "AsmGenericFile",        "AsmGenericFileTag" );
@@ -182,8 +179,10 @@
      NEW_TERMINAL_MACRO    ( AsmElfSegmentTable,  "AsmElfSegmentTable",  "AsmElfSegmentTableTag"  );
 
      NEW_TERMINAL_MACRO    ( AsmPEImportSection, "AsmPEImportSection", "AsmPEImportSectionTag" );
+     NEW_TERMINAL_MACRO    ( AsmPEExportSection, "AsmPEExportSection", "AsmPEExportSectionTag" );
      NEW_TERMINAL_MACRO    ( AsmPEStringSection, "AsmPEStringSection", "AsmPEStringSectionTag");
-     NEW_NONTERMINAL_MACRO ( AsmPESection, AsmPEImportSection | AsmPEStringSection, "AsmPESection",       "AsmPESectionTag", true /* canHaveInstances = true */ );
+     NEW_NONTERMINAL_MACRO ( AsmPESection, AsmPEImportSection | AsmPEExportSection | AsmPEStringSection,
+                             "AsmPESection",       "AsmPESectionTag", true /* canHaveInstances = true */ );
 
      NEW_TERMINAL_MACRO    ( AsmPESectionTable,  "AsmPESectionTable",  "AsmPESectionTableTag"  );
      NEW_TERMINAL_MACRO    ( AsmCoffSymbolTable, "AsmCoffSymbolTable", "AsmCoffSymbolTableTag" );
@@ -228,8 +227,12 @@
      NEW_TERMINAL_MACRO    ( AsmElfDynamicEntryList,      "AsmElfDynamicEntryList",      "AsmElfDynamicEntryListTag"      );
 
      NEW_TERMINAL_MACRO    ( AsmPERVASizePair,       "AsmPERVASizePair",       "AsmPERVASizePairTag"       );
+     NEW_TERMINAL_MACRO    ( AsmPEExportDirectory,   "AsmPEExportDirectory",   "AsmPEExportDirectoryTag"   );
+     NEW_TERMINAL_MACRO    ( AsmPEExportEntry,       "AsmPEExportEntry",       "AsmPEExportEntryTag"       );
      NEW_TERMINAL_MACRO    ( AsmPEImportDirectory,   "AsmPEImportDirectory",   "AsmPEImportDirectoryTag"   );
-     NEW_TERMINAL_MACRO    ( AsmPEImportHintName,    "AsmPEImportHintName",    "AsmPEImportHintNameTag"    );
+     NEW_TERMINAL_MACRO    ( AsmPEImportILTEntry,    "AsmPEImportILTEntry",    "AsmPEImportILTEntryTag"    );
+     NEW_TERMINAL_MACRO    ( AsmPEImportHNTEntry,    "AsmPEImportHNTEntry",    "AsmPEImportHNTEntryTag"    );
+     NEW_TERMINAL_MACRO    ( AsmPEImportLookupTable, "AsmPEImportLookupTable", "AsmPEImportLookupTableTag" );
      NEW_TERMINAL_MACRO    ( AsmPESectionTableEntry, "AsmPESectionTableEntry", "AsmPESectionTableEntryTag" );
 
      NEW_TERMINAL_MACRO    ( AsmNEEntryPoint,        "AsmNEEntryPoint",        "AsmNEEntryPointTag"        );
@@ -247,8 +250,8 @@
      NEW_TERMINAL_MACRO ( AsmElfSymbolList,      "AsmElfSymbolList",      "AsmElfSymbolListTag"      );
      NEW_TERMINAL_MACRO ( AsmCoffSymbolList,     "AsmCoffSymbolList",     "AsmCoffSymbolListTag"     );
      NEW_TERMINAL_MACRO ( AsmGenericDLLList,     "AsmGenericDLLList",     "AsmGenericDLLListTag"     );
-     NEW_TERMINAL_MACRO ( AsmPEDLLList,          "AsmPEDLLList",          "AsmPEDLLListTag"          );
      NEW_TERMINAL_MACRO ( AsmPERVASizePairList,  "AsmPERVASizePairList",  "AsmPERVASizePairListTag"  );
+     NEW_TERMINAL_MACRO (AsmPEExportEntryList,   "AsmPEExportEntryList",  "AsmPEExportEntryListTag"  );
 
 
   // DQ (8/2/2008): These were removed from the design by Robb (segments and sections are now the same: as sections).
@@ -269,20 +272,128 @@
      NEW_TERMINAL_MACRO ( AsmStringStorage,   "AsmStringStorage",   "AsmStringStorageTag"   );
 #endif
 
+// DQ (11/3/2008): Later this might go into a separate file.
+// ***************************************************************************************
+// DWARF Support for mapping information in the binary executable back to the source code.
+// ***************************************************************************************
 
+     NEW_TERMINAL_MACRO ( AsmDwarfMacro, "AsmDwarfMacro", "AsmDwarfMacroTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfLine,  "AsmDwarfLine",  "AsmDwarfLineTag"  );
+     NEW_TERMINAL_MACRO ( AsmDwarfMacroList, "AsmDwarfMacroList", "AsmDwarfMacroListTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfLineList,  "AsmDwarfLineList",  "AsmDwarfLineListTag"  );
 
+  // These are a subset (but most of) the possible Dwarf Tags, I have skipped some of the
+  // architecture specific tags (except for GNU).  There are about 63 new IR nodes here.
+  // These are kinds of language constructs that are stored in the ".debug_info" section 
+  // when dwarf debug information is available (generated by the compiler) in the binary 
+  // executable.
+     NEW_TERMINAL_MACRO ( AsmDwarfArrayType, "AsmDwarfArrayType", "AsmDwarfArrayTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfClassType, "AsmDwarfClassType", "AsmDwarfClassTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfEntryPoint, "AsmDwarfEntryPoint", "AsmDwarfEntryPointTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfEnumerationType, "AsmDwarfEnumerationType", "AsmDwarfEnumerationTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfFormalParameter, "AsmDwarfFormalParameter", "AsmDwarfFormalParameterTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfImportedDeclaration, "AsmDwarfImportedDeclaration", "AsmDwarfImportedDeclarationTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfLabel, "AsmDwarfLabel", "AsmDwarfLabelTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfLexicalBlock, "AsmDwarfLexicalBlock", "AsmDwarfLexicalBlockTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfMember, "AsmDwarfMember", "AsmDwarfMemberTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfPointerType, "AsmDwarfPointerType", "AsmDwarfPointerTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfReferenceType, "AsmDwarfReferenceType", "AsmDwarfReferenceTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfCompilationUnit,  "AsmDwarfCompilationUnit",  "AsmDwarfCompilationUnitTag"  );
+     NEW_TERMINAL_MACRO ( AsmDwarfStringType, "AsmDwarfStringType", "AsmDwarfStringTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfStructureType, "AsmDwarfStructureType", "AsmDwarfStructureTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfSubroutineType, "AsmDwarfSubroutineType", "AsmDwarfSubroutineTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfTypedef, "AsmDwarfTypedef", "AsmDwarfTypedefTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfUnionType, "AsmDwarfUnionType", "AsmDwarfUnionTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfUnspecifiedParameters, "AsmDwarfUnspecifiedParameters", "AsmDwarfUnspecifiedParametersTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfVariant, "AsmDwarfVariant", "AsmDwarfVariantTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfCommonBlock, "AsmDwarfCommonBlock", "AsmDwarfCommonBlockTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfCommonInclusion, "AsmDwarfCommonInclusion", "AsmDwarfCommonInclusionTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfInheritance, "AsmDwarfInheritance", "AsmDwarfInheritanceTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfInlinedSubroutine, "AsmDwarfInlinedSubroutine", "AsmDwarfInlinedSubroutineTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfModule, "AsmDwarfModule", "AsmDwarfModuleTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfPtrToMemberType, "AsmDwarfPtrToMemberType", "AsmDwarfPtrToMemberTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfSetType, "AsmDwarfSetType", "AsmDwarfSetTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfSubrangeType, "AsmDwarfSubrangeType", "AsmDwarfSubrangeTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfWithStmt, "AsmDwarfWithStmt", "AsmDwarfWithStmtTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfAccessDeclaration, "AsmDwarfAccessDeclaration", "AsmDwarfAccessDeclarationTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfBaseType, "AsmDwarfBaseType", "AsmDwarfBaseTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfCatchBlock, "AsmDwarfCatchBlock", "AsmDwarfCatchBlockTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfConstType, "AsmDwarfConstType", "AsmDwarfConstTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfConstant, "AsmDwarfConstant", "AsmDwarfConstantTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfEnumerator, "AsmDwarfEnumerator", "AsmDwarfEnumeratorTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfFileType, "AsmDwarfFileType", "AsmDwarfFileTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfFriend, "AsmDwarfFriend", "AsmDwarfFriendTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfNamelist, "AsmDwarfNamelist", "AsmDwarfNamelistTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfNamelistItem, "AsmDwarfNamelistItem", "AsmDwarfNamelistItemTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfPackedType, "AsmDwarfPackedType", "AsmDwarfPackedTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfSubprogram, "AsmDwarfSubprogram", "AsmDwarfSubprogramTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfTemplateTypeParameter, "AsmDwarfTemplateTypeParameter", "AsmDwarfTemplateTypeParameterTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfTemplateValueParameter, "AsmDwarfTemplateValueParameter", "AsmDwarfTemplateValueParameterTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfThrownType, "AsmDwarfThrownType", "AsmDwarfThrownTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfTryBlock, "AsmDwarfTryBlock", "AsmDwarfTryBlockTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfVariantPart, "AsmDwarfVariantPart", "AsmDwarfVariantPartTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfVariable, "AsmDwarfVariable", "AsmDwarfVariableTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfVolatileType, "AsmDwarfVolatileType", "AsmDwarfVolatileTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfDwarfProcedure, "AsmDwarfDwarfProcedure", "AsmDwarfDwarfProcedureTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfRestrictType, "AsmDwarfRestrictType", "AsmDwarfRestrictTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfInterfaceType, "AsmDwarfInterfaceType", "AsmDwarfInterfaceTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfNamespace, "AsmDwarfNamespace", "AsmDwarfNamespaceTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfImportedModule, "AsmDwarfImportedModule", "AsmDwarfImportedModuleTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfUnspecifiedType, "AsmDwarfUnspecifiedType", "AsmDwarfUnspecifiedTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfPartialUnit, "AsmDwarfPartialUnit", "AsmDwarfPartialUnitTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfImportedUnit, "AsmDwarfImportedUnit", "AsmDwarfImportedUnitTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfMutableType, "AsmDwarfMutableType", "AsmDwarfMutableTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfCondition, "AsmDwarfCondition", "AsmDwarfConditionTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfSharedType, "AsmDwarfSharedType", "AsmDwarfSharedTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfFormatLabel, "AsmDwarfFormatLabel", "AsmDwarfFormatLabelTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfFunctionTemplate, "AsmDwarfFunctionTemplate", "AsmDwarfFunctionTemplateTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfClassTemplate, "AsmDwarfClassTemplate", "AsmDwarfClassTemplateTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfUpcSharedType, "AsmDwarfUpcSharedType", "AsmDwarfUpcSharedTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfUpcStrictType, "AsmDwarfUpcStrictType", "AsmDwarfUpcStrictTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfUpcRelaxedType, "AsmDwarfUpcRelaxedType", "AsmDwarfUpcRelaxedTypeTag" );
+     NEW_TERMINAL_MACRO ( AsmDwarfUnknownConstruct, "AsmDwarfUnknownConstruct", "AsmDwarfUnknownConstructTag" );
+
+     NEW_NONTERMINAL_MACRO ( AsmDwarfConstruct,
+               AsmDwarfArrayType | AsmDwarfClassType | AsmDwarfEntryPoint | AsmDwarfEnumerationType | AsmDwarfFormalParameter | AsmDwarfImportedDeclaration | 
+               AsmDwarfLabel | AsmDwarfLexicalBlock | AsmDwarfMember | AsmDwarfPointerType | AsmDwarfReferenceType | AsmDwarfCompilationUnit | AsmDwarfStringType | 
+               AsmDwarfStructureType | AsmDwarfSubroutineType | AsmDwarfTypedef | AsmDwarfUnionType | AsmDwarfUnspecifiedParameters | AsmDwarfVariant | 
+               AsmDwarfCommonBlock | AsmDwarfCommonInclusion | AsmDwarfInheritance | AsmDwarfInlinedSubroutine | AsmDwarfModule | AsmDwarfPtrToMemberType | 
+               AsmDwarfSetType | AsmDwarfSubrangeType | AsmDwarfWithStmt | AsmDwarfAccessDeclaration | AsmDwarfBaseType | AsmDwarfCatchBlock | AsmDwarfConstType | 
+               AsmDwarfConstant | AsmDwarfEnumerator | AsmDwarfFileType | AsmDwarfFriend | AsmDwarfNamelist | AsmDwarfNamelistItem | AsmDwarfPackedType | 
+               AsmDwarfSubprogram | AsmDwarfTemplateTypeParameter | AsmDwarfTemplateValueParameter | AsmDwarfThrownType | AsmDwarfTryBlock | AsmDwarfVariantPart |
+               AsmDwarfVariable | AsmDwarfVolatileType | AsmDwarfDwarfProcedure | AsmDwarfRestrictType | AsmDwarfInterfaceType | AsmDwarfNamespace |
+               AsmDwarfImportedModule | AsmDwarfUnspecifiedType | AsmDwarfPartialUnit | AsmDwarfImportedUnit | AsmDwarfMutableType | AsmDwarfCondition | 
+               AsmDwarfSharedType | AsmDwarfFormatLabel | AsmDwarfFunctionTemplate | AsmDwarfClassTemplate | AsmDwarfUpcSharedType | AsmDwarfUpcStrictType | 
+               AsmDwarfUpcRelaxedType | AsmDwarfUnknownConstruct, "AsmDwarfConstruct", "AsmDwarfConstructTag", false /* canHaveInstances = false */ );
+
+     NEW_TERMINAL_MACRO ( AsmDwarfConstructList, "AsmDwarfConstructList", "AsmDwarfConstructListTag" );
+
+     NEW_TERMINAL_MACRO ( AsmDwarfCompilationUnitList, "AsmDwarfCompilationUnitList",  "AsmDwarfCompilationUnitListTag"  );
+
+     NEW_NONTERMINAL_MACRO ( AsmDwarfInformation,
+               AsmDwarfMacro | AsmDwarfMacroList | AsmDwarfLine | AsmDwarfLineList | AsmDwarfCompilationUnitList |
+               AsmDwarfConstruct | AsmDwarfConstructList, "AsmDwarfInformation", "AsmDwarfInformationTag", false /* canHaveInstances = false */ );
+
+// ***************************************************************************************
+//                     END OF DWARF SPECIFIC IR NODE DEFINITIONS
+// ***************************************************************************************
+
+
+
   // Root of class hierarchy for binary file support
      NEW_NONTERMINAL_MACRO ( AsmExecutableFileFormat,
                AsmGenericDLL           | AsmGenericFormat        | AsmGenericDLLList           |
-               AsmGenericFile          | AsmGenericSection       | AsmGenericSymbol            | AsmGenericStrtab | 
-               AsmGenericSymbolList    | AsmGenericSectionList   | AsmGenericHeaderList        | AsmGenericString |
-               AsmElfSectionTableEntry | AsmElfSegmentTableEntry | AsmElfSymbolList            |
-               AsmElfRelaEntry         | AsmElfRelaEntryList     |
-               AsmElfDynamicEntry      | AsmElfDynamicEntryList  | AsmElfSegmentTableEntryList | AsmStringStorage |
-               AsmPEImportDirectory    | AsmPEImportHintName     | AsmPESectionTableEntry      | 
-               AsmPERVASizePair        | AsmCoffSymbolList       | AsmPERVASizePairList        | AsmPEDLLList | AsmPEImportHintNameList |
+               AsmGenericFile          | AsmGenericSection       | AsmGenericSymbol            | AsmGenericStrtab         |
+               AsmGenericSymbolList    | AsmGenericSectionList   | AsmGenericHeaderList        | AsmGenericString         |
+               AsmElfSectionTableEntry | AsmElfSegmentTableEntry | AsmElfSymbolList            | AsmPEImportILTEntry      |
+               AsmElfRelaEntry         | AsmElfRelaEntryList     | AsmPEExportEntry            | AsmPEExportEntryList     |
+               AsmElfDynamicEntry      | AsmElfDynamicEntryList  | AsmElfSegmentTableEntryList | AsmStringStorage         |
+               AsmPEImportDirectory    | AsmPEImportHNTEntry     | AsmPESectionTableEntry      | AsmPEExportDirectory     |
+               AsmPERVASizePair        | AsmCoffSymbolList       | AsmPERVASizePairList        |
+               AsmPEImportHNTEntryList | AsmPEImportILTEntryList | AsmPEImportLookupTable      | AsmPEImportDirectoryList |
                AsmNEEntryPoint         | AsmNERelocEntry         | AsmNESectionTableEntry      |
-               AsmLEPageTableEntry     | AsmLEEntryPoint         | AsmLESectionTableEntry, "AsmExecutableFileFormat", "AsmExecutableFileFormatTag", false /* canHaveInstances = false */ );
+               AsmLEPageTableEntry     | AsmLEEntryPoint         | AsmLESectionTableEntry      | 
+               AsmDwarfInformation, "AsmExecutableFileFormat", "AsmExecutableFileFormatTag", false /* canHaveInstances = false */ );
 
 
   // This is the IR node for a binary executable that loosely corresponds to the SgFile IR node for 
@@ -291,23 +402,9 @@
      NEW_TERMINAL_MACRO ( AsmInterpretation, "AsmInterpretation", "AsmInterpretationTag" );
 
 #if USE_OLD_BINARY_EXECUTABLE_IR_NODES
-  // DQ (8/2/2008): these might be required for now, but we need to be removed later!
 
 #error "Dead Code!"
 
-  // DQ (1/6/2008): Added ELF program header and section header support to AST.
-     NEW_TERMINAL_MACRO ( AsmProgramHeader, "AsmProgramHeader", "AsmProgramHeaderTag" );
-     NEW_TERMINAL_MACRO ( AsmSectionHeader, "AsmSectionHeader", "AsmSectionHeaderTag" );
-
-  // DQ (1/6/2008): These store the lists of AsmProgramHeader and AsmSectionHeader objects.
-  // AsmFile can not have traversed data members and lists, so this give it two additional data members.
-     NEW_TERMINAL_MACRO ( AsmProgramHeaderList, "AsmProgramHeaderList", "AsmProgramHeaderListTag" );
-     NEW_TERMINAL_MACRO ( AsmSectionHeaderList, "AsmSectionHeaderList", "AsmSectionHeaderListTag" );
-
-  // We will elimiate: AsmFile, AsmProgramHeader, AsmSectionHeader, AsmProgramHeaderList, AsmSectionHeaderList
-  // NEW_NONTERMINAL_MACRO (AsmNode, AsmStatement | AsmExpression | AsmFile | AsmProgramHeader | AsmSectionHeader | AsmProgramHeaderList | AsmSectionHeaderList | AsmOperandList | AsmType | AsmExecutableFileFormat, "AsmNode","AsmNodeTag", false);
-  // NEW_NONTERMINAL_MACRO (AsmNode, AsmStatement | AsmExpression | AsmFile | AsmProgramHeader | AsmSectionHeader | AsmProgramHeaderList | AsmSectionHeaderList | AsmOperandList | AsmType | AsmExecutableFileFormat, "AsmNode","AsmNodeTag", false);
-     NEW_NONTERMINAL_MACRO (AsmNode, AsmStatement | AsmExpression | AsmFile | AsmProgramHeader | AsmSectionHeader | AsmProgramHeaderList | AsmSectionHeaderList | AsmOperandList | AsmType | AsmExecutableFileFormat, "AsmNode","AsmNodeTag", false);
 #else
      NEW_NONTERMINAL_MACRO (AsmNode, AsmStatement | AsmExpression | AsmFile | AsmInterpretation | AsmOperandList | AsmType | AsmExecutableFileFormat, "AsmNode","AsmNodeTag", false);
 #endif
@@ -316,9 +413,21 @@
   // AsmInstructionBase.setFunctionPrototype        ( "HEADER", "../Grammar/Common.code");
      AsmNode.setFunctionPrototype        ( "HEADER_BINARY", "../Grammar/BinaryInstruction.code");
 
-  // Asm instructions should be able to have attached attributes like other IR nodes in ROSE
+  // Asm instructions should be able to have attached attributes (comments) like other IR nodes in ROSE
      AsmNode.setDataPrototype     ( "AttachedPreprocessingInfoType*", "attachedPreprocessingInfoPtr", "= NULL",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, DEF_DELETE, COPY_DATA);
+
+#if 1
+  // DQ (11/10/2008): Added attribute via ROSETTA (changed to pointer to AstAttributeMechanism)
+  // Modified implementation to only be at specific IR nodes (now supporting all binary IR nodes).
+     AsmNode.setDataPrototype("AstAttributeMechanism*","asmAttributeMechanism","= NULL",
+            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, NO_COPY_DATA);
+
+  // Reuse the same definition as in SgSupport.
+     AsmNode.setFunctionPrototype      ( "HEADER_ATTRIBUTE_SUPPORT", "../Grammar/Support.code");
+     AsmNode.setFunctionSource         ( "SOURCE_ATTRIBUTE_SUPPORT", "../Grammar/Support.code");
+#endif
+
   // DQ (8/28/2008): Change "unsigned int" to "addr_t"
      AsmStatement.setDataPrototype("rose_addr_t","address","= 0",
                            CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
@@ -390,6 +499,19 @@
      AsmFile.setDataPrototype("SgAsmInterpretationPtrList","interpretations","",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_LIST_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
 
+  // DQ (11/5/2008): This currently added to the SgBinaryFile instead of the SgAsmFile, we may want to 
+  // move it later.  For now we can't add it to SgAsmFile becuase we could not traverse both a list and 
+  // a data member in the definition of an AST traversal.
+  // AsmFile.setDataPrototype("SgAsmDwarfCompilationUnit*","dwarf_info","= NULL",
+  //                       NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+  // DQ (11/6/2008): Moved Dwarf support to AsmInterpretation from SgBinaryFile. Moved ahead of the 
+  // SgAsmGenericHeader so that maps (of instructions to source) built in the Dwarf section can be 
+  // used in analysis in the instruction sections. since Dwarf is meant to be read-only (at least 
+  // for now) this is a simpler design and avoids redundant traversals.
+     AsmInterpretation.setDataPrototype("SgAsmDwarfCompilationUnitList*","dwarf_info","= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
   // DQ (8/13/2008): Required data member for Jeremiah's ROSE/projects/assemblyToSourceAst/x86AssemblyToC.C
   // DQ (8/13/2008): This needs to be removed once the x86AssemblyToC.C file is fixed up to not require it.
   // This is redundant with the more complete information in the SgAsmGenericSections of the binary file format.
@@ -415,7 +537,7 @@
   // std::string p_string;
      AsmBasicString.setFunctionPrototype ( "HEADER_BASIC_STRING", "../Grammar/BinaryInstruction.code");
      AsmBasicString.setDataPrototype("std::string","string","= \"\"",
-                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+                           NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
 
      AsmStoredString.setFunctionPrototype ( "HEADER_STORED_STRING", "../Grammar/BinaryInstruction.code");
      AsmStoredString.setDataPrototype("SgAsmStringStorage*","storage","= NULL",
@@ -432,6 +554,8 @@
      AsmElfFileHeader.setFunctionPrototype ( "HEADER_ELF_HEADER", "../Grammar/BinaryInstruction.code");
      AsmElfFileHeader.setDataPrototype("unsigned char","e_ident_file_class","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmElfFileHeader.setDataPrototype("unsigned char","e_ident_data_encoding","= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmElfFileHeader.setDataPrototype("unsigned char","e_ident_file_version","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmElfFileHeader.setDataPrototype("SgUnsignedCharList","e_ident_padding","",
@@ -441,9 +565,9 @@
      AsmElfFileHeader.setDataPrototype("unsigned long","e_machine","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmElfFileHeader.setDataPrototype("rose_addr_t","e_phoff","= 0",
-                           NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmElfFileHeader.setDataPrototype("rose_addr_t","e_shoff","= 0",
-                           NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmElfFileHeader.setDataPrototype("unsigned long","e_flags","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmElfFileHeader.setDataPrototype("unsigned long","e_ehsize","= 0",
@@ -552,7 +676,7 @@
   // DQ (8/28/2008): Check against the specification
      AsmElfSectionTableEntry.setDataPrototype("unsigned","sh_name","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
-     AsmElfSectionTableEntry.setDataPrototype("unsigned long","sh_type","= 0",
+     AsmElfSectionTableEntry.setDataPrototype("SgAsmElfSectionTableEntry::SectionType","sh_type","= SHT_PROGBITS",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmElfSectionTableEntry.setDataPrototype("unsigned long","sh_link","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
@@ -670,37 +794,33 @@
      AsmPEFileHeader.setDataPrototype("unsigned","e_cpu_type","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("unsigned","e_nsections","= 0",
-                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+                           NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("unsigned","e_time","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("rose_addr_t","e_coff_symtab","= 0",
-                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+                           NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("rose_addr_t","e_nt_hdr_size","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("unsigned","e_coff_nsyms","= 0",
-                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+                           NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("unsigned","e_flags","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("unsigned","e_opt_magic","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("unsigned","e_lmajor","= 0",
-                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+                           NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("unsigned","e_lminor","= 0",
-                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+                           NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("unsigned","e_code_size","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("unsigned","e_data_size","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("unsigned","e_bss_size","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
-     AsmPEFileHeader.setDataPrototype("unsigned","e_entrypoint_rva","= 0",
+     AsmPEFileHeader.setDataPrototype("rose_rva_t","e_code_rva","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
-     AsmPEFileHeader.setDataPrototype("unsigned","e_code_rva","= 0",
+     AsmPEFileHeader.setDataPrototype("rose_rva_t","e_data_rva","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
-     AsmPEFileHeader.setDataPrototype("unsigned","e_data_rva","= 0",
-                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
-     AsmPEFileHeader.setDataPrototype("rose_addr_t","e_image_base","= 0",
-                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("unsigned","e_section_align","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("unsigned","e_file_align","= 0",
@@ -722,7 +842,7 @@
      AsmPEFileHeader.setDataPrototype("unsigned","e_image_size","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("unsigned","e_header_size","= 0",
-                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+                           NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("unsigned","e_file_checksum","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("unsigned","e_subsystem","= 0",
@@ -740,7 +860,7 @@
      AsmPEFileHeader.setDataPrototype("unsigned","e_loader_flags","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("unsigned","e_num_rvasize_pairs","= 0",
-                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+                           NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
   // AsmPEFileHeader.setDataPrototype("std::vector<RVASizePair>","rvasize_pairs","",
   //                       NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEFileHeader.setDataPrototype("SgAsmPERVASizePairList*","rvasize_pairs","= NULL",
@@ -763,7 +883,7 @@
 
   // addr_t e_rva, e_size;
      AsmPERVASizePair.setFunctionPrototype ( "HEADER_PE_RVA_SIZE_PAIR", "../Grammar/BinaryInstruction.code");
-     AsmPERVASizePair.setDataPrototype("rose_addr_t","e_rva","= 0",
+     AsmPERVASizePair.setDataPrototype("rose_rva_t","e_rva","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPERVASizePair.setDataPrototype("rose_addr_t","e_size","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
@@ -808,18 +928,36 @@
 
 
 
-  // std::vector<PEDLL*> dlls;
      AsmPEImportSection.setFunctionPrototype ( "HEADER_PE_IMPORT_SECTION", "../Grammar/BinaryInstruction.code");
-  // AsmPEImportSection.setDataPrototype("SgAsmPEDLLPtrList","section_table","",
-  //                       NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
-  // AsmPEImportSection.setDataPrototype("SgAsmPEDLLPtrList","dlls","",
-  //                       NO_CONSTRUCTOR_PARAMETER, BUILD_LIST_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
-     AsmPEImportSection.setDataPrototype("SgAsmPEDLLList*","dlls","",
+     AsmPEImportSection.setDataPrototype ("SgAsmPEImportDirectoryList*","import_directories","= NULL",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
 
-     AsmPEDLLList.setDataPrototype("SgAsmPEDLLPtrList","dlls","",
+
+
+     AsmPEExportEntryList.setDataPrototype("SgAsmPEExportEntryPtrList", "exports", "",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_LIST_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
 
+
+
+     AsmPEExportSection.setFunctionPrototype("HEADER_PE_EXPORT_SECTION", "../Grammar/BinaryInstruction.code");
+     AsmPEExportSection.setDataPrototype("SgAsmPEExportDirectory*", "export_dir", "= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+     AsmPEExportSection.setDataPrototype("SgAsmPEExportEntryList*", "exports", "",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+
+
+     AsmPEExportEntry.setFunctionPrototype("HEADER_PE_EXPORT_ENTRY", "../Grammar/BinaryInstruction.code");
+     AsmPEExportEntry.setDataPrototype("SgAsmGenericString*", "name", "= NULL", 
+                           NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+     AsmPEExportEntry.setDataPrototype("unsigned", "ordinal", "= 0", 
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEExportEntry.setDataPrototype("rose_rva_t", "export_rva", "= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEExportEntry.setDataPrototype("SgAsmGenericString*", "forwarder", "= NULL", 
+                           NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+
   // std::vector<COFFSymbol*> symbols;
   // ExecSection *strtab;                /* Section containing symbol names */
      AsmCoffSymbolTable.setFunctionPrototype ( "HEADER_PE_COFF_SYMBOL_TABLE", "../Grammar/BinaryInstruction.code");
@@ -876,54 +1014,105 @@
      AsmPEExtendedDOSHeader.setDataPrototype("rose_addr_t","e_lfanew","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
 
-  // time_t testVariable;
-  // addr_t    hintnames_rva, bindings_rva, dll_name_rva;
-  // time_t    time;
-  // unsigned  forwarder_chain;
+
+
      AsmPEImportDirectory.setFunctionPrototype ( "HEADER_PE_IMPORT_DIRECTORY", "../Grammar/BinaryInstruction.code");
-     AsmPEImportDirectory.setDataPrototype("rose_addr_t","hintnames_rva","= 0",
+     AsmPEImportDirectory.setDataPrototype("int","idx","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
-     AsmPEImportDirectory.setDataPrototype("rose_addr_t","bindings_rva","= 0",
+     AsmPEImportDirectory.setDataPrototype("rose_rva_t","ilt_rva","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
-     AsmPEImportDirectory.setDataPrototype("rose_addr_t","dll_name_rva","= 0",
-                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEImportDirectory.setDataPrototype("SgAsmPEImportLookupTable*", "ilt", "= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
      AsmPEImportDirectory.setDataPrototype("time_t","time","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      AsmPEImportDirectory.setDataPrototype("unsigned","forwarder_chain","= 0",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEImportDirectory.setDataPrototype("rose_rva_t","dll_name_rva","= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEImportDirectory.setDataPrototype("SgAsmGenericString*", "dll_name", "=0", 
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEImportDirectory.setDataPrototype("rose_rva_t","iat_rva","= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEImportDirectory.setDataPrototype("SgAsmPEImportLookupTable*", "iat", "= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
 
-  // unsigned hint;
-  // std::string name;
-  // unsigned char padding;
-     AsmPEImportHintName.setFunctionPrototype ( "HEADER_PE_IMPORT_HINT_NAME", "../Grammar/BinaryInstruction.code");
-  // DQ (8/28/2008): Check against the specification
-     AsmPEImportHintName.setDataPrototype("unsigned","hint","= 0",
+
+
+     AsmPEImportILTEntry.setFunctionPrototype("HEADER_PE_IMPORT_ILT_ENTRY", "../Grammar/BinaryInstruction.code");
+     AsmPEImportILTEntry.setDataPrototype("SgAsmPEImportILTEntry::ILTEntryType", "entry_type", "=ILT_ORDINAL", 
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
-     AsmPEImportHintName.setDataPrototype("std::string","name","= \"\"",
+     AsmPEImportILTEntry.setDataPrototype("unsigned","ordinal","= 0",                   /*if entry_type==ILT_ORDINAL*/
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
-  // DQ (8/28/2008): Check against the specification
-     AsmPEImportHintName.setDataPrototype("unsigned char","padding","= 0",
+     AsmPEImportILTEntry.setDataPrototype("rose_rva_t","hnt_entry_rva","= 0",           /*if entry_type==ILT_HNT_ENTRY_RVA*/
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEImportILTEntry.setDataPrototype("SgAsmPEImportHNTEntry*","hnt_entry","= 0",   /*if entry_type==ILT_HNT_ENTRY_RVA*/
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEImportILTEntry.setDataPrototype("rose_rva_t","bound_rva","= 0",               /*if entry_type==ILT_BOUND_RVA*/
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEImportILTEntry.setDataPrototype("uint64_t","extra_bits","= 0",                /*non-zero reserved bits, all entry types*/
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
 
 
-  // PEImportDirectory *idir;
-  // std::vector<addr_t> hintname_rvas;          /* RVAs for the hint/name pairs of the DLL functions */
-  // std::vector<PEImportHintName*> hintnames;   /* The hint/name pairs */
-  // std::vector<addr_t> bindings;               /* Bindings (RVA) for each function */
-     AsmPEDLL.setFunctionPrototype ( "HEADER_PE_DLL", "../Grammar/BinaryInstruction.code");
-     AsmPEDLL.setDataPrototype ("SgAsmPEImportDirectory*","idir","= NULL",
-                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, NO_COPY_DATA);
-     AsmPEDLL.setDataPrototype ("SgAddressList","hintname_rvas","",
-                           NO_CONSTRUCTOR_PARAMETER, BUILD_LIST_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, NO_COPY_DATA);
-     AsmPEDLL.setDataPrototype ("SgAsmPEImportHintNameList*","hintnames","= NULL",
+
+     AsmPEImportLookupTable.setFunctionPrototype("HEADER_PE_IMPORT_LOOKUP_TABLE", "../Grammar/BinaryInstruction.code");
+     AsmPEImportLookupTable.setDataPrototype("bool", "is_iat", "= false",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEImportLookupTable.setDataPrototype("SgAsmPEImportILTEntryList*","entries","= NULL",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
-     AsmPEDLL.setDataPrototype ("SgAddressList","bindings","",
-                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, NO_COPY_DATA);
 
-     AsmPEImportHintNameList.setDataPrototype("SgAsmPEImportHintNamePtrList","hintnames","",
+
+
+     AsmPEImportHNTEntry.setFunctionPrototype("HEADER_PE_IMPORT_HNT_ENTRY", "../Grammar/BinaryInstruction.code");
+     AsmPEImportHNTEntry.setDataPrototype("unsigned","hint","= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEImportHNTEntry.setDataPrototype("SgAsmGenericString*","name","= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEImportHNTEntry.setDataPrototype("unsigned char","padding","= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+
+
+
+
+     AsmPEExportDirectory.setFunctionPrototype("HEADER_PE_EXPORT_DIRECTORY", "../Grammar/BinaryInstruction.code");
+     AsmPEExportDirectory.setDataPrototype("unsigned", "res1", "= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEExportDirectory.setDataPrototype("time_t", "timestamp", "= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEExportDirectory.setDataPrototype("unsigned", "vmajor", "= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEExportDirectory.setDataPrototype("unsigned", "vminor", "= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEExportDirectory.setDataPrototype("rose_rva_t", "name_rva", "= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEExportDirectory.setDataPrototype("unsigned", "ord_base", "= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEExportDirectory.setDataPrototype("size_t", "expaddr_n", "= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEExportDirectory.setDataPrototype("size_t", "nameptr_n", "= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEExportDirectory.setDataPrototype("rose_rva_t", "expaddr_rva", "= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEExportDirectory.setDataPrototype("rose_rva_t", "nameptr_rva", "= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEExportDirectory.setDataPrototype("rose_rva_t", "ordinals_rva", "= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmPEExportDirectory.setDataPrototype("SgAsmGenericString*", "name", "= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+
+
+
+
+
+     AsmPEImportHNTEntryList.setDataPrototype("SgAsmPEImportHNTEntryPtrList","hintnames","",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_LIST_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
 
+     AsmPEImportILTEntryList.setDataPrototype("SgAsmPEImportILTEntryPtrList","vector","",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_LIST_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
 
+     AsmPEImportDirectoryList.setDataPrototype("SgAsmPEImportDirectoryPtrList","vector","",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_LIST_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+
   // unsigned    e_linker_major, e_linker_minor, e_checksum, e_flags1, e_autodata_sn, e_bss_size, e_stack_size;
   // unsigned    e_csip, e_sssp, e_nsections, e_nmodrefs, e_nnonresnames, e_nmovable_entries, e_sector_align;
   // unsigned    e_nresources, e_exetype, e_flags2, e_res1, e_winvers;
@@ -1390,7 +1579,6 @@
      AsmGenericSectionList.setDataPrototype("SgAsmGenericSectionPtrList","sections","",
                            NO_CONSTRUCTOR_PARAMETER, BUILD_LIST_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
 
-
   // This data structure represents the ExecSection from file: ExecGeneric.h
   // ExecFile            *file;                          /* The file to which this section belongs */
   // ExecHeader          *header;                        /* Optional header associated with section */
@@ -1624,19 +1812,14 @@
 
 
 
-  // std::string         name;                           /* Name of library as stored in executable (usually a base name) */
-  // std::vector<std::string> funcs;                     /* List of functions needed from the library */
      AsmGenericDLL.setFunctionPrototype ( "HEADER_GENERIC_DLL", "../Grammar/BinaryInstruction.code");
-
-  // AsmGenericDLL.setAutomaticGenerationOfConstructor(false);
-  // AsmGenericDLL.setAutomaticGenerationOfDestructor(false);
-
      AsmGenericDLL.setDataPrototype("SgAsmGenericString*","name","= 0",
                             NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, NO_COPY_DATA);
-     AsmGenericDLL.setDataPrototype("SgStringList","funcs","",
+     AsmGenericDLL.setDataPrototype("SgStringList","symbols","",
                             NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, NO_COPY_DATA);
 
 
+
      AsmGenericStrtab.setFunctionPrototype("HEADER_GENERIC_STRTAB", "../Grammar/BinaryInstruction.code");
      AsmGenericStrtab.setAutomaticGenerationOfDestructor(false);
      AsmGenericStrtab.setDataPrototype("SgAsmGenericSection*", "container", "= NULL", 
@@ -1803,18 +1986,173 @@
      AsmNode.setDataPrototype("AstAttributeMechanism*","attributeMechanism","= NULL",
                   NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, NO_COPY_DATA);
      AsmNode.setFunctionPrototype      ( "HEADER_ATTRIBUTE_SUPPORT", "../Grammar/Support.code");
-     AsmNode.setFunctionSource         ( "SOURCE_ATTRIBUTE_SUPPORT", "../Grammar/Support.code");
 
 
+// DQ (11/3/2008): Later this might go into a separate file.
+// ***************************************************************************************
+// DWARF Support for mapping information in the binary executable back to the source code.
+// ***************************************************************************************
 
+  // This is the base class for all the AsmDwarf IR nodes
+     AsmDwarfInformation.setFunctionPrototype     ( "HEADER_DWARF_INFORMATION", "../Grammar/BinaryInstruction.code");
 
+  // This is the Dwarf CU:
+/*  Dwarf_Debug cc_dbg;
+    Dwarf_Word cc_length;
+    Dwarf_Small cc_length_size;
+    Dwarf_Small cc_extension_size;
+    Dwarf_Half cc_version_stamp;
+    Dwarf_Sword cc_abbrev_offset;
+    Dwarf_Small cc_address_size;
+    Dwarf_Word cc_debug_info_offset;
+    Dwarf_Byte_Ptr cc_last_abbrev_ptr;
+    Dwarf_Hash_Table cc_abbrev_hash_table;
+    Dwarf_CU_Context cc_next;
+    unsigned char cc_offset_length;
+*/
+     AsmDwarfCompilationUnit.setFunctionPrototype ( "HEADER_DWARF_COMPILATION_UNIT", "../Grammar/BinaryInstruction.code");
+  // AsmDwarfCompilationUnit.setDataPrototype("std::string","name","= \"\"",
+  //                       NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmDwarfCompilationUnit.setDataPrototype("std::string","producer","= \"\"",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmDwarfCompilationUnit.setDataPrototype("std::string","language","= \"\"",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmDwarfCompilationUnit.setDataPrototype("uint64_t","low_pc","= 0x0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmDwarfCompilationUnit.setDataPrototype("uint64_t","hi_pc","= 0x0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmDwarfCompilationUnit.setDataPrototype("int","version_stamp","= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmDwarfCompilationUnit.setDataPrototype("uint64_t","abbrev_offset","= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmDwarfCompilationUnit.setDataPrototype("uint64_t","address_size","= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmDwarfCompilationUnit.setDataPrototype("uint64_t","offset_length","= 0",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmDwarfCompilationUnit.setDataPrototype("SgAsmDwarfLineList*","line_info","= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+     AsmDwarfCompilationUnit.setDataPrototype("SgAsmDwarfConstructList*","language_constructs","= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+     AsmDwarfCompilationUnit.setDataPrototype("SgAsmDwarfMacroList*","macro_info","= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
 
+     AsmDwarfCompilationUnitList.setFunctionPrototype  ( "HEADER_DWARF_COMPILATION_UNIT_LIST", "../Grammar/BinaryInstruction.code");
+     AsmDwarfCompilationUnitList.setDataPrototype("SgAsmDwarfCompilationUnitPtrList","cu_list","",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_LIST_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+     AsmDwarfMacroList.setFunctionPrototype ( "HEADER_DWARF_MACRO_LIST", "../Grammar/BinaryInstruction.code");
+     AsmDwarfMacroList.setDataPrototype("SgAsmDwarfMacroPtrList","macro_list","",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_LIST_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+     AsmDwarfMacro.setFunctionPrototype     ( "HEADER_DWARF_MACRO", "../Grammar/BinaryInstruction.code");
+     AsmDwarfMacro.setDataPrototype("std::string","macro_string","= \"\"",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+
+     AsmDwarfLineList.setFunctionPrototype  ( "HEADER_DWARF_LINE_LIST", "../Grammar/BinaryInstruction.code");
+     AsmDwarfLineList.setDataPrototype("SgAsmDwarfLinePtrList","line_list","",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_LIST_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+#if 0
+  // I am having trouble making these proper data members so just use function to return them, so that they are computed dynamically.
+     AsmDwarfLineList.setDataPrototype("SgInstructionAddressSourcePositionMapPtrList","instructionToSourceMap","",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_LIST_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmDwarfLineList.setDataPrototype("SgSourcePositionInstructionAddressMapPtrList","sourceToInstructionMap","",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_LIST_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+#endif
+
+     AsmDwarfLine.setFunctionPrototype      ( "HEADER_DWARF_LINE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfLine.setDataPrototype("uint64_t","address","= 0",
+                           CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmDwarfLine.setDataPrototype("int","file_id","= Sg_File_Info::NULL_FILE_ID",
+                           CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmDwarfLine.setDataPrototype("int","line","= 0",
+                           CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmDwarfLine.setDataPrototype("int","column","= 0",
+                           CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+
+     AsmDwarfConstruct.setFunctionPrototype ( "HEADER_DWARF_CONSTRUCT", "../Grammar/BinaryInstruction.code");
+
+  // For now we will store the nesting level (just to support debugging), then it will be removed.
+     AsmDwarfConstruct.setDataPrototype("int","nesting_level","= 0",
+                           CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+
+     AsmDwarfConstruct.setDataPrototype("uint64_t","offset","= 0",
+                           CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     AsmDwarfConstruct.setDataPrototype("uint64_t","overall_offset","= 0",
+                           CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+
+  // A lot of constructs have a name so put the name into the base class
+     AsmDwarfConstruct.setDataPrototype("std::string","name","= \"\"",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+
+  // This is a data member that can be filled in via a separate analysis (we would have to read the line information before hand).
+     AsmDwarfConstruct.setDataPrototype("SgAsmDwarfLine*","source_position","= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+
+     AsmDwarfConstructList.setFunctionPrototype ( "HEADER_DWARF_CONSTRUCT_LIST", "../Grammar/BinaryInstruction.code");
+     AsmDwarfConstructList.setDataPrototype("SgAsmDwarfConstructPtrList","list","",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_LIST_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+  // These are the Dwarf IR nodes that require support for children
+     AsmDwarfSubprogram.setFunctionPrototype ( "HEADER_DWARF_SUBPROGRAM", "../Grammar/BinaryInstruction.code");
+     AsmDwarfSubprogram.setDataPrototype("SgAsmDwarfConstructList*","body","= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+     AsmDwarfStructureType.setFunctionPrototype ( "HEADER_DWARF_STRUCTURE_TYPE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfStructureType.setDataPrototype("SgAsmDwarfConstructList*","body","= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+     AsmDwarfArrayType.setFunctionPrototype ( "HEADER_DWARF_ARRAY_TYPE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfArrayType.setDataPrototype("SgAsmDwarfConstructList*","body","= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+     AsmDwarfLexicalBlock.setFunctionPrototype ( "HEADER_DWARF_LEXICAL_BLOCK", "../Grammar/BinaryInstruction.code");
+     AsmDwarfLexicalBlock.setDataPrototype("SgAsmDwarfConstructList*","body","= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+     AsmDwarfInlinedSubroutine.setFunctionPrototype ( "HEADER_DWARF_INLINED_SUBROUTINE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfInlinedSubroutine.setDataPrototype("SgAsmDwarfConstructList*","body","= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+     AsmDwarfEnumerationType.setFunctionPrototype ( "HEADER_DWARF_ENUMERATION_TYPE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfEnumerationType.setDataPrototype("SgAsmDwarfConstructList*","body","= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+     AsmDwarfSubroutineType.setFunctionPrototype ( "HEADER_DWARF_SUBROUTINE_TYPE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfSubroutineType.setDataPrototype("SgAsmDwarfConstructList*","body","= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+     AsmDwarfUnionType.setFunctionPrototype ( "HEADER_DWARF_UNION_TYPE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfUnionType.setDataPrototype("SgAsmDwarfConstructList*","body","= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+     AsmDwarfNamespace.setFunctionPrototype ( "HEADER_DWARF_NAMESPACE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfNamespace.setDataPrototype("SgAsmDwarfConstructList*","body","= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+     AsmDwarfClassType.setFunctionPrototype ( "HEADER_DWARF_CLASS_TYPE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfClassType.setDataPrototype("SgAsmDwarfConstructList*","body","= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+     AsmDwarfCommonBlock.setFunctionPrototype ( "HEADER_DWARF_COMMON_BLOCK", "../Grammar/BinaryInstruction.code");
+     AsmDwarfCommonBlock.setDataPrototype("SgAsmDwarfConstructList*","body","= NULL",
+                           NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
+
+// ***************************************************************************************
+//                     END OF DWARF SPECIFIC IR NODE DEFINITIONS
+// ***************************************************************************************
+
+
+
+
   // ***********************************************************************
   // ***********************************************************************
   //                       Source Code Definition
   // ***********************************************************************
   // ***********************************************************************
 
+     AsmNode.setFunctionSource         ( "SOURCE_ATTRIBUTE_SUPPORT", "../Grammar/Support.code");
+
   // Binary File Format
      AsmExecutableFileFormat.setFunctionSource ( "SOURCE_EXECUTABLE_FILE_FORMAT", "../Grammar/BinaryInstruction.code");
 
@@ -1854,13 +2192,9 @@
      AsmPESection.setFunctionSource ( "SOURCE_PE_SECTION", "../Grammar/BinaryInstruction.code");
      AsmPESectionTable.setFunctionSource ( "SOURCE_PE_SECTION_TABLE", "../Grammar/BinaryInstruction.code");
      AsmCoffSymbolTable.setFunctionSource ( "SOURCE_PE_COFF_SYMBOL_TABLE", "../Grammar/BinaryInstruction.code");
-     AsmPEImportHintName.setFunctionSource ( "SOURCE_PE_IMPORT_HINT_NAME", "../Grammar/BinaryInstruction.code");
      AsmPEImportDirectory.setFunctionSource ( "SOURCE_PE_IMPORT_DIRECTORY", "../Grammar/BinaryInstruction.code");
-     AsmPEImportSection.setFunctionSource ( "SOURCE_PE_IMPORT_SECTION", "../Grammar/BinaryInstruction.code");
      AsmPEExtendedDOSHeader.setFunctionSource ( "SOURCE_PE_EXTENDED_DOS_HEADER", "../Grammar/BinaryInstruction.code");
      AsmPESectionTableEntry.setFunctionSource ( "SOURCE_PE_SECTION_TABLE_ENTRY", "../Grammar/BinaryInstruction.code");
-     AsmPEDLL.setFunctionSource ( "SOURCE_PE_DLL", "../Grammar/BinaryInstruction.code");
-  // AsmCoffSymbolList.setFunctionSource ( "SOURCE_PE_COFF_SYMBOL_LIST", "../Grammar/BinaryInstruction.code");
      AsmCoffSymbol.setFunctionSource ( "SOURCE_PE_COFF_SYMBOL", "../Grammar/BinaryInstruction.code");
      AsmCoffStrtab.setFunctionSource("SOURCE_COFF_STRING_TABLE", "../Grammar/BinaryInstruction.code");
 
@@ -1901,7 +2235,7 @@
      AsmFunctionDeclaration.setFunctionSource      ( "SOURCE_BINARY_FUNCTION_DECLARATION", "../Grammar/BinaryInstruction.code");
      AsmNode.setFunctionSource                     ( "SOURCE_BINARY_NODE", "../Grammar/BinaryInstruction.code");
      Asmx86Instruction.setFunctionSource           ( "SOURCE_BINARY_X86_INSTRUCTION", "../Grammar/BinaryInstruction.code");
-     // AsmArmInstruction.setFunctionSource           ( "SOURCE_BINARY_ARM_INSTRUCTION", "../Grammar/BinaryInstruction.code");
+  // AsmArmInstruction.setFunctionSource           ( "SOURCE_BINARY_ARM_INSTRUCTION", "../Grammar/BinaryInstruction.code");
 
      AsmType.setFunctionSource            ( "SOURCE_BINARY_TYPE", "../Grammar/BinaryInstruction.code");
      AsmTypeByte.setFunctionSource        ( "SOURCE_BINARY_TYPE_BYTE", "../Grammar/BinaryInstruction.code");
@@ -1936,4 +2270,39 @@
      AsmProgramHeaderList.setFunctionSource ( "SOURCE_BINARY_FILE_PROGRAM_HEADER_LIST", "../Grammar/BinaryInstruction.code");
 #endif
 
+// DQ (11/3/2008): Later this might go into a separate file.
+// ***************************************************************************************
+// DWARF Support for mapping information in the binary executable back to the source code.
+// ***************************************************************************************
+
+     AsmDwarfInformation.setFunctionSource       ( "SOURCE_DWARF_INFORMATION", "../Grammar/BinaryInstruction.code");
+     AsmDwarfCompilationUnit.setFunctionSource   ( "SOURCE_DWARF_COMPILATION_UNIT", "../Grammar/BinaryInstruction.code");
+     AsmDwarfMacro.setFunctionSource             ( "SOURCE_DWARF_MACRO", "../Grammar/BinaryInstruction.code");
+     AsmDwarfLine.setFunctionSource              ( "SOURCE_DWARF_LINE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfMacroList.setFunctionSource         ( "SOURCE_DWARF_MACRO_LIST", "../Grammar/BinaryInstruction.code");
+     AsmDwarfLineList.setFunctionSource          ( "SOURCE_DWARF_LINE_LIST", "../Grammar/BinaryInstruction.code");
+
+     AsmDwarfConstruct.setFunctionSource         ( "SOURCE_DWARF_CONSTRUCT", "../Grammar/BinaryInstruction.code");
+     AsmDwarfConstructList.setFunctionSource     ( "SOURCE_DWARF_CONSTRUCT_LIST", "../Grammar/BinaryInstruction.code");
+
+     AsmDwarfCompilationUnitList.setFunctionSource ( "SOURCE_DWARF_COMPILATION_UNIT_LIST", "../Grammar/BinaryInstruction.code");
+
+  // These are the Dwarf IR nodes that require support for children
+     AsmDwarfSubprogram.setFunctionSource        ( "SOURCE_DWARF_SUBPROGRAM", "../Grammar/BinaryInstruction.code");
+     AsmDwarfStructureType.setFunctionSource     ( "SOURCE_DWARF_STRUCTURE_TYPE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfArrayType.setFunctionSource         ( "SOURCE_DWARF_ARRAY_TYPE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfLexicalBlock.setFunctionSource      ( "SOURCE_DWARF_LEXICAL_BLOCK", "../Grammar/BinaryInstruction.code");
+     AsmDwarfInlinedSubroutine.setFunctionSource ( "SOURCE_DWARF_INLINED_SUBROUTINE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfEnumerationType.setFunctionSource   ( "SOURCE_DWARF_ENUMERATION_TYPE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfSubroutineType.setFunctionSource    ( "SOURCE_DWARF_SUBROUTINE_TYPE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfUnionType.setFunctionSource         ( "SOURCE_DWARF_UNION_TYPE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfNamespace.setFunctionSource         ( "SOURCE_DWARF_NAMESPACE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfClassType.setFunctionSource         ( "SOURCE_DWARF_CLASS_TYPE", "../Grammar/BinaryInstruction.code");
+     AsmDwarfCommonBlock.setFunctionSource       ( "SOURCE_DWARF_COMMON_BLOCK", "../Grammar/BinaryInstruction.code");
+
+// ***************************************************************************************
+//                     END OF DWARF SPECIFIC IR NODE DEFINITIONS
+// ***************************************************************************************
+
+
    }

Modified: branches/testonly/src/ROSETTA/src/buildStorageClasses.C
===================================================================
--- branches/testonly/src/ROSETTA/src/buildStorageClasses.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/ROSETTA/src/buildStorageClasses.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -764,6 +764,8 @@
                  ( varTypeString == "SgAsmNERelocEntry::NERelocTgtType" ) ||
                  ( varTypeString == "SgAsmNERelocEntry::NERelocFlags" ) ||
                  ( varTypeString == "SgInterfaceStatement::generic_spec_enum" ) ||
+                 ( varTypeString == "SgAsmPEImportILTEntry::ILTEntryType" ) ||
+                 ( varTypeString == "SgAsmElfSectionTableEntry::SectionType") ||
                  false 
               )
        {
@@ -1405,6 +1407,8 @@
                     default:
                        std::cout << " There is a class not handled in buildStorageClasses.C, Line " << __LINE__ << endl ;
                        std::cout << "In class " + classNameString + " caused by variable " + varTypeString + " p_" + varNameString << endl ;
+                       /* Does the type need to be added to one of the lists above?
+                        * See Terminal::evaluateType(std::string& varTypeString) */
                        assert (!"Stop immediately, since variable to build is not found ... " ) ;
                       break;
                   }

Modified: branches/testonly/src/ROSETTA/src/grammar.C
===================================================================
--- branches/testonly/src/ROSETTA/src/grammar.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/ROSETTA/src/grammar.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -911,17 +911,17 @@
 
 
 StringUtility::FileWithLineNumbers
-Grammar::buildStringForReturnDataMemberReferenceToPointersSource ( Terminal & node )
+Grammar::buildStringForProcessDataMemberReferenceToPointersSource ( Terminal & node )
    {
   // DQ & JH (1/17/2006): Added support for testing data members pointers if they point to IR nodes
 
      //AS Look at this one to see how the code in buildStringToTestPointerForContainmentInMemoryPoolSource is called
      //to generate code for checking the memory pool.
-     string isClassNameFunctionTemplateFileName   = "../Grammar/grammarReturnDataMemberReferenceToPointers.macro";
+     string isClassNameFunctionTemplateFileName   = "../Grammar/grammarProcessDataMemberReferenceToPointers.macro";
      StringUtility::FileWithLineNumbers returnString = readFileWithPos (isClassNameFunctionTemplateFileName);
   // printf ("returnString = %s \n",returnString);
 
-     string dataMemberSpecificString = node.buildReturnDataMemberReferenceToPointers();
+     string dataMemberSpecificString = node.buildProcessDataMemberReferenceToPointers();
 
      returnString = GrammarString::copyEdit(returnString,"$CODE_STRING",dataMemberSpecificString.c_str());
 
@@ -938,9 +938,9 @@
    }
 
 void
-Grammar::buildStringForReturnDataMemberReferenceToPointersSupport( Terminal & node, StringUtility::FileWithLineNumbers & outputFile )
+Grammar::buildStringForProcessDataMemberReferenceToPointersSupport( Terminal & node, StringUtility::FileWithLineNumbers & outputFile )
    {
-     StringUtility::FileWithLineNumbers editString = buildStringForReturnDataMemberReferenceToPointersSource(node);
+     StringUtility::FileWithLineNumbers editString = buildStringForProcessDataMemberReferenceToPointersSource(node);
 
   // printf ("editString = %s \n",editString.c_str());
 
@@ -956,7 +956,7 @@
           ROSE_ASSERT ((*treeNodeIterator) != NULL);
           ROSE_ASSERT ((*treeNodeIterator)->getBaseClass() != NULL);
 
-          buildStringForReturnDataMemberReferenceToPointersSupport(**treeNodeIterator,outputFile);
+          buildStringForProcessDataMemberReferenceToPointersSupport(**treeNodeIterator,outputFile);
         }
 #endif
    }
@@ -1969,13 +1969,18 @@
   return it->second;
 }
 
-Terminal& Grammar::getTerminalForVariant(size_t var) {
-  std::map<size_t, Terminal*>::const_iterator it = this->astVariantToTerminalMap.find(var);
-  ROSE_ASSERT (it != this->astVariantToTerminalMap.end());
-  ROSE_ASSERT (it->second);
-  return *(it->second);
-}
+Terminal& Grammar::getTerminalForVariant(size_t var)
+   {
+     std::map<size_t, Terminal*>::const_iterator it = this->astVariantToTerminalMap.find(var);
 
+  // Note that when this assertion fails it can be because the IR nodes 
+  // name is listed more than once in the "astNodeList" file.
+     ROSE_ASSERT (it != this->astVariantToTerminalMap.end());
+
+     ROSE_ASSERT (it->second);
+     return *(it->second);
+   }
+
 StringUtility::FileWithLineNumbers
 Grammar::buildVariants ()
    {
@@ -2450,6 +2455,10 @@
 
 #endif
 
+
+
+
+
 #if 1
    //-----------------------------------------------
    // generate code for the new and delete operators
@@ -2577,18 +2586,18 @@
   // --------------------------------------------
   // generate code for returning data member pointers to IR nodes
   // --------------------------------------------
-     StringUtility::FileWithLineNumbers ROSE_ReturnDataMemberReferenceToPointersSourceFile;
+     StringUtility::FileWithLineNumbers ROSE_ProcessDataMemberReferenceToPointersSourceFile;
 
-     ROSE_ReturnDataMemberReferenceToPointersSourceFile.push_back(StringUtility::StringWithLineNumber(includeHeaderString, "", 1));
+     ROSE_ProcessDataMemberReferenceToPointersSourceFile.push_back(StringUtility::StringWithLineNumber(includeHeaderString, "", 1));
   // Now build the source code for the terminals and non-terminals in the grammar
      ROSE_ASSERT (rootNode != NULL);
 
-     buildStringForReturnDataMemberReferenceToPointersSupport(*rootNode,ROSE_ReturnDataMemberReferenceToPointersSourceFile);
-     cout << "DONE: buildStringForReturnDataMemberReferenceToPointersSupport()" << endl;
+     buildStringForProcessDataMemberReferenceToPointersSupport(*rootNode,ROSE_ProcessDataMemberReferenceToPointersSourceFile);
+     cout << "DONE: buildStringForProcessDataMemberReferenceToPointersSupport()" << endl;
 
   // printf ("Exiting after building code to return references data members which are pointers to IR nodes \n");
   // ROSE_ASSERT(false);
-     Grammar::writeFile(ROSE_ReturnDataMemberReferenceToPointersSourceFile, ".", getGrammarName() + "ReturnDataMemberReferenceToPointers", ".C");
+     Grammar::writeFile(ROSE_ProcessDataMemberReferenceToPointersSourceFile, ".", getGrammarName() + "ProcessDataMemberReferenceToPointers", ".C");
 #endif
 
 #if 1

Modified: branches/testonly/src/ROSETTA/src/grammar.h
===================================================================
--- branches/testonly/src/ROSETTA/src/grammar.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/ROSETTA/src/grammar.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -339,7 +339,7 @@
        // AS (2/14/06): Added support for building code to return data member pointers to IR nodes
 	  StringUtility::FileWithLineNumbers buildStringForReturnDataMemberPointersSource ( Terminal & node );
 
-	  StringUtility::FileWithLineNumbers buildStringForReturnDataMemberReferenceToPointersSource ( Terminal & node );
+	  StringUtility::FileWithLineNumbers buildStringForProcessDataMemberReferenceToPointersSource ( Terminal & node );
 
        // DQ (3/7/2007): support for getChildIndex member function
 	  StringUtility::FileWithLineNumbers buildStringForGetChildIndexSource ( Terminal & node );
@@ -388,7 +388,8 @@
           void buildStringForReturnDataMemberPointersSupport ( Terminal & node, StringUtility::FileWithLineNumbers & outputFile );
 
        // DQ (4/30/2006): Support for buildStringForReturnDataMemberReferenceToPointersSource
-          void buildStringForReturnDataMemberReferenceToPointersSupport( Terminal & node, StringUtility::FileWithLineNumbers & outputFile );
+       // JJW (11/1/2008): Changed to process rather than return the references
+          void buildStringForProcessDataMemberReferenceToPointersSupport( Terminal & node, StringUtility::FileWithLineNumbers & outputFile );
 
        // DQ (12/23/2005): Relocated copy function to a separate file to imrove readability of source code
           void buildCopyMemberFunctions( Terminal & node, StringUtility::FileWithLineNumbers & outputFile );

Modified: branches/testonly/src/ROSETTA/src/statement.C
===================================================================
--- branches/testonly/src/ROSETTA/src/statement.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/ROSETTA/src/statement.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -2039,6 +2039,13 @@
      UseStatement.setDataPrototype ( "SgRenamePairPtrList", "rename_list", "",
                   NO_CONSTRUCTOR_PARAMETER, BUILD_LIST_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
 
+  // DQ (11/12/2008): With the Rice support for module files (thanks) we can now always reference 
+  // the module statement used by any use statement.  There can only be a single module per use statement.
+  // UseStatement.setDataPrototype ( "SgModuleStatementPtrList", "module_list", "",
+  //              NO_CONSTRUCTOR_PARAMETER, BUILD_LIST_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     UseStatement.setDataPrototype ( "SgModuleStatement*", "module", "= NULL",
+                  NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+
   // UseStatement.setDataPrototype ( "SgUseOnlyExpression*", "use_only"   , "= NULL",
   //      CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
 

Modified: branches/testonly/src/ROSETTA/src/support.C
===================================================================
--- branches/testonly/src/ROSETTA/src/support.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/ROSETTA/src/support.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -92,9 +92,10 @@
   // to an analysis phase to define and not defined in the structure of the AST.
      NEW_TERMINAL_MACRO (SourceFile, "SourceFile", "SourceFileTag" );
      NEW_TERMINAL_MACRO (BinaryFile, "BinaryFile", "BinaryFileTag" );
+     NEW_TERMINAL_MACRO (UnknownFile, "UnknownFile", "UnknownFileTag" );
 
   // Mark this as being able to be an IR node for now and later make it false.
-     NEW_NONTERMINAL_MACRO (File, SourceFile | BinaryFile, "File", "FileTag", false);
+     NEW_NONTERMINAL_MACRO (File, SourceFile | BinaryFile | UnknownFile , "File", "FileTag", false);
 #endif
      NEW_TERMINAL_MACRO (FileList, "FileList", "FileListTag" );
      NEW_TERMINAL_MACRO (Directory, "Directory", "DirectoryTag" );
@@ -484,6 +485,10 @@
 
      BinaryFile.setFunctionPrototype          ( "HEADER_APPLICATION_BINARY_FILE", "../Grammar/Support.code");
 
+     UnknownFile.setFunctionPrototype          ( "HEADER_APPLICATION_UNKNOWN_FILE", "../Grammar/Support.code");
+
+     
+
      File.setFunctionPrototype                ( "HEADER_APPLICATION_FILE", "../Grammar/Support.code");
   // File.setAutomaticGenerationOfConstructor(false);
   // Later we can have this be autogenerated (let's see what we need first)
@@ -713,6 +718,10 @@
   // the *.mod files to be put.  This is the data member for the list.
      SourceFile.setDataPrototype   ( "SgModuleStatementPtrList", "module_list", "",
                                      NO_CONSTRUCTOR_PARAMETER, BUILD_LIST_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+
+     UnknownFile.setDataPrototype   ( "SgGlobal*", "globalScope", "= NULL",
+                                     NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
 #endif
 
   // DQ (10/16/2005): Added to support C++ style argument handling in SgFile
@@ -782,14 +791,15 @@
                                      NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      File.setDataPrototype         ( "bool", "fortran_implicit_none", "= false",
                                      NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
-     File.setDataPrototype         ( "bool", "fortran_openmp", "= false",
+  //Liao, 10/28/2008: Support for OpenMP 3.0 model for C/C++ pragma, will use it for Fortran later on, changed fortran_openmp to openmp
+     File.setDataPrototype         ( "bool", "openmp", "= false",
                                      NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      File.setDataPrototype         ( "bool", "cray_pointer_support", "= false",
                                      NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
 
-  // DQ (12/11/2007): Addes support for parser to output the parser rules to be called. For Fortran 
+  // DQ (12/11/2007): Adds support for parser to output the parser rules to be called. For Fortran 
   // support in ROSE this corresponds to the "--dump" option in the Open Fortran Parser (OFP).
-  // There is no coresponding action with EDG for the C and C++ support in ROSE, so for C/C++
+  // There is no corresponding action with EDG for the C and C++ support in ROSE, so for C/C++
   // this option has no effect.
      File.setDataPrototype         ( "bool", "output_parser_actions", "= false",
                  NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
@@ -996,7 +1006,9 @@
                  NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
      File.setDataPrototype         ( "bool", "sourceFileUsesBinaryFileExtension", "= false",
                  NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
-
+     File.setDataPrototype         ( "bool", "sourceFileTypeIsUnknown", "= false",
+                 NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+     
   // DQ (10/13/2007): Add the binary file to the SgFile IR node so that we can hold both the source
   // code AST and the binary AST together.  This also permits the binary AST to be handled similarly
   // the the source code AST (for traversals, file I/O, etc.).
@@ -1005,11 +1017,27 @@
      BinaryFile.setDataPrototype         ( "SgAsmFile*", "binaryFile", "= NULL",
                  NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
 
+  // DQ (11/5/2008): This should maybe be added to the SgAsmFile instead of the SgBinaryFile, if so 
+  // we will move it.  For now we can't add it to SgAsmFile becuase we could not traverse both a 
+  // list and a data member in the definition of an AST traversal.
+  // BinaryFile.setDataPrototype("SgAsmDwarfCompilationUnit*","dwarf_info","= NULL",
+  //             NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
+
   // DQ (8/16/2008): parse binary executable file format only (some uses of ROSE may only do analysis of 
   // the binary executable file format and not the instructions).  This is also useful for testing.
      File.setDataPrototype         ( "bool", "read_executable_file_format_only", "= false",
                  NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
 
+  // DQ (11/9/2008): parse binary executable file format only (but skip the representation of 
+  // symbols since there can be thousands of them and they make the dot graphs impossible to manage).
+     File.setDataPrototype         ( "bool", "visualize_executable_file_format_skip_symbols", "= false",
+                 NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+
+  // DQ (11/9/2008): parse binary executable file format only (but skip the representation of 
+  // symbols since there can be thousands of them and they make the dot graphs impossible to manage).
+     File.setDataPrototype         ( "bool", "visualize_dwarf_only", "= false",
+                 NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
+
   // DQ (8/26/2008): Adds support for only disassembling the instructions, skips use of information 
   // gathered from the data structures built from the binary executable file format (symbols, 
   // section permisions, etc.).
@@ -1744,6 +1772,7 @@
      SourceFile.setFunctionSource      ( "SOURCE_APPLICATION_SOURCE_FILE", "../Grammar/Support.code");
      BinaryFile.setFunctionSource      ( "SOURCE_APPLICATION_BINARY_FILE", "../Grammar/Support.code");
      FileList.setFunctionSource        ( "SOURCE_APPLICATION_FILE_LIST", "../Grammar/Support.code");
+     UnknownFile.setFunctionSource     ( "SOURCE_APPLICATION_UNKNOWN_FILE", "../Grammar/Support.code");
 
      Project.setFunctionSource         ( "SOURCE_APPLICATION_PROJECT", "../Grammar/Support.code");
      Options.setFunctionSource         ( "SOURCE_OPTIONS", "../Grammar/Support.code");

Modified: branches/testonly/src/ROSETTA/src/terminal.C
===================================================================
--- branches/testonly/src/ROSETTA/src/terminal.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/ROSETTA/src/terminal.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1695,8 +1695,8 @@
 /*************************************************************************************************
 *  The function
 *       Terminal::buildListIteratorStringForReferenceToPointers()
-*  supports buildReturnDataMemberReferenceToPointers() by building the string representing the code 
-*  necessary to return references (pointers) all data member pointers to IR nodes contained in STL lists.
+*  supports buildProcessDataMemberReferenceToPointers() by building the string representing the code 
+*  necessary to process references (pointers) all data member pointers to IR nodes contained in STL lists.
 *************************************************************************************************/
 string Terminal::buildListIteratorStringForReferenceToPointers(string typeName, string variableName, string classNameString)
    {
@@ -1798,20 +1798,17 @@
        // Open up the loop over the list elements
           if (accessOperator=="->")
              {
-               returnString += "     if (" + originalList + "== NULL)\n";
-            // Return a NULL pointer so that the graph shows that this pointer equals NULL
-               returnString += "        returnVector.push_back(pair<SgNode**,std::string>( NULL,\""+variableName+"\"));\n";
-
+               returnString += "     if (" + originalList + "== NULL) {}\n";
                returnString += "     else\n";
              }
 
-          returnString += "     for ( " +iteratorBaseType + "::const_iterator " + iteratorName + " = " + originalList + accessOperator + "begin() \n"
+          returnString += "     for ( " +iteratorBaseType + "::iterator " + iteratorName + " = " + originalList + accessOperator + "begin() \n"
                        + "; " + iteratorName
                        + " != " + originalList + accessOperator + "end(); ++" 
                        + iteratorName + ") \n        { \n";
 
        // Declare the a loop variable (reference to current element of list)
-          returnString += "          returnVector.push_back(pair<SgNode**,std::string>( (SgNode**)(&(*" + iteratorName + ")),\""+variableName+"\"));\n";
+          returnString += "          handler->apply(*" + iteratorName + ",SgName(\""+variableName+"\"));\n";
                 
        // close off the loop
           returnString += "        } \n";
@@ -1823,11 +1820,11 @@
 //DQ (4/30/2006): This function is similar to buildReturnDataMemberPointers but returns reference to the pointers.
 /*************************************************************************************************
 *  The function
-*       Terminal::buildReturnDataMemberReferenceToPointers()
-*  builds the code for returning references to all data member pointers to IR nodes in the AST.
+*       Terminal::buildProcessDataMemberReferenceToPointers()
+*  builds the code for processing references to all data member pointers to IR nodes in the AST.
 *************************************************************************************************/
 string
-Terminal::buildReturnDataMemberReferenceToPointers ()
+Terminal::buildProcessDataMemberReferenceToPointers ()
    {
   // DQ (4/30/2006): This is a modified version of the code for buildReturnDataMemberPointers()
 
@@ -1840,7 +1837,7 @@
      vector<GrammarString *>::iterator stringListIterator;
 
      string classNameString = this-> name;
-     string s("std::vector<std::pair<SgNode**,std::string> > returnVector;\n") ;
+     string s ;
   // s += "   std::cout << \"------------ checking pointers of " + classNameString + "  -------------------\" << std::endl;\n" ;
   // s += "   ROSE_ASSERT ( pointer->p_freepointer == AST_FileIO::IS_VALID_POINTER() );\n";
   // AS Iterate over the terminal and its parents (base-classes).
@@ -1878,7 +1875,7 @@
                        {
                       // AS Checks to see if the pointer is a data member. Because the mechanism for generating access to variables
                       // is the same as the one accessing access member functions. We do not want the last case to show up here.
-                         s += "          returnVector.push_back(pair<SgNode**,std::string>( (SgNode**)(&(p_" + varNameString + ")),\""+varNameString+"\"));\n";
+                         s += "          handler->apply(p_" + varNameString + ",SgName(\""+varNameString+"\"));\n";
                        }
                       else
                        {
@@ -1889,15 +1886,13 @@
                               accessOperator = "->";
                               s += "     if (p_" + varNameString + " == NULL)\n";
                               s += "        {\n";
-                           // Return a NULL pointer so that th graph shows that this pointer equals NULL
-                              s += "          returnVector.push_back(pair<SgNode**,std::string>( NULL,\"" + varNameString + "\"));\n";
                               s += "        }\n";
                               s += "     else\n";
                               s += "        {\n";
-                              s += "          for ( rose_hash_multimap::const_iterator it_"+varNameString+ "= p_" + varNameString + accessOperator + "begin(); it_" + varNameString + "!= p_" + varNameString + accessOperator + "end(); ++" + "it_" + varNameString + ")\n";
+                              s += "          for ( rose_hash_multimap::iterator it_"+varNameString+ "= p_" + varNameString + accessOperator + "begin(); it_" + varNameString + "!= p_" + varNameString + accessOperator + "end(); ++" + "it_" + varNameString + ")\n";
                               s += "             {\n";
                            // Declare the a loop variable (reference to current element of list)
-                              s += "               returnVector.push_back(pair<SgNode**,std::string>( (SgNode**)(&(it_" + varNameString + "->second)), std::string(it_" + varNameString + "->first.str()) ) );\n";
+                              s += "               handler->apply(it_" + varNameString + "->second, it_" + varNameString + "->first);\n";
                            // close off the loop
                               s += "             }\n";
                               s += "        }\n";
@@ -1907,8 +1902,6 @@
              }
         }
 
-     s += "     return returnVector;\n";
-
      return s;
    }
 

Modified: branches/testonly/src/ROSETTA/src/terminal.h
===================================================================
--- branches/testonly/src/ROSETTA/src/terminal.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/ROSETTA/src/terminal.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -298,7 +298,7 @@
 
 // DQ (4/30/2006): Added similar function to buildReturnDataMemberPointers() so that we could 
 // return references to the pointers to IR nodes (required low level support for AST Merge).
-  std::string buildReturnDataMemberReferenceToPointers ();
+  std::string buildProcessDataMemberReferenceToPointers ();
   std::string buildListIteratorStringForReferenceToPointers(std::string typeName, std::string variableName, std::string classNameString);
 
 // DQ (3/7/2007): Building support for "long getChildIndex();" to be use for "bool isChild();" and other purposes.

Modified: branches/testonly/src/backend/asmUnparser/unparseArmAsm.C
===================================================================
--- branches/testonly/src/backend/asmUnparser/unparseArmAsm.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/backend/asmUnparser/unparseArmAsm.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -140,13 +140,9 @@
       result += unparseArmRegister(isSgAsmArmRegisterReferenceExpression(expr)->get_arm_register_code());
       break;
     case V_SgAsmByteValueExpression:
-      result += "#" + unparseArmSign(sign) + StringUtility::numberToString(isSgAsmByteValueExpression(expr)->get_value());
-      break;
     case V_SgAsmWordValueExpression:
-      result += "#" + unparseArmSign(sign) + StringUtility::numberToString(isSgAsmWordValueExpression(expr)->get_value());
-      break;
     case V_SgAsmDoubleWordValueExpression:
-      result += "#" + unparseArmSign(sign) + StringUtility::numberToString(isSgAsmDoubleWordValueExpression(expr)->get_value());
+      result += "#" + unparseArmSign(sign) + StringUtility::numberToString(SageInterface::getAsmConstant(isSgAsmValueExpression(expr)));
       break;
     default: {
       cerr << "Unhandled expression kind " << expr->class_name() << endl;

Modified: branches/testonly/src/backend/asmUnparser/unparseAsm.h
===================================================================
--- branches/testonly/src/backend/asmUnparser/unparseAsm.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/backend/asmUnparser/unparseAsm.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -27,7 +27,7 @@
          PowerpcRegisterClass cl,
          int num,
          PowerpcConditionRegisterAccessGranularity gr);
-std::string unparsePowerpcExpression(SgAsmExpression* expr);
+std::string unparsePowerpcExpression(SgAsmExpression* expr, bool useHex = false);
 std::string unparsePowerpcInstruction(SgAsmPowerpcInstruction* insn);
 std::string unparsePowerpcInstructionWithAddress(SgAsmPowerpcInstruction* insn);
 

Modified: branches/testonly/src/backend/asmUnparser/unparsePowerpcAsm.C
===================================================================
--- branches/testonly/src/backend/asmUnparser/unparsePowerpcAsm.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/backend/asmUnparser/unparsePowerpcAsm.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -8,6 +8,7 @@
 #include "rose.h"
 #include <iomanip>
 #include <boost/lexical_cast.hpp>
+#include "integerOps.h"
 
 using namespace std;
 
@@ -46,12 +47,10 @@
       return "fpscr";
     }
     case powerpc_regclass_spr: {
-      // FIXME: add names
-      return "spr" + boost::lexical_cast<string>(reg);
+      return sprToString((PowerpcSpecialPurposeRegister)reg);
     }
     case powerpc_regclass_tbr: {
-      // FIXME: add names
-      return "tbr" + boost::lexical_cast<string>(reg);
+      return tbrToString((PowerpcTimeBaseRegister)reg);
     }
     case powerpc_regclass_msr: {
       return "msr";
@@ -69,7 +68,7 @@
   }
 }
 
-string unparsePowerpcExpression(SgAsmExpression* expr) {
+string unparsePowerpcExpression(SgAsmExpression* expr, bool useHex) {
   string result = "";
   if (expr == NULL) return "BOGUS:NULL";
   switch (expr->variantT()) {
@@ -83,8 +82,8 @@
         case V_SgAsmBinaryAdd: {
           SgAsmBinaryAdd* a = isSgAsmBinaryAdd(addr);
           string lhs = unparsePowerpcExpression(a->get_lhs());
-          if (isSgAsmWordValueExpression(a->get_rhs())) {
-            result = boost::lexical_cast<string>((int)(int16_t)(isSgAsmWordValueExpression(a->get_rhs())->get_value())); // Sign-extend from 16 bits
+          if (isSgAsmValueExpression(a->get_rhs())) {
+            result = boost::lexical_cast<string>((int64_t)IntegerOps::signExtend<16, 64>(SageInterface::getAsmConstant(isSgAsmValueExpression(a->get_rhs())))); // Sign-extend from 16 bits
             result += "(" + lhs + ")";
           } else {
             result = lhs + ", " + unparsePowerpcExpression(a->get_rhs());
@@ -100,14 +99,17 @@
       result = unparsePowerpcRegister(rr->get_register_class(), rr->get_register_number(), rr->get_conditionRegisterGranularity());
       break;
     }
-    case V_SgAsmByteValueExpression: result = StringUtility::intToHex(isSgAsmByteValueExpression(expr)->get_value());
-                                     break;
-    case V_SgAsmWordValueExpression: result = StringUtility::intToHex(isSgAsmWordValueExpression(expr)->get_value());
-                                     break;
-    case V_SgAsmDoubleWordValueExpression: result = StringUtility::intToHex(isSgAsmDoubleWordValueExpression(expr)->get_value());
-                                           break;
-    case V_SgAsmQuadWordValueExpression: result = StringUtility::intToHex(isSgAsmQuadWordValueExpression(expr)->get_value());
-                                         break;
+    case V_SgAsmByteValueExpression:
+    case V_SgAsmWordValueExpression:
+    case V_SgAsmDoubleWordValueExpression:
+    case V_SgAsmQuadWordValueExpression: {
+      if (useHex) {
+        result = StringUtility::intToHex(SageInterface::getAsmConstant(isSgAsmValueExpression(expr)));
+      } else {
+        result = StringUtility::numberToString((int64_t)SageInterface::getAsmConstant(isSgAsmValueExpression(expr)));
+      }
+      break;
+    }
     default: {
       cerr << "Unhandled expression kind " << expr->class_name() << endl;
       ROSE_ASSERT (false);
@@ -127,7 +129,18 @@
   const SgAsmExpressionPtrList& operands = opList->get_operands();
   for (size_t i = 0; i < operands.size(); ++i) {
     if (i != 0) result += ", ";
-    result += unparsePowerpcExpression(operands[i]);
+    PowerpcInstructionKind kind = insn->get_kind();
+    bool isBranchTarget = (
+      ((kind == powerpc_b ||
+        kind == powerpc_bl ||
+        kind == powerpc_ba ||
+        kind == powerpc_bla) && i == 0) ||
+      ((kind == powerpc_bc ||
+        kind == powerpc_bcl ||
+        kind == powerpc_bca ||
+        kind == powerpc_bcla) && i == 2) ||
+      false);
+    result += unparsePowerpcExpression(operands[i], isBranchTarget);
   }
   return result;
 }

Modified: branches/testonly/src/backend/asmUnparser/unparseX86Asm.C
===================================================================
--- branches/testonly/src/backend/asmUnparser/unparseX86Asm.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/backend/asmUnparser/unparseX86Asm.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -117,14 +117,12 @@
       result = unparseX86Register(rr->get_register_class(), rr->get_register_number(), rr->get_position_in_register());
       break;
     }
-    case V_SgAsmByteValueExpression: result = StringUtility::intToHex(isSgAsmByteValueExpression(expr)->get_value());
-                                     break;
-    case V_SgAsmWordValueExpression: result = StringUtility::intToHex(isSgAsmWordValueExpression(expr)->get_value());
-                                     break;
-    case V_SgAsmDoubleWordValueExpression: result = StringUtility::intToHex(isSgAsmDoubleWordValueExpression(expr)->get_value());
-                                           break;
-    case V_SgAsmQuadWordValueExpression: result = StringUtility::intToHex(isSgAsmQuadWordValueExpression(expr)->get_value());
-                                         break;
+    case V_SgAsmByteValueExpression:
+    case V_SgAsmWordValueExpression:
+    case V_SgAsmDoubleWordValueExpression:
+    case V_SgAsmQuadWordValueExpression:
+      result = StringUtility::intToHex(SageInterface::getAsmConstant(isSgAsmValueExpression(expr)));
+      break;
     default: {
       cerr << "Unhandled expression kind " << expr->class_name() << endl;
       ROSE_ASSERT (false);

Modified: branches/testonly/src/backend/unparser/CxxCodeGeneration/unparseCxx_types.C
===================================================================
--- branches/testonly/src/backend/unparser/CxxCodeGeneration/unparseCxx_types.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/backend/unparser/CxxCodeGeneration/unparseCxx_types.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -208,7 +208,7 @@
                 ROSE_ASSERT(class_type != NULL);
                 SgClassDeclaration *cdecl = isSgClassDeclaration(class_type->get_declaration());
                 SgName nm = cdecl->get_qualified_name();
-                printf ("In unparseType(%p): nm = %s \n",t,nm.str());
+                //printf ("In unparseType(%p): nm = %s \n",t,nm.str());
                 if (nm.getString() != "")
                     return nm.getString();
                 else

Modified: branches/testonly/src/backend/unparser/FortranCodeGeneration/Makefile.am
===================================================================
--- branches/testonly/src/backend/unparser/FortranCodeGeneration/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/backend/unparser/FortranCodeGeneration/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -2,8 +2,8 @@
 
 INCLUDES = $(ROSE_INCLUDES)
 
-unparseFortranCodeGeneration_headers = unparseFortran.h unparseFortran_types.h
-unparseFortranCodeGeneration_sources = unparseFortran_expressions.C unparseFortran_statements.C unparseFortran_types.C
+unparseFortranCodeGeneration_headers = unparseFortran.h unparseFortran_types.h unparseFortran_modfile.h
+unparseFortranCodeGeneration_sources = unparseFortran_expressions.C unparseFortran_statements.C unparseFortran_types.C unparseFortran_modfile.C
 
 include_HEADERS = $(unparseFortranCodeGeneration_headers)
 

Copied: branches/testonly/src/backend/unparser/FortranCodeGeneration/unparseFortran_modfile.C (from rev 128, trunk/src/backend/unparser/FortranCodeGeneration/unparseFortran_modfile.C)
===================================================================
--- branches/testonly/src/backend/unparser/FortranCodeGeneration/unparseFortran_modfile.C	                        (rev 0)
+++ branches/testonly/src/backend/unparser/FortranCodeGeneration/unparseFortran_modfile.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,92 @@
+#include "rose.h"
+#include "unparseFortran_modfile.h"
+
+using namespace std;
+
+void
+generateModFile(SgFile *sfile)
+  {
+     ROSE_ASSERT(sfile != NULL);
+
+  // file name, with full path.
+     string  originalModuleFilenameWithPath = sfile->get_file_info()->get_filenameString();
+
+  // Cause the output of a message with verbose level is turned on.
+     if (SgProject::get_verbose() > 0)
+        {
+          printf ("In generateModFile(): Generating a Fortran 90 specific module (*.rmod file) for file = %s \n",originalModuleFilenameWithPath.c_str());
+        }
+
+  // Get the list of SgModuleStatement objects for the current AST.
+     Rose_STL_Container<SgNode*> moduleDeclarationList = NodeQuery::querySubTree (sfile,V_SgModuleStatement);
+
+  // DQ: I think this case is not required since the loop (below) would be empty.
+     if (moduleDeclarationList.empty()) { //no module in the file
+         return ;
+     }
+
+     for (Rose_STL_Container<SgNode*>::iterator i = moduleDeclarationList.begin(); i != moduleDeclarationList.end(); i++) {
+        // For a module named "xx" generate a file "xx.rose_mod" which contains 
+        // all the variable definitions and function declarations 
+        SgModuleStatement* module_stmt = isSgModuleStatement(*i);
+
+        ROSE_ASSERT(module_stmt != NULL);
+
+        string outputFilename = module_stmt->get_name() + MOD_FILE_SUFFIX;
+
+        string lowerCaseOutputFilename = StringUtility::convertToLowerCase(outputFilename);
+
+     // Cause the output of a message with verbose level is turned on.
+        if (SgProject::get_verbose() > 0)
+           {
+             printf ("In generateModFile() (loop over module declarations): Generating a Fortran 90 specific module file %s for module = %s \n",lowerCaseOutputFilename.c_str(),outputFilename.c_str());
+           }
+
+     // Use a lower case generate filename for the generated ROSE mod (or rmod) file. 
+     // fstream Module_OutputFile(outputFilename.c_str(),ios::out);
+        fstream Module_OutputFile(lowerCaseOutputFilename.c_str(),ios::out);
+
+        if (!Module_OutputFile) {
+           cout << "Error detected in opening file " << lowerCaseOutputFilename.c_str()
+                << "for output" << endl;
+           ROSE_ASSERT(false);
+           }
+
+     // Output header at the top of the generate *.rmod file.
+        Module_OutputFile <<  endl
+             << "! =================================================================================== \n"
+             << "! <<Automatically generated for Rose Fortran Separate Compilation, DO NOT MODIFY IT>> \n"
+             << "! =================================================================================== \n"
+             <<endl;
+        SgUnparse_Info ninfo;
+
+        ninfo.set_current_scope((SgScopeStatement*)module_stmt);
+
+        ninfo.set_SkipFormatting();
+         
+     // set the flag bit "outputFortranModFile" 
+        ninfo.set_outputFortranModFile();
+
+        ostringstream outputString;
+        Unparser_Opt options(false, false,false,false,true,false,false,false,false,false);
+
+     // This is a confusing use of originalModuleFilename vs. outputFilename (Oh, the first one has the full path!).
+     // The originalModuleFilename will be used to build a FortranCodeGeneration_locatedNode using
+     // the originalModuleFilename as a basis.
+     // printf ("originalModuleFilenameWithPath = %s outputFilename = %s \n",originalModuleFilenameWithPath.c_str(),outputFilename.c_str());
+        Unparser unp(&Module_OutputFile, originalModuleFilenameWithPath,options,NULL,NULL);
+
+     // The outputFilename is the name that will be matched against in the selection of statements to unparse.
+     // However, that its suffix is ".rmod" will cause UnparseLanguageIndependentConstructs::statementFromFile() 
+     // to always return true.  So use of outputFilename should map to the file from the file constructed.
+        FortranCodeGeneration_locatedNode myunp(&unp, outputFilename);
+
+     // This calls the unparser for just the module declaration.
+        myunp.unparseClassDeclStmt_module((SgStatement*)module_stmt,(SgUnparse_Info&)ninfo);
+
+        Module_OutputFile.flush();
+        Module_OutputFile.close();
+     }
+
+     return ;
+}

Copied: branches/testonly/src/backend/unparser/FortranCodeGeneration/unparseFortran_modfile.h (from rev 128, trunk/src/backend/unparser/FortranCodeGeneration/unparseFortran_modfile.h)
===================================================================
--- branches/testonly/src/backend/unparser/FortranCodeGeneration/unparseFortran_modfile.h	                        (rev 0)
+++ branches/testonly/src/backend/unparser/FortranCodeGeneration/unparseFortran_modfile.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,9 @@
+#ifndef __UNPARSER_ASSIST_H__
+#define __UNPARSER_ASSIST_H__
+extern void
+generateModFile(SgFile *sfile);
+
+#define MOD_FILE_SUFFIX  ".rmod"
+
+#endif
+

Modified: branches/testonly/src/backend/unparser/FortranCodeGeneration/unparseFortran_statements.C
===================================================================
--- branches/testonly/src/backend/unparser/FortranCodeGeneration/unparseFortran_statements.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/backend/unparser/FortranCodeGeneration/unparseFortran_statements.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1984,8 +1984,14 @@
                                         string previousArrayTypeDimensionListString = previousArrayTypeDimensionList->get_expressions()[i]->unparseToString(&info);
 
                                      // Turn ON the error checking which triggers an if the default SgUnparse_Info constructor is called
+                                     // FMZ (5/19/2008): since we are using unparser to generate ".rmod" file, we need to turn off this 
+#if 0
                                         SgUnparse_Info::set_forceDefaultConstructorToTriggerError(true);
+#else
+                                        SgUnparse_Info::set_forceDefaultConstructorToTriggerError(false);
+#endif
 
+
                                      // printf ("arrayTypeDimensionListString         = %s \n",arrayTypeDimensionListString.c_str());
                                      // printf ("previousArrayTypeDimensionListString = %s \n",previousArrayTypeDimensionListString.c_str());
 
@@ -2223,8 +2229,12 @@
         { 
        // cout << "stmt: " << hex << (*p) << dec << endl;
           ROSE_ASSERT((*p) != NULL);
+         // FMZ: for module file, only output the variable declarations (not definitions)
+         if (!info.outputFortranModFile() ||
+                        (*p)->variantT()==V_SgVariableDeclaration) {
           unparseStatement((*p), info);
         }
+        }
 
 #if 0
   // DQ (10/6/2008): This does not appear to be required (passes all tests).

Modified: branches/testonly/src/backend/unparser/languageIndependenceSupport/unparseLanugageIndependentConstructs.C
===================================================================
--- branches/testonly/src/backend/unparser/languageIndependenceSupport/unparseLanugageIndependentConstructs.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/backend/unparser/languageIndependenceSupport/unparseLanugageIndependentConstructs.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -52,6 +52,23 @@
      ROSE_ASSERT (stmt != NULL);
 
      bool statementInFile = false;
+
+  // FMZ (comment by DQ (11/14/2008)):
+  // This is part of the support for module files in Fortran.  Modules seen in the compilation 
+  // of a Fortran program cause a "<module name>.rmod" file to be generated. When we unparse 
+  // the "*.rmod" we want to output all statements, but since they came from the original 
+  // fortran file (a better translation would avoid this problem), the function would conclude
+  // that they should not be unparsed (this fix forces the statements in a "*.rmod" file to 
+  // always be unparsed.  If the SgSourceFile vuilt to represent the "*.rmod" file had been 
+  // constructed as a transformation then the file info objects would have been marked as
+  // part of a transforamtion and this fix would not have been required.  At some point this
+  // can be improved.  So this is a fine temporary fix for now.
+     if (StringUtility::fileNameSuffix(sourceFilename)=="rmod") 
+        {
+       // If we are to unparse a module  into the .rmod file this this is ALWAYS true
+          return true;
+        }
+
      if (unp->opt.get_unparse_includes_opt() == true)
         {
         // If we are to unparse all included files into the source file this this is ALWAYS true
@@ -380,11 +397,14 @@
         }
      ROSE_ASSERT(stmt->get_file_info() != NULL);
 
+#if 1 // FIXME cause conflict in "make check"?
+  // FMZ : we have ".rmod" file which will not satisfy this condition
   // JJW (6/23/2008): Move check for statement-within-file here rather than in individual procedures
      if (!statementFromFile(stmt, getFileName()))
         {
           return;
         }
+#endif
 
   // saveCompilerGeneratedStatements(stmt,info);
   // DQ (5/27/2005): fixup ordering of comments and any compiler generated code
@@ -515,6 +535,7 @@
                case V_SgNullStatement:     unparseNullStatement(stmt, info); break;
 
                default:
+                 // DQ (11/4/2008): This is a bug for the case of a SgFortranDo statement, unclear what to do about this.
                  // Call the derived class implementation for C, C++, or Fortran specific language unparsing.
                     unparseLanguageSpecificStatement(stmt,info);
                     break;

Modified: branches/testonly/src/backend/unparser/unparser.C
===================================================================
--- branches/testonly/src/backend/unparser/unparser.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/backend/unparser/unparser.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -414,12 +414,7 @@
 
                  // printf ("header name = %s \n",genericHeader->get_name()->c_str());
 
-                    SgAsmPEFileHeader* asmPEFileHeader = isSgAsmPEFileHeader(genericHeader);
-                    rose_addr_t imageBase = 0ull;
-                    if (asmPEFileHeader != NULL)
-                       {
-                         imageBase = asmPEFileHeader->get_e_image_base();
-                       }
+                    rose_addr_t imageBase = genericHeader->get_base_va();
  
                  // printf ("section %s imageBase = 0x%08"PRIx64"\n",sections[i]->get_name()->c_str(),imageBase);
 
@@ -444,12 +439,7 @@
                          if ( (j != i) && (sections[j]->is_mapped() == true) )
                             {
                               SgAsmGenericHeader* genericHeader  = sections[j]->get_header();
-                              SgAsmPEFileHeader* asmPEFileHeader = isSgAsmPEFileHeader(genericHeader);
-                              rose_addr_t temp_imageBase = 0ull;
-                              if (asmPEFileHeader != NULL)
-                                 {
-                                   temp_imageBase = asmPEFileHeader->get_e_image_base();
-                                 }
+                              rose_addr_t temp_imageBase = genericHeader->get_base_va();
                               rose_addr_t nestedAddressBase  = temp_imageBase    + sections[j]->get_mapped_rva();
                               rose_addr_t nestedAddressBound = nestedAddressBase + sections[j]->get_mapped_size();
                            // printf ("Exclude range in section %s starting address = 0x%08"PRIx64" ending address = 0x%08"PRIx64"\n",sections[j]->get_name().c_str(),nestedAddressBase,nestedAddressBound);
@@ -1527,6 +1517,17 @@
                     roseUnparser.unparseFile(binaryFile,inheritedAttributeInfo);
                     break;
                   }
+
+               case V_SgUnknownFile:
+                  {
+                    SgUnknownFile* unknownFile = isSgUnknownFile(file);
+
+                    unknownFile->set_skipfinalCompileStep(true);
+
+                    printf ("Warning: Unclear what to unparse from a SgUnknownFile (set skipfinalCompileStep) \n");
+                    break;
+                  }
+
                default:
                   {
                     printf ("Error: default reached in unparser: file = %s \n",file->class_name().c_str());

Modified: branches/testonly/src/frontend/BinaryDisassembly/Makefile.am
===================================================================
--- branches/testonly/src/frontend/BinaryDisassembly/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/BinaryDisassembly/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -34,7 +34,7 @@
      AST_BIN_Traversal.C
 
 
-BUILT_SOURCES = x86InstructionEnumPrinter.C armInstructionEnumPrinter.C
+BUILT_SOURCES = x86InstructionEnumPrinter.C armInstructionEnumPrinter.C powerpcInstructionEnumPrinter.C
 
 CLEANFILES = $(BUILT_SOURCES)
 

Modified: branches/testonly/src/frontend/BinaryDisassembly/RoseBin.cpp
===================================================================
--- branches/testonly/src/frontend/BinaryDisassembly/RoseBin.cpp	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/BinaryDisassembly/RoseBin.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -17,7 +17,8 @@
 
 //#ifndef __RoseBin__
 //#define __RoseBin__
-#include <mysql/mysql.h>
+//#include <mysql/mysql.h>
+#include <mysql_include/mysql.h>
 
 #include <stdio.h>
 #include <iostream>

Modified: branches/testonly/src/frontend/BinaryDisassembly/RoseBin_DB.cpp
===================================================================
--- branches/testonly/src/frontend/BinaryDisassembly/RoseBin_DB.cpp	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/BinaryDisassembly/RoseBin_DB.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -6,7 +6,8 @@
  ****************************************************/
 #include "rose.h"
 #include "RoseBin_DB.h"
-#include <mysql/mysql.h>
+//#include <mysql/mysql.h>
+#include "mysql_include/mysql.h"
 
 using namespace std;
 

Modified: branches/testonly/src/frontend/BinaryDisassembly/RoseBin_DB.h
===================================================================
--- branches/testonly/src/frontend/BinaryDisassembly/RoseBin_DB.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/BinaryDisassembly/RoseBin_DB.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -8,7 +8,8 @@
 #ifndef __RoseBin_DB__
 #define __RoseBin_DB__
 
-#include <mysql/mysql.h>
+//#include <mysql/mysql.h>
+#include <mysql_include/mysql.h>
 
 #include <stdio.h>
 #include <iostream>

Modified: branches/testonly/src/frontend/BinaryDisassembly/RoseBin_DB_IDAPRO.cpp
===================================================================
--- branches/testonly/src/frontend/BinaryDisassembly/RoseBin_DB_IDAPRO.cpp	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/BinaryDisassembly/RoseBin_DB_IDAPRO.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -7,7 +7,8 @@
 #include "rose.h"
 #include "RoseBin_DB_IDAPRO.h"
 #include <errno.h>
-#include <mysql/mysql.h>
+//#include <mysql/mysql.h>
+#include "mysql_include/mysql.h"
 
 using namespace std;
 

Modified: branches/testonly/src/frontend/BinaryDisassembly/RoseBin_DB_IDAPRO.h
===================================================================
--- branches/testonly/src/frontend/BinaryDisassembly/RoseBin_DB_IDAPRO.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/BinaryDisassembly/RoseBin_DB_IDAPRO.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -8,7 +8,7 @@
 #ifndef __RoseBin_DB_IDAPRO__
 #define __RoseBin_DB_IDAPRO__
 
-#include <mysql/mysql.h>
+#include "mysql_include/mysql.h"
 #include <stdio.h>
 #include <iostream>
 // #include "rose.h"

Modified: branches/testonly/src/frontend/BinaryDisassembly/RoseBin_instruction_table_x86
===================================================================
--- branches/testonly/src/frontend/BinaryDisassembly/RoseBin_instruction_table_x86	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/BinaryDisassembly/RoseBin_instruction_table_x86	2008-11-18 06:54:05 UTC (rev 129)
@@ -265,7 +265,12 @@
 addss -> Addss
 ucomiss -> Ucomiss
 andpd -> Andpd
-paddusb paddusw -> Paddus
-pcmpeqb pcmpeqw pcmpeqd -> Pcmpeq
-andnpd andnps -> Andnpd
-psubusb psubusw -> Psubus
+paddusb -> Paddusb
+paddusw -> Paddusw
+pcmpeqb -> Pcmpeqb
+pcmpeqw -> Pcmpeqw
+pcmpeqd -> Pcmpeqd
+andnpd -> Andnpd
+andnps -> Andnps
+psubusb -> Psubusb
+psubusw -> Psubusw

Modified: branches/testonly/src/frontend/BinaryDisassembly/RoseBin_support.h
===================================================================
--- branches/testonly/src/frontend/BinaryDisassembly/RoseBin_support.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/BinaryDisassembly/RoseBin_support.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -323,6 +323,9 @@
 SgAsmx86Instruction* createx86Instruction(uint64_t address,
                                           const std::string& mnemonic);
 
+void normalizex86Mnemonic(std::string& mnemonic);
+void normalizeArmMnemonic(std::string& mnemonic);
+
 // From RoseBin_support.cpp:
 bool isAsmUnconditionalBranch(SgAsmInstruction*);
 bool isAsmBranch(SgAsmInstruction*);

Modified: branches/testonly/src/frontend/BinaryDisassembly/instructionDispatch.cpp
===================================================================
--- branches/testonly/src/frontend/BinaryDisassembly/instructionDispatch.cpp	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/BinaryDisassembly/instructionDispatch.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -27,7 +27,7 @@
               insn->set_kind(x86_jb);
             break;}
             case 'c': { // 'jc'
-              insn->set_kind(x86_jb);
+              insn->set_kind(x86_jb); insn->set_mnemonic("jb");
             break;}
             case 'e': { // 'je'
               insn->set_kind(x86_je);
@@ -42,13 +42,13 @@
               insn->set_kind(x86_jo);
             break;}
             case 'p': { // 'jp'
-              insn->set_kind(x86_jpe);
+              insn->set_kind(x86_jpe); insn->set_mnemonic("jpe");
             break;}
             case 's': { // 'js'
               insn->set_kind(x86_js);
             break;}
             case 'z': { // 'jz'
-              insn->set_kind(x86_je);
+              insn->set_kind(x86_je); insn->set_mnemonic("je");
             break;}
             default: break;
           }
@@ -120,7 +120,7 @@
                   insn->set_kind(x86_btc);
                 break;}
                 case 'l': { // 'btl'
-                  insn->set_kind(x86_bt);
+                  insn->set_kind(x86_bt); insn->set_mnemonic("bt");
                 break;}
                 case 'r': { // 'btr'
                   insn->set_kind(x86_btr);
@@ -243,22 +243,22 @@
           if (mnemonic[1] == 'n') { // 'in'
             switch (mnemonic[2]) {
               case 'b': { // 'inb'
-                insn->set_kind(x86_in);
+                insn->set_kind(x86_in); insn->set_mnemonic("in");
               break;}
               case 'c': { // 'inc'
                 insn->set_kind(x86_inc);
               break;}
               case 'd': { // 'ind'
-                insn->set_kind(x86_in);
+                insn->set_kind(x86_in); insn->set_mnemonic("in");
               break;}
               case 'l': { // 'inl'
-                insn->set_kind(x86_in);
+                insn->set_kind(x86_in); insn->set_mnemonic("in");
               break;}
               case 't': { // 'int'
                 insn->set_kind(x86_int);
               break;}
               case 'w': { // 'inw'
-                insn->set_kind(x86_in);
+                insn->set_kind(x86_in); insn->set_mnemonic("in");
               break;}
               default: break;
             }
@@ -294,34 +294,34 @@
             case 'n': { // 'jn'
               switch (mnemonic[2]) {
                 case 'a': { // 'jna'
-                  insn->set_kind(x86_jbe);
+                  insn->set_kind(x86_jbe); insn->set_mnemonic("jbe");
                 break;}
                 case 'b': { // 'jnb'
-                  insn->set_kind(x86_jae);
+                  insn->set_kind(x86_jae); insn->set_mnemonic("jae");
                 break;}
                 case 'c': { // 'jnc'
-                  insn->set_kind(x86_jae);
+                  insn->set_kind(x86_jae); insn->set_mnemonic("jae");
                 break;}
                 case 'e': { // 'jne'
                   insn->set_kind(x86_jne);
                 break;}
                 case 'g': { // 'jng'
-                  insn->set_kind(x86_jle);
+                  insn->set_kind(x86_jle); insn->set_mnemonic("jle");
                 break;}
                 case 'l': { // 'jnl'
-                  insn->set_kind(x86_jge);
+                  insn->set_kind(x86_jge); insn->set_mnemonic("jge");
                 break;}
                 case 'o': { // 'jno'
                   insn->set_kind(x86_jno);
                 break;}
                 case 'p': { // 'jnp'
-                  insn->set_kind(x86_jpo);
+                  insn->set_kind(x86_jpo); insn->set_mnemonic("jpo");
                 break;}
                 case 's': { // 'jns'
                   insn->set_kind(x86_jns);
                 break;}
                 case 'z': { // 'jnz'
-                  insn->set_kind(x86_jne);
+                  insn->set_kind(x86_jne); insn->set_mnemonic("jne");
                 break;}
                 default: break;
               }
@@ -463,7 +463,7 @@
             case 'a': { // 'sa'
               switch (mnemonic[2]) {
                 case 'l': { // 'sal'
-                  insn->set_kind(x86_shl);
+                  insn->set_kind(x86_shl); insn->set_mnemonic("shl");
                 break;}
                 case 'r': { // 'sar'
                   insn->set_kind(x86_sar);
@@ -542,17 +542,17 @@
             switch (mnemonic[2]) {
               case 'c': { // 'btc'
                 if (mnemonic[3] == 'l') { // 'btcl'
-                  insn->set_kind(x86_btc);
+                  insn->set_kind(x86_btc); insn->set_mnemonic("btc");
                 }
               break;}
               case 'r': { // 'btr'
                 if (mnemonic[3] == 'l') { // 'btrl'
-                  insn->set_kind(x86_btr);
+                  insn->set_kind(x86_btr); insn->set_mnemonic("btr");
                 }
               break;}
               case 's': { // 'bts'
                 if (mnemonic[3] == 'l') { // 'btsl'
-                  insn->set_kind(x86_bts);
+                  insn->set_kind(x86_bts); insn->set_mnemonic("bts");
                 }
               break;}
               default: break;
@@ -661,13 +661,13 @@
                     insn->set_kind(x86_fld1);
                   break;}
                   case 'l': { // 'fldl'
-                    insn->set_kind(x86_fld);
+                    insn->set_kind(x86_fld); insn->set_mnemonic("fld");
                   break;}
                   case 's': { // 'flds'
-                    insn->set_kind(x86_fld);
+                    insn->set_kind(x86_fld); insn->set_mnemonic("fld");
                   break;}
                   case 't': { // 'fldt'
-                    insn->set_kind(x86_fld);
+                    insn->set_kind(x86_fld); insn->set_mnemonic("fld");
                   break;}
                   case 'z': { // 'fldz'
                     insn->set_kind(x86_fldz);
@@ -700,13 +700,13 @@
                 case 't': { // 'fst'
                   switch (mnemonic[3]) {
                     case 'l': { // 'fstl'
-                      insn->set_kind(x86_fst);
+                      insn->set_kind(x86_fst); insn->set_mnemonic("fst");
                     break;}
                     case 'p': { // 'fstp'
                       insn->set_kind(x86_fstp);
                     break;}
                     case 's': { // 'fsts'
-                      insn->set_kind(x86_fst);
+                      insn->set_kind(x86_fst); insn->set_mnemonic("fst");
                     break;}
                     default: break;
                   }
@@ -799,22 +799,22 @@
               switch (mnemonic[2]) {
                 case 'a': { // 'jna'
                   if (mnemonic[3] == 'e') { // 'jnae'
-                    insn->set_kind(x86_jb);
+                    insn->set_kind(x86_jb); insn->set_mnemonic("jb");
                   }
                 break;}
                 case 'b': { // 'jnb'
                   if (mnemonic[3] == 'e') { // 'jnbe'
-                    insn->set_kind(x86_ja);
+                    insn->set_kind(x86_ja); insn->set_mnemonic("ja");
                   }
                 break;}
                 case 'g': { // 'jng'
                   if (mnemonic[3] == 'e') { // 'jnge'
-                    insn->set_kind(x86_jl);
+                    insn->set_kind(x86_jl); insn->set_mnemonic("jl");
                   }
                 break;}
                 case 'l': { // 'jnl'
                   if (mnemonic[3] == 'e') { // 'jnle'
-                    insn->set_kind(x86_jg);
+                    insn->set_kind(x86_jg); insn->set_mnemonic("jg");
                   }
                 break;}
                 default: break;
@@ -908,7 +908,7 @@
                     insn->set_kind(x86_setb);
                   break;}
                   case 'c': { // 'setc'
-                    insn->set_kind(x86_setb);
+                    insn->set_kind(x86_setb); insn->set_mnemonic("setb");
                   break;}
                   case 'e': { // 'sete'
                     insn->set_kind(x86_sete);
@@ -923,13 +923,13 @@
                     insn->set_kind(x86_seto);
                   break;}
                   case 'p': { // 'setp'
-                    insn->set_kind(x86_setpe);
+                    insn->set_kind(x86_setpe); insn->set_mnemonic("setpe");
                   break;}
                   case 's': { // 'sets'
                     insn->set_kind(x86_sets);
                   break;}
                   case 'z': { // 'setz'
-                    insn->set_kind(x86_sete);
+                    insn->set_kind(x86_sete); insn->set_mnemonic("sete");
                   break;}
                   default: break;
                 }
@@ -1012,7 +1012,7 @@
             case 'l': { // 'xl'
               if (mnemonic[2] == 'a') { // 'xla'
                 if (mnemonic[3] == 't') { // 'xlat'
-                  insn->set_kind(x86_xlatb);
+                  insn->set_kind(x86_xlatb); insn->set_mnemonic("xlatb");
                 }
               }
             break;}
@@ -1090,7 +1090,7 @@
                         insn->set_kind(x86_cmovb);
                       break;}
                       case 'c': { // 'cmovc'
-                        insn->set_kind(x86_cmovb);
+                        insn->set_kind(x86_cmovb); insn->set_mnemonic("cmovb");
                       break;}
                       case 'e': { // 'cmove'
                         insn->set_kind(x86_cmove);
@@ -1105,13 +1105,13 @@
                         insn->set_kind(x86_cmovo);
                       break;}
                       case 'p': { // 'cmovp'
-                        insn->set_kind(x86_cmovpe);
+                        insn->set_kind(x86_cmovpe); insn->set_mnemonic("cmovpe");
                       break;}
                       case 's': { // 'cmovs'
                         insn->set_kind(x86_cmovs);
                       break;}
                       case 'z': { // 'cmovz'
-                        insn->set_kind(x86_cmove);
+                        insn->set_kind(x86_cmove); insn->set_mnemonic("cmove");
                       break;}
                       default: break;
                     }
@@ -1189,13 +1189,13 @@
                 if (mnemonic[3] == 'd') { // 'fadd'
                   switch (mnemonic[4]) {
                     case 'l': { // 'faddl'
-                      insn->set_kind(x86_fadd);
+                      insn->set_kind(x86_fadd); insn->set_mnemonic("fadd");
                     break;}
                     case 'p': { // 'faddp'
                       insn->set_kind(x86_faddp);
                     break;}
                     case 's': { // 'fadds'
-                      insn->set_kind(x86_fadd);
+                      insn->set_kind(x86_fadd); insn->set_mnemonic("fadd");
                     break;}
                     default: break;
                   }
@@ -1207,13 +1207,13 @@
                 if (mnemonic[3] == 'm') { // 'fcom'
                   switch (mnemonic[4]) {
                     case 'l': { // 'fcoml'
-                      insn->set_kind(x86_fcom);
+                      insn->set_kind(x86_fcom); insn->set_mnemonic("fcom");
                     break;}
                     case 'p': { // 'fcomp'
                       insn->set_kind(x86_fcomp);
                     break;}
                     case 's': { // 'fcoms'
-                      insn->set_kind(x86_fcom);
+                      insn->set_kind(x86_fcom); insn->set_mnemonic("fcom");
                     break;}
                     default: break;
                   }
@@ -1225,7 +1225,7 @@
                 if (mnemonic[3] == 'v') { // 'fdiv'
                   switch (mnemonic[4]) {
                     case 'l': { // 'fdivl'
-                      insn->set_kind(x86_fdiv);
+                      insn->set_kind(x86_fdiv); insn->set_mnemonic("fdiv");
                     break;}
                     case 'p': { // 'fdivp'
                       insn->set_kind(x86_fdivp);
@@ -1234,7 +1234,7 @@
                       insn->set_kind(x86_fdivr);
                     break;}
                     case 's': { // 'fdivs'
-                      insn->set_kind(x86_fdiv);
+                      insn->set_kind(x86_fdiv); insn->set_mnemonic("fdiv");
                     break;}
                     default: break;
                   }
@@ -1269,7 +1269,7 @@
                 case 'l': { // 'fil'
                   if (mnemonic[3] == 'd') { // 'fild'
                     if (mnemonic[4] == 'l') { // 'fildl'
-                      insn->set_kind(x86_fild);
+                      insn->set_kind(x86_fild); insn->set_mnemonic("fild");
                     }
                   }
                 break;}
@@ -1284,7 +1284,7 @@
                   if (mnemonic[3] == 't') { // 'fist'
                     switch (mnemonic[4]) {
                       case 'l': { // 'fistl'
-                        insn->set_kind(x86_fist);
+                        insn->set_kind(x86_fist); insn->set_mnemonic("fist");
                       break;}
                       case 'p': { // 'fistp'
                         insn->set_kind(x86_fistp);
@@ -1318,13 +1318,13 @@
                 if (mnemonic[3] == 'l') { // 'fmul'
                   switch (mnemonic[4]) {
                     case 'l': { // 'fmull'
-                      insn->set_kind(x86_fmul);
+                      insn->set_kind(x86_fmul); insn->set_mnemonic("fmul");
                     break;}
                     case 'p': { // 'fmulp'
                       insn->set_kind(x86_fmulp);
                     break;}
                     case 's': { // 'fmuls'
-                      insn->set_kind(x86_fmul);
+                      insn->set_kind(x86_fmul); insn->set_mnemonic("fmul");
                     break;}
                     default: break;
                   }
@@ -1370,13 +1370,13 @@
                   if (mnemonic[3] == 'p') { // 'fstp'
                     switch (mnemonic[4]) {
                       case 'l': { // 'fstpl'
-                        insn->set_kind(x86_fstp);
+                        insn->set_kind(x86_fstp); insn->set_mnemonic("fstp");
                       break;}
                       case 's': { // 'fstps'
-                        insn->set_kind(x86_fstp);
+                        insn->set_kind(x86_fstp); insn->set_mnemonic("fstp");
                       break;}
                       case 't': { // 'fstpt'
-                        insn->set_kind(x86_fstp);
+                        insn->set_kind(x86_fstp); insn->set_mnemonic("fstp");
                       break;}
                       default: break;
                     }
@@ -1386,7 +1386,7 @@
                   if (mnemonic[3] == 'b') { // 'fsub'
                     switch (mnemonic[4]) {
                       case 'l': { // 'fsubl'
-                        insn->set_kind(x86_fsub);
+                        insn->set_kind(x86_fsub); insn->set_mnemonic("fsub");
                       break;}
                       case 'p': { // 'fsubp'
                         insn->set_kind(x86_fsubp);
@@ -1395,7 +1395,7 @@
                         insn->set_kind(x86_fsubr);
                       break;}
                       case 's': { // 'fsubs'
-                        insn->set_kind(x86_fsub);
+                        insn->set_kind(x86_fsub); insn->set_mnemonic("fsub");
                       break;}
                       default: break;
                     }
@@ -1440,13 +1440,13 @@
               if (mnemonic[3] == 't') { // 'iret'
                 switch (mnemonic[4]) {
                   case 'd': { // 'iretd'
-                    insn->set_kind(x86_iret);
+                    insn->set_kind(x86_iret); insn->set_mnemonic("iret");
                   break;}
                   case 'l': { // 'iretl'
-                    insn->set_kind(x86_iret);
+                    insn->set_kind(x86_iret); insn->set_mnemonic("iret");
                   break;}
                   case 'q': { // 'iretq'
-                    insn->set_kind(x86_iret);
+                    insn->set_kind(x86_iret); insn->set_mnemonic("iret");
                   break;}
                   default: break;
                 }
@@ -1513,10 +1513,10 @@
                   if (mnemonic[3] == 'p') { // 'loop'
                     switch (mnemonic[4]) {
                       case 'e': { // 'loope'
-                        insn->set_kind(x86_loopz);
+                        insn->set_kind(x86_loopz); insn->set_mnemonic("loopz");
                       break;}
                       case 'l': { // 'loopl'
-                        insn->set_kind(x86_loop);
+                        insn->set_kind(x86_loop); insn->set_mnemonic("loop");
                       break;}
                       case 'z': { // 'loopz'
                         insn->set_kind(x86_loopz);
@@ -1596,16 +1596,16 @@
                   if (mnemonic[3] == 'd') { // 'padd'
                     switch (mnemonic[4]) {
                       case 'b': { // 'paddb'
-                        insn->set_kind(x86_padd);
+                        insn->set_kind(x86_padd); insn->set_mnemonic("padd");
                       break;}
                       case 'd': { // 'paddd'
-                        insn->set_kind(x86_padd);
+                        insn->set_kind(x86_padd); insn->set_mnemonic("padd");
                       break;}
                       case 'q': { // 'paddq'
-                        insn->set_kind(x86_padd);
+                        insn->set_kind(x86_padd); insn->set_mnemonic("padd");
                       break;}
                       case 'w': { // 'paddw'
-                        insn->set_kind(x86_padd);
+                        insn->set_kind(x86_padd); insn->set_mnemonic("padd");
                       break;}
                       default: break;
                     }
@@ -1657,13 +1657,13 @@
                   if (mnemonic[3] == 'l') { // 'psll'
                     switch (mnemonic[4]) {
                       case 'd': { // 'pslld'
-                        insn->set_kind(x86_psll);
+                        insn->set_kind(x86_psll); insn->set_mnemonic("psll");
                       break;}
                       case 'q': { // 'psllq'
-                        insn->set_kind(x86_psll);
+                        insn->set_kind(x86_psll); insn->set_mnemonic("psll");
                       break;}
                       case 'w': { // 'psllw'
-                        insn->set_kind(x86_psll);
+                        insn->set_kind(x86_psll); insn->set_mnemonic("psll");
                       break;}
                       default: break;
                     }
@@ -1673,13 +1673,13 @@
                   if (mnemonic[3] == 'l') { // 'psrl'
                     switch (mnemonic[4]) {
                       case 'd': { // 'psrld'
-                        insn->set_kind(x86_psrl);
+                        insn->set_kind(x86_psrl); insn->set_mnemonic("psrl");
                       break;}
                       case 'q': { // 'psrlq'
-                        insn->set_kind(x86_psrl);
+                        insn->set_kind(x86_psrl); insn->set_mnemonic("psrl");
                       break;}
                       case 'w': { // 'psrlw'
-                        insn->set_kind(x86_psrl);
+                        insn->set_kind(x86_psrl); insn->set_mnemonic("psrl");
                       break;}
                       default: break;
                     }
@@ -1689,13 +1689,13 @@
                   if (mnemonic[3] == 'b') { // 'psub'
                     switch (mnemonic[4]) {
                       case 'b': { // 'psubb'
-                        insn->set_kind(x86_psub);
+                        insn->set_kind(x86_psub); insn->set_mnemonic("psub");
                       break;}
                       case 'd': { // 'psubd'
-                        insn->set_kind(x86_psub);
+                        insn->set_kind(x86_psub); insn->set_mnemonic("psub");
                       break;}
                       case 'w': { // 'psubw'
-                        insn->set_kind(x86_psub);
+                        insn->set_kind(x86_psub); insn->set_mnemonic("psub");
                       break;}
                       default: break;
                     }
@@ -1761,7 +1761,7 @@
                 switch (mnemonic[3]) {
                   case 'a': { // 'seta'
                     if (mnemonic[4] == 'e') { // 'setae'
-                      insn->set_kind(x86_setb);
+                      insn->set_kind(x86_setb); insn->set_mnemonic("setb");
                     }
                   break;}
                   case 'b': { // 'setb'
@@ -1782,34 +1782,34 @@
                   case 'n': { // 'setn'
                     switch (mnemonic[4]) {
                       case 'a': { // 'setna'
-                        insn->set_kind(x86_setbe);
+                        insn->set_kind(x86_setbe); insn->set_mnemonic("setbe");
                       break;}
                       case 'b': { // 'setnb'
-                        insn->set_kind(x86_setae);
+                        insn->set_kind(x86_setae); insn->set_mnemonic("setae");
                       break;}
                       case 'c': { // 'setnc'
-                        insn->set_kind(x86_setae);
+                        insn->set_kind(x86_setae); insn->set_mnemonic("setae");
                       break;}
                       case 'e': { // 'setne'
                         insn->set_kind(x86_setne);
                       break;}
                       case 'g': { // 'setng'
-                        insn->set_kind(x86_setle);
+                        insn->set_kind(x86_setle); insn->set_mnemonic("setle");
                       break;}
                       case 'l': { // 'setnl'
-                        insn->set_kind(x86_setge);
+                        insn->set_kind(x86_setge); insn->set_mnemonic("setge");
                       break;}
                       case 'o': { // 'setno'
                         insn->set_kind(x86_setno);
                       break;}
                       case 'p': { // 'setnp'
-                        insn->set_kind(x86_setpo);
+                        insn->set_kind(x86_setpo); insn->set_mnemonic("setpo");
                       break;}
                       case 's': { // 'setns'
                         insn->set_kind(x86_setns);
                       break;}
                       case 'z': { // 'setnz'
-                        insn->set_kind(x86_setne);
+                        insn->set_kind(x86_setne); insn->set_mnemonic("setne");
                       break;}
                       default: break;
                     }
@@ -1833,7 +1833,7 @@
               if (mnemonic[2] == 'd') { // 'sld'
                 if (mnemonic[3] == 't') { // 'sldt'
                   if (mnemonic[4] == 'l') { // 'sldtl'
-                    insn->set_kind(x86_sldt);
+                    insn->set_kind(x86_sldt); insn->set_mnemonic("sldt");
                   }
                 }
               }
@@ -1883,7 +1883,7 @@
               if (mnemonic[2] == 'd') { // 'xad'
                 if (mnemonic[3] == 'd') { // 'xadd'
                   if (mnemonic[4] == 'l') { // 'xaddl'
-                    insn->set_kind(x86_xadd);
+                    insn->set_kind(x86_xadd); insn->set_mnemonic("xadd");
                   }
                 }
               }
@@ -1930,7 +1930,7 @@
                       insn->set_kind(x86_andnpd);
                     break;}
                     case 's': { // 'andnps'
-                      insn->set_kind(x86_andnpd);
+                      insn->set_kind(x86_andnps);
                     break;}
                     default: break;
                   }
@@ -1945,7 +1945,7 @@
               if (mnemonic[3] == 'n') { // 'boun'
                 if (mnemonic[4] == 'd') { // 'bound'
                   if (mnemonic[5] == 'l') { // 'boundl'
-                    insn->set_kind(x86_bound);
+                    insn->set_kind(x86_bound); insn->set_mnemonic("bound");
                   }
                 }
               }
@@ -1980,34 +1980,34 @@
                   case 'n': { // 'cmovn'
                     switch (mnemonic[5]) {
                       case 'a': { // 'cmovna'
-                        insn->set_kind(x86_cmovbe);
+                        insn->set_kind(x86_cmovbe); insn->set_mnemonic("cmovbe");
                       break;}
                       case 'b': { // 'cmovnb'
-                        insn->set_kind(x86_cmovae);
+                        insn->set_kind(x86_cmovae); insn->set_mnemonic("cmovae");
                       break;}
                       case 'c': { // 'cmovnc'
-                        insn->set_kind(x86_cmovae);
+                        insn->set_kind(x86_cmovae); insn->set_mnemonic("cmovae");
                       break;}
                       case 'e': { // 'cmovne'
                         insn->set_kind(x86_cmovne);
                       break;}
                       case 'g': { // 'cmovng'
-                        insn->set_kind(x86_cmovle);
+                        insn->set_kind(x86_cmovle); insn->set_mnemonic("cmovle");
                       break;}
                       case 'l': { // 'cmovnl'
-                        insn->set_kind(x86_cmovge);
+                        insn->set_kind(x86_cmovge); insn->set_mnemonic("cmovge");
                       break;}
                       case 'o': { // 'cmovno'
                         insn->set_kind(x86_cmovno);
                       break;}
                       case 'p': { // 'cmovnp'
-                        insn->set_kind(x86_cmovpo);
+                        insn->set_kind(x86_cmovpo); insn->set_mnemonic("cmovpo");
                       break;}
                       case 's': { // 'cmovns'
                         insn->set_kind(x86_cmovns);
                       break;}
                       case 'z': { // 'cmovnz'
-                        insn->set_kind(x86_cmovne);
+                        insn->set_kind(x86_cmovne); insn->set_mnemonic("cmovne");
                       break;}
                       default: break;
                     }
@@ -2048,7 +2048,7 @@
               if (mnemonic[3] == 'e') { // 'ente'
                 if (mnemonic[4] == 'r') { // 'enter'
                   if (mnemonic[5] == 'l') { // 'enterl'
-                    insn->set_kind(x86_enter);
+                    insn->set_kind(x86_enter); insn->set_mnemonic("enter");
                   }
                 }
               }
@@ -2063,13 +2063,13 @@
                   if (mnemonic[4] == 'p') { // 'fcomp'
                     switch (mnemonic[5]) {
                       case 'l': { // 'fcompl'
-                        insn->set_kind(x86_fcomp);
+                        insn->set_kind(x86_fcomp); insn->set_mnemonic("fcomp");
                       break;}
                       case 'p': { // 'fcompp'
                         insn->set_kind(x86_fcompp);
                       break;}
                       case 's': { // 'fcomps'
-                        insn->set_kind(x86_fcomp);
+                        insn->set_kind(x86_fcomp); insn->set_mnemonic("fcomp");
                       break;}
                       default: break;
                     }
@@ -2083,13 +2083,13 @@
                   if (mnemonic[4] == 'r') { // 'fdivr'
                     switch (mnemonic[5]) {
                       case 'l': { // 'fdivrl'
-                        insn->set_kind(x86_fdivr);
+                        insn->set_kind(x86_fdivr); insn->set_mnemonic("fdivr");
                       break;}
                       case 'p': { // 'fdivrp'
                         insn->set_kind(x86_fdivrp);
                       break;}
                       case 's': { // 'fdivrs'
-                        insn->set_kind(x86_fdivr);
+                        insn->set_kind(x86_fdivr); insn->set_mnemonic("fdivr");
                       break;}
                       default: break;
                     }
@@ -2103,7 +2103,7 @@
                   if (mnemonic[3] == 'd') { // 'fiad'
                     if (mnemonic[4] == 'd') { // 'fiadd'
                       if (mnemonic[5] == 'l') { // 'fiaddl'
-                        insn->set_kind(x86_fiadd);
+                        insn->set_kind(x86_fiadd); insn->set_mnemonic("fiadd");
                       }
                     }
                   }
@@ -2112,7 +2112,7 @@
                   if (mnemonic[3] == 'i') { // 'fidi'
                     if (mnemonic[4] == 'v') { // 'fidiv'
                       if (mnemonic[5] == 'l') { // 'fidivl'
-                        insn->set_kind(x86_fidiv);
+                        insn->set_kind(x86_fidiv); insn->set_mnemonic("fidiv");
                       }
                     }
                   }
@@ -2121,7 +2121,7 @@
                   if (mnemonic[3] == 'u') { // 'fimu'
                     if (mnemonic[4] == 'l') { // 'fimul'
                       if (mnemonic[5] == 'l') { // 'fimull'
-                        insn->set_kind(x86_fimul);
+                        insn->set_kind(x86_fimul); insn->set_mnemonic("fimul");
                       }
                     }
                   }
@@ -2130,7 +2130,7 @@
                   if (mnemonic[3] == 't') { // 'fist'
                     if (mnemonic[4] == 'p') { // 'fistp'
                       if (mnemonic[5] == 'l') { // 'fistpl'
-                        insn->set_kind(x86_fistp);
+                        insn->set_kind(x86_fistp); insn->set_mnemonic("fistp");
                       }
                     }
                   }
@@ -2214,13 +2214,13 @@
                     if (mnemonic[4] == 'r') { // 'fsubr'
                       switch (mnemonic[5]) {
                         case 'l': { // 'fsubrl'
-                          insn->set_kind(x86_fsubr);
+                          insn->set_kind(x86_fsubr); insn->set_mnemonic("fsubr");
                         break;}
                         case 'p': { // 'fsubrp'
                           insn->set_kind(x86_fsubrp);
                         break;}
                         case 's': { // 'fsubrs'
-                          insn->set_kind(x86_fsubr);
+                          insn->set_kind(x86_fsubr); insn->set_mnemonic("fsubr");
                         break;}
                         default: break;
                       }
@@ -2236,7 +2236,7 @@
                   if (mnemonic[4] == 'm') { // 'fucom'
                     switch (mnemonic[5]) {
                       case 'i': { // 'fucomi'
-                        insn->set_kind(x86_fucom);
+                        insn->set_kind(x86_fucom); insn->set_mnemonic("fucom");
                       break;}
                       case 'p': { // 'fucomp'
                         insn->set_kind(x86_fucomp);
@@ -2268,7 +2268,7 @@
                 if (mnemonic[4] == 'n') { // 'loopn'
                   switch (mnemonic[5]) {
                     case 'e': { // 'loopne'
-                      insn->set_kind(x86_loopnz);
+                      insn->set_kind(x86_loopnz); insn->set_mnemonic("loopnz");
                     break;}
                     case 'z': { // 'loopnz'
                       insn->set_kind(x86_loopnz);
@@ -2351,17 +2351,17 @@
                 switch (mnemonic[4]) {
                   case 'b': { // 'setnb'
                     if (mnemonic[5] == 'e') { // 'setnbe'
-                      insn->set_kind(x86_seta);
+                      insn->set_kind(x86_seta); insn->set_mnemonic("seta");
                     }
                   break;}
                   case 'g': { // 'setng'
                     if (mnemonic[5] == 'e') { // 'setnge'
-                      insn->set_kind(x86_setl);
+                      insn->set_kind(x86_setl); insn->set_mnemonic("setl");
                     }
                   break;}
                   case 'l': { // 'setnl'
                     if (mnemonic[5] == 'e') { // 'setnle'
-                      insn->set_kind(x86_setg);
+                      insn->set_kind(x86_setg); insn->set_mnemonic("setg");
                     }
                   break;}
                   default: break;
@@ -2384,22 +2384,22 @@
                     switch (mnemonic[5]) {
                       case 'a': { // 'cmovna'
                         if (mnemonic[6] == 'e') { // 'cmovnae'
-                          insn->set_kind(x86_cmovb);
+                          insn->set_kind(x86_cmovb); insn->set_mnemonic("cmovb");
                         }
                       break;}
                       case 'b': { // 'cmovnb'
                         if (mnemonic[6] == 'e') { // 'cmovnbe'
-                          insn->set_kind(x86_cmova);
+                          insn->set_kind(x86_cmova); insn->set_mnemonic("cmova");
                         }
                       break;}
                       case 'g': { // 'cmovng'
                         if (mnemonic[6] == 'e') { // 'cmovnge'
-                          insn->set_kind(x86_cmovl);
+                          insn->set_kind(x86_cmovl); insn->set_mnemonic("cmovl");
                         }
                       break;}
                       case 'l': { // 'cmovnl'
                         if (mnemonic[6] == 'e') { // 'cmovnle'
-                          insn->set_kind(x86_cmovg);
+                          insn->set_kind(x86_cmovg); insn->set_mnemonic("cmovg");
                         }
                       break;}
                       default: break;
@@ -2461,10 +2461,10 @@
                     if (mnemonic[5] == 's') { // 'paddus'
                       switch (mnemonic[6]) {
                         case 'b': { // 'paddusb'
-                          insn->set_kind(x86_paddus);
+                          insn->set_kind(x86_paddusb);
                         break;}
                         case 'w': { // 'paddusw'
-                          insn->set_kind(x86_paddus);
+                          insn->set_kind(x86_paddusw);
                         break;}
                         default: break;
                       }
@@ -2480,13 +2480,13 @@
                     if (mnemonic[5] == 'q') { // 'pcmpeq'
                       switch (mnemonic[6]) {
                         case 'b': { // 'pcmpeqb'
-                          insn->set_kind(x86_pcmpeq);
+                          insn->set_kind(x86_pcmpeqb);
                         break;}
                         case 'd': { // 'pcmpeqd'
-                          insn->set_kind(x86_pcmpeq);
+                          insn->set_kind(x86_pcmpeqd);
                         break;}
                         case 'w': { // 'pcmpeqw'
-                          insn->set_kind(x86_pcmpeq);
+                          insn->set_kind(x86_pcmpeqw);
                         break;}
                         default: break;
                       }
@@ -2502,10 +2502,10 @@
                     if (mnemonic[5] == 's') { // 'psubus'
                       switch (mnemonic[6]) {
                         case 'b': { // 'psubusb'
-                          insn->set_kind(x86_psubus);
+                          insn->set_kind(x86_psubusb);
                         break;}
                         case 'w': { // 'psubusw'
-                          insn->set_kind(x86_psubus);
+                          insn->set_kind(x86_psubusw);
                         break;}
                         default: break;
                       }

Modified: branches/testonly/src/frontend/BinaryDisassembly/make-decision-tree.tcl
===================================================================
--- branches/testonly/src/frontend/BinaryDisassembly/make-decision-tree.tcl	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/BinaryDisassembly/make-decision-tree.tcl	2008-11-18 06:54:05 UTC (rev 129)
@@ -5,7 +5,12 @@
 proc doLeaf {insn platform} {
   global astNode$platform
   if {[info exists astNode${platform}($insn)]} {
-    return [format "insn->set_kind([string tolower $platform]_[string tolower [set astNode${platform}($insn)]]);"]
+    set result ""
+    append result "insn->set_kind([string tolower $platform]_[string tolower [set astNode${platform}($insn)]]);"
+    if {$insn != [string tolower [set astNode${platform}($insn)]]} {
+      append result [format " insn->set_mnemonic(\"[string tolower [set astNode${platform}($insn)]]\");"]
+    }
+    return $result
   } else {
     return [format ";"]
   }
@@ -71,6 +76,7 @@
   puts $outFile "}"
 }
 
+
 set outFile [open "instructionDispatch.cpp" w]
 puts $outFile "#include \"rose.h\""
 puts $outFile "#include <stdint.h>"

Modified: branches/testonly/src/frontend/BinaryDisassembly/powerpcInstructionEnum.h
===================================================================
--- branches/testonly/src/frontend/BinaryDisassembly/powerpcInstructionEnum.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/BinaryDisassembly/powerpcInstructionEnum.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -153,13 +153,89 @@
      powerpc_fnmsub, // Floating Negative Multiply-Subtract 
      powerpc_fnmsub_record, // Floating Negative Multiply-Subtract 
      powerpc_fnmsubs, // Floating Negative Multiply-Subtract Single 
-     powerpc_fnmsubs_record, // Floating Negative Multiply-Subtract Single 
+     powerpc_fnmsubs_record, // Floating Negative Multiply-Subtract Single
+     powerpc_fpmul,  // FP2 Floating Parallel Multiply (BGL specific)
+     powerpc_fxmul,  // FP2 Floating Cross Multiply (BGL specific)
+     powerpc_fxpmul, // FP2 Floating Cross Copy-Primary Multiply (BGL specific)
+     powerpc_fxsmul, // FP2 Floating Cross Copy-Secondary Multiply (BGL specific)
+     powerpc_fpadd,  // FP2 Floating Parallel Add (BGL specific)
+     powerpc_fpsub,  // FP2 Floating Parallel Subtract (BGL specific)
+     powerpc_fpre,   // FP2 Floating Parallel Reciprocal Estimate (BGL specific)
+     powerpc_fprsqrte, // FP2 Floating Parallel Reciprocal Square Root Estimate (BGL specific)
+     powerpc_fpmr,
+     powerpc_fpabs,
+     powerpc_lfssx,
+     powerpc_fpneg,
+     powerpc_lfssux,
+     powerpc_fprsp,
+     powerpc_lfsdx,
+     powerpc_fpnabs,
+     powerpc_lfsdux,
+     powerpc_lfxsx,
+     powerpc_fsmr,
+     powerpc_lfxsux,
+     powerpc_lfxdx,
+     powerpc_fsabs,
+     powerpc_lfxdux,
+     powerpc_lfpsx,
+     powerpc_fsneg,
+     powerpc_lfpsux,
+     powerpc_lfpdx,
+     powerpc_fsnabs,
+     powerpc_lfpdux,
+     powerpc_stfpiwx,
+     powerpc_fxmr,
+     powerpc_fpctiw,
+     powerpc_stfssx,
+     powerpc_stfssux,
+     powerpc_fpctiwz,
+     powerpc_stfsdx,
+     powerpc_stfsdux,
+     powerpc_stfxsx,
+     powerpc_fsmtp,
+     powerpc_stfxsux,
+     powerpc_stfxdx,
+     powerpc_stfxdux,
+     powerpc_stfpsx,
+     powerpc_fsmfp,
+     powerpc_stfpsux,
+     powerpc_stfpdx,
+     powerpc_stfpdux,
+     powerpc_fpsel,
+     powerpc_fpmadd,
+     powerpc_fpmsub,
+     powerpc_fxmadd,
+     powerpc_fxcpmadd,
+     powerpc_fxcsmadd,
+     powerpc_fpnmadd,
+     powerpc_fxnmadd,
+     powerpc_fxcpnmadd,
+     powerpc_fxcsnmadd,
+     powerpc_fxcpnpma,
+     powerpc_fxmsub,
+     powerpc_fxcsnpma,
+     powerpc_fxcpmsub,
+     powerpc_fxcpnsma,
+     powerpc_fxcsmsub,
+     powerpc_fxcsnsma,
+     powerpc_fpnmsub,
+     powerpc_fxcxma,
+     powerpc_fxnmsub,
+     powerpc_fxcxnpma,
+     powerpc_fxcpnmsub,
+     powerpc_fxcxnsma,
+     powerpc_fxcsnmsub,
+     powerpc_fxcxnms, // Last FP2 specific enum value
+     powerpc_fre, // Floating Reciprocal Estimate Single (optional) 
+     powerpc_fre_record, // Floating Reciprocal Estimate Single (optional) 
      powerpc_fres, // Floating Reciprocal Estimate Single (optional) 
      powerpc_fres_record, // Floating Reciprocal Estimate Single (optional) 
      powerpc_frsp, // Floating Round to Single Precision 
      powerpc_frsp_record, // Floating Round to Single Precision 
      powerpc_frsqrte, // Floating Reciprocal Square Root Estimate (optional) 
      powerpc_frsqrte_record, // Floating Reciprocal Square Root Estimate (optional) 
+     powerpc_frsqrtes, // Floating Reciprocal Square Root Estimate (optional) 
+     powerpc_frsqrtes_record, // Floating Reciprocal Square Root Estimate (optional) 
      powerpc_fsel, // Floating-Point Select (optional) 
      powerpc_fsel_record, // Floating-Point Select (optional) 
      powerpc_fsqrt, // Floating-Point Square Root (optional)

Modified: branches/testonly/src/frontend/BinaryDisassembly/powerpcInstructionEnumPrinter.C
===================================================================
--- branches/testonly/src/frontend/BinaryDisassembly/powerpcInstructionEnumPrinter.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/BinaryDisassembly/powerpcInstructionEnumPrinter.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -148,12 +148,88 @@
 "powerpc_fnmsub.",
 "powerpc_fnmsubs",
 "powerpc_fnmsubs.",
+"powerpc_fpmul",
+"powerpc_fxmul",
+"powerpc_fxpmul",
+"powerpc_fxsmul",
+"powerpc_fpadd",
+"powerpc_fpsub",
+"powerpc_fpre",
+"powerpc_fprsqrte",
+"powerpc_fpmr",
+"powerpc_fpabs",
+"powerpc_lfssx",
+"powerpc_fpneg",
+"powerpc_lfssux",
+"powerpc_fprsp",
+"powerpc_lfsdx",
+"powerpc_fpnabs",
+"powerpc_lfsdux",
+"powerpc_lfxsx",
+"powerpc_fsmr",
+"powerpc_lfxsux",
+"powerpc_lfxdx",
+"powerpc_fsabs",
+"powerpc_lfxdux",
+"powerpc_lfpsx",
+"powerpc_fsneg",
+"powerpc_lfpsux",
+"powerpc_lfpdx",
+"powerpc_fsnabs",
+"powerpc_lfpdux",
+"powerpc_stfpiwx",
+"powerpc_fxmr",
+"powerpc_fpctiw",
+"powerpc_stfssx",
+"powerpc_stfssux",
+"powerpc_fpctiwz",
+"powerpc_stfsdx",
+"powerpc_stfsdux",
+"powerpc_stfxsx",
+"powerpc_fsmtp",
+"powerpc_stfxsux",
+"powerpc_stfxdx",
+"powerpc_stfxdux",
+"powerpc_stfpsx",
+"powerpc_fsmfp",
+"powerpc_stfpsux",
+"powerpc_stfpdx",
+"powerpc_stfpdux",
+"powerpc_fpsel",
+"powerpc_fpmadd",
+"powerpc_fpmsub",
+"powerpc_fxmadd",
+"powerpc_fxcpmadd",
+"powerpc_fxcsmadd",
+"powerpc_fpnmadd",
+"powerpc_fxnmadd",
+"powerpc_fxcpnmadd",
+"powerpc_fxcsnmadd",
+"powerpc_fxcpnpma",
+"powerpc_fxmsub",
+"powerpc_fxcsnpma",
+"powerpc_fxcpmsub",
+"powerpc_fxcpnsma",
+"powerpc_fxcsmsub",
+"powerpc_fxcsnsma",
+"powerpc_fpnmsub",
+"powerpc_fxcxma",
+"powerpc_fxnmsub",
+"powerpc_fxcxnpma",
+"powerpc_fxcpnmsub",
+"powerpc_fxcxnsma",
+"powerpc_fxcsnmsub",
+"powerpc_fxcxnms",
+"powerpc_fre",
+"powerpc_fre.",
 "powerpc_fres",
 "powerpc_fres.",
 "powerpc_frsp",
 "powerpc_frsp.",
 "powerpc_frsqrte",
 "powerpc_frsqrte.",
+"powerpc_frsqrtes",
+"powerpc_frsqrtes.",
 "powerpc_fsel",
 "powerpc_fsel.",
 "powerpc_fsqrt",

Modified: branches/testonly/src/frontend/BinaryDisassembly/powerpcInstructionProperties.C
===================================================================
--- branches/testonly/src/frontend/BinaryDisassembly/powerpcInstructionProperties.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/BinaryDisassembly/powerpcInstructionProperties.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -11,7 +11,7 @@
     case powerpc_spr_xer: return "xer";
     case powerpc_spr_lr: return "lr";
     case powerpc_spr_ctr: return "ctr";
-    ROSE_ASSERT (!"Bad TBR number in sprToString");
+    default: return "unknown_spr";
   }
 }
 
@@ -19,6 +19,6 @@
   switch (n) {
     case powerpc_tbr_tbl: return "tbl";
     case powerpc_tbr_tbu: return "tbu";
-    ROSE_ASSERT (!"Bad TBR number in tbrToString");
+    default: return "unknown_tbr";
   }
 }

Modified: branches/testonly/src/frontend/BinaryDisassembly/readTicl.C
===================================================================
--- branches/testonly/src/frontend/BinaryDisassembly/readTicl.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/BinaryDisassembly/readTicl.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,6 +1,9 @@
 #include "readTicl.h"
 #include <string.h>
 
+
+
+
 using namespace ticl;
 
 #define FILL_IN_STRUCT(STRUCT_NAME,FORMAT, FILENAME)			\
@@ -118,8 +121,8 @@
 void ticl::get_instructions_1(std::string directory, vector<instructions_1>& vec_STRUCT)
 {
 #define ARGS_instructions_1  &elem_instructions_1->address, &elem_instructions_1->basic_block_id, &elem_instructions_1->mnemonic, \
-    &elem_instructions_1->sequence
-  FILL_IN_STRUCT(instructions_1, "ssss","instructions_1.tsv");
+    &elem_instructions_1->sequence, &elem_instructions_1->data
+  FILL_IN_STRUCT(instructions_1, "sssss","instructions_1.tsv");
 };
 
 void ticl::get_callgraph_1(std::string directory, vector<callgraph_1>& vec_STRUCT)
@@ -189,3 +192,5 @@
 
 
 
+
+

Modified: branches/testonly/src/frontend/BinaryDisassembly/x86InstructionProperties.C
===================================================================
--- branches/testonly/src/frontend/BinaryDisassembly/x86InstructionProperties.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/BinaryDisassembly/x86InstructionProperties.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -457,12 +457,7 @@
       if (exprs.size() != 1) return false;
       SgAsmExpression* dest = exprs[0];
       if (!isSgAsmValueExpression(dest)) return false;
-      switch (dest->variantT()) {
-        case V_SgAsmWordValueExpression: addr = isSgAsmWordValueExpression(dest)->get_value(); break;
-        case V_SgAsmDoubleWordValueExpression: addr = isSgAsmDoubleWordValueExpression(dest)->get_value(); break;
-        case V_SgAsmQuadWordValueExpression: addr = isSgAsmQuadWordValueExpression(dest)->get_value(); break;
-        default: return false;
-      }
+      addr = SageInterface::getAsmConstant(isSgAsmValueExpression(dest));
       return true;
     }
     default: return false;

Modified: branches/testonly/src/frontend/CxxFrontend/Makefile.am
===================================================================
--- branches/testonly/src/frontend/CxxFrontend/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/CxxFrontend/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -20,4 +20,4 @@
 clean-local:
 	-rm -rf .libs/
 
-EXTRA_DIST = roseBinaryEDG-i686-apple-darwin9.5.0-646e04576d4266880b4066826540b2ae.tar.gz roseBinaryEDG-i686-pc-linux-gnu-646e04576d4266880b4066826540b2ae.tar.gz roseBinaryEDG-x86_64-pc-linux-gnu-646e04576d4266880b4066826540b2ae.tar.gz
+EXTRA_DIST = roseBinaryEDG-i686-apple-darwin-e2d193c41f56aafc2094b8f411f9d94e.tar.gz roseBinaryEDG-i686-pc-linux-gnu-e2d193c41f56aafc2094b8f411f9d94e.tar.gz roseBinaryEDG-x86_64-pc-linux-gnu-e2d193c41f56aafc2094b8f411f9d94e.tar.gz

Copied: branches/testonly/src/frontend/CxxFrontend/roseBinaryEDG-i686-apple-darwin-e2d193c41f56aafc2094b8f411f9d94e.tar.gz (from rev 128, trunk/src/frontend/CxxFrontend/roseBinaryEDG-i686-apple-darwin-e2d193c41f56aafc2094b8f411f9d94e.tar.gz)
===================================================================
(Binary files differ)

Deleted: branches/testonly/src/frontend/CxxFrontend/roseBinaryEDG-i686-apple-darwin9.5.0-646e04576d4266880b4066826540b2ae.tar.gz
===================================================================
(Binary files differ)

Deleted: branches/testonly/src/frontend/CxxFrontend/roseBinaryEDG-i686-pc-linux-gnu-646e04576d4266880b4066826540b2ae.tar.gz
===================================================================
(Binary files differ)

Copied: branches/testonly/src/frontend/CxxFrontend/roseBinaryEDG-i686-pc-linux-gnu-e2d193c41f56aafc2094b8f411f9d94e.tar.gz (from rev 128, trunk/src/frontend/CxxFrontend/roseBinaryEDG-i686-pc-linux-gnu-e2d193c41f56aafc2094b8f411f9d94e.tar.gz)
===================================================================
(Binary files differ)

Deleted: branches/testonly/src/frontend/CxxFrontend/roseBinaryEDG-x86_64-pc-linux-gnu-646e04576d4266880b4066826540b2ae.tar.gz
===================================================================
(Binary files differ)

Copied: branches/testonly/src/frontend/CxxFrontend/roseBinaryEDG-x86_64-pc-linux-gnu-e2d193c41f56aafc2094b8f411f9d94e.tar.gz (from rev 128, trunk/src/frontend/CxxFrontend/roseBinaryEDG-x86_64-pc-linux-gnu-e2d193c41f56aafc2094b8f411f9d94e.tar.gz)
===================================================================
(Binary files differ)

Modified: branches/testonly/src/frontend/Disassemblers/disassemblerCommon.C
===================================================================
--- branches/testonly/src/frontend/Disassemblers/disassemblerCommon.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/Disassemblers/disassemblerCommon.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -192,7 +192,7 @@
     } else if (isa == SgAsmExecutableFileFormat::ISA_PowerPC) {
 
    // DQ (10/12/2008): Added support for PowerPC.
-      PowerpcDisassembler::Parameters params(addr, true);
+      PowerpcDisassembler::Parameters params(addr);
 
    // printf ("Initial file starting address (entry point) = %p  file size = %zu  fileOffset = %zu \n",&(file->content()[0]),file->get_orig_size(),fileOffset);
 
@@ -406,7 +406,7 @@
           entryPoint = DOS_header->get_e_ip();
         }
 
-     printf ("In Disassembler::disassembleInterpretation(): entryPoint = %p \n",(void*)entryPoint);
+  // printf ("In Disassembler::disassembleInterpretation(): entryPoint = %p \n",(void*)entryPoint);
 
      basicBlockStarts[entryPoint] = true;
 
@@ -493,7 +493,7 @@
 
      MapGlobalVariables t;
      t.traverse(interp, preorder);
-     printf ("Number of global functions = %zu \n",t.globalFunctionMap.size());
+  // printf ("Number of global functions = %zu \n",t.globalFunctionMap.size());
      std::string funcName="none";
 
      SgAsmBlock* blk = PutInstructionsIntoBasicBlocks::putInstructionsIntoBasicBlocks(basicBlocks, insns);
@@ -501,7 +501,7 @@
   // are only considered if they are at the start of a basic block
      const SgAsmStatementPtrList& computedBasicBlocks = blk->get_statementList();
 
-     printf ("computedBasicBlocks.size() = %zu \n",computedBasicBlocks.size());
+  // printf ("computedBasicBlocks.size() = %zu \n",computedBasicBlocks.size());
      for (size_t i = 0; i < computedBasicBlocks.size(); ++i)
         {
        // DQ (10/14/2008): Is this the sort of coding style that we want to have in a for loop?
@@ -616,8 +616,9 @@
   // DQ (10/16/2008): This outputs a hexidecimal number at times!
   // (tps - 2Jun08) : commented out for now until we investigate this further... breaking the current function analysis
   // cerr << ">> Number of FunctionStarts: " << functionStarts.size() << endl;
-     printf ("Number of FunctionStarts: %zu \n",functionStarts.size());
 
+  // printf ("Number of FunctionStarts: %zu \n",functionStarts.size());
+
      blk = PutInstructionsIntoBasicBlocks::putInstructionsIntoFunctions(blk, functionStarts);
      interp->set_global_block(blk);
      blk->set_parent(interp);

Modified: branches/testonly/src/frontend/Disassemblers/disassemblers.h
===================================================================
--- branches/testonly/src/frontend/Disassemblers/disassemblers.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/Disassemblers/disassemblers.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -31,7 +31,7 @@
       case x86_insnsize_16: return SgAsmTypeWord::createType();
       case x86_insnsize_32: return SgAsmTypeDoubleWord::createType();
       case x86_insnsize_64: return SgAsmTypeQuadWord::createType();
-      default: ROSE_ASSERT (false);
+      default: abort();;
     }
   }
 
@@ -41,7 +41,7 @@
       case x86_insnsize_16: return x86_regpos_word;
       case x86_insnsize_32: return x86_regpos_dword;
       case x86_insnsize_64: return x86_regpos_qword;
-      default: ROSE_ASSERT (false);
+      default: abort();;
     }
   }
 
@@ -68,9 +68,9 @@
    {
      struct Parameters
         {
-          uint32_t ip;
+          uint64_t ip;
           bool decodeUnconditionalInstructions;
-          Parameters(uint32_t ip = 0, bool decodeUnconditionalInstructions = true): ip(ip), decodeUnconditionalInstructions(decodeUnconditionalInstructions) {}
+          Parameters(uint64_t ip = 0): ip(ip) {}
         };
 
   // SgAsmPowerpcRegisterReferenceExpression* makeRegister(uint8_t reg);

Modified: branches/testonly/src/frontend/Disassemblers/powerpcDisassembler.C
===================================================================
--- branches/testonly/src/frontend/Disassemblers/powerpcDisassembler.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/Disassemblers/powerpcDisassembler.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -5,55 +5,135 @@
 #include <vector>
 #include "rose.h"
 
+#include "integerOps.h"
+
 using namespace std;
 using namespace SageBuilderAsm;
 
 #define DEBUG_OPCODES 0
 #define DEBUG_BRANCH_LOGIC 0
 
+// These are macros to make them look like constants while they are really
+// function calls
+#define BYTET (SgAsmTypeByte::createType())
+#define WORDT (SgAsmTypeWord::createType())
+#define DWORDT (SgAsmTypeDoubleWord::createType())
+#define QWORDT (SgAsmTypeQuadWord::createType())
+#define FLOATT (SgAsmTypeSingleFloat::createType())
+#define DOUBLET (SgAsmTypeDoubleFloat::createType())
+#define V2DWORDT (SgAsmTypeVector::createType(2, DWORDT))
+#define V2FLOATT (SgAsmTypeVector::createType(2, FLOATT))
+#define V2DOUBLET (SgAsmTypeVector::createType(2, DOUBLET))
 
 namespace PowerpcDisassembler
    {
+     SgAsmPowerpcRegisterReferenceExpression* makeRegister(PowerpcRegisterClass reg_class, int reg_number, PowerpcConditionRegisterAccessGranularity reg_grainularity = powerpc_condreggranularity_whole );
+
      struct SingleInstructionDisassembler
         {
           const Parameters& p;
           uint32_t insn;
           std::set<uint64_t>* knownSuccessorsReturn;
 
-       // PowerPC instructions don't have conditions like ARM, as I understand it.
-       // PowerpcInstructionCondition cond;
-       // SingleInstructionDisassembler(const Parameters& p, uint32_t insn, std::set<uint64_t>* knownSuccessorsReturn): p(p), insn(insn), knownSuccessorsReturn(knownSuccessorsReturn), cond(powerpc_cond_unknown) {}
-
           SingleInstructionDisassembler(const Parameters& p, uint32_t insn, std::set<uint64_t>* knownSuccessorsReturn): p(p), insn(insn), knownSuccessorsReturn(knownSuccessorsReturn) {}
 
-          SgAsmPowerpcInstruction* disassemble(const uint8_t* const instructionList, size_t positionInVector);
+       // Helper function to use field definitions (counted with bits from left and inclusive on both sides) from manual
+          template <size_t First, size_t Last> uint32_t fld() const {
+            return (insn >> (31 - Last)) & (IntegerOps::GenMask<uint32_t, Last - First + 1>::value);
+          }
 
+       // Decoded fields from section 1.7.16 of the v2.01 UISA
+          bool AA() const {return fld<30, 30>();}
+          SgAsmPowerpcRegisterReferenceExpression* BA() const {return makeRegister(powerpc_regclass_cr, fld<11, 15>(), powerpc_condreggranularity_bit);}
+          SgAsmPowerpcRegisterReferenceExpression* BB() const {return makeRegister(powerpc_regclass_cr, fld<16, 20>(), powerpc_condreggranularity_bit);}
+          uint64_t BD() const {return IntegerOps::signExtend<16, 64>((uint64_t)insn & 0xfffc);}
+          SgAsmPowerpcRegisterReferenceExpression* BF_cr() const {return makeRegister(powerpc_regclass_cr, fld<6, 8>(), powerpc_condreggranularity_field);}
+          SgAsmPowerpcRegisterReferenceExpression* BF_fpscr() const {return makeRegister(powerpc_regclass_fpscr, fld<6, 8>(), powerpc_condreggranularity_field);}
+          SgAsmPowerpcRegisterReferenceExpression* BFA_cr() const {return makeRegister(powerpc_regclass_cr, fld<11, 13>(), powerpc_condreggranularity_field);}
+          SgAsmPowerpcRegisterReferenceExpression* BFA_fpscr() const {return makeRegister(powerpc_regclass_fpscr, fld<11, 13>(), powerpc_condreggranularity_field);}
+          SgAsmValueExpression* BH() const {return makeByteValue(fld<19, 20>());}
+          SgAsmPowerpcRegisterReferenceExpression* BI() const {return BA();}
+          SgAsmValueExpression* BO() const {return makeByteValue(fld<6, 10>());}
+          SgAsmPowerpcRegisterReferenceExpression* BT() const {return makeRegister(powerpc_regclass_cr, fld<6, 10>(), powerpc_condreggranularity_bit);}
+          SgAsmValueExpression* D() const {return makeQWordValue(IntegerOps::signExtend<16, 64>((uint64_t)fld<16, 31>()));}
+          SgAsmValueExpression* DS() const {return makeQWordValue(IntegerOps::signExtend<16, 64>((uint64_t)fld<16, 31>() & 0xfffc));}
+          SgAsmValueExpression* FLM() const {return makeByteValue(fld<7, 14>());}
+          SgAsmPowerpcRegisterReferenceExpression* FRA() const {return makeRegister(powerpc_regclass_fpr, fld<11, 15>());}
+          SgAsmPowerpcRegisterReferenceExpression* FRB() const {return makeRegister(powerpc_regclass_fpr, fld<16, 20>());}
+          SgAsmPowerpcRegisterReferenceExpression* FRC() const {return makeRegister(powerpc_regclass_fpr, fld<21, 25>());}
+          SgAsmPowerpcRegisterReferenceExpression* FRS() const {return makeRegister(powerpc_regclass_fpr, fld<6, 10>());}
+          SgAsmPowerpcRegisterReferenceExpression* FRT() const {return FRS();}
+          SgAsmValueExpression* FXM() const {return makeByteValue(fld<12, 19>());}
+          
+          SgAsmValueExpression* L_10() const {return makeByteValue(fld<10, 10>());}
+          SgAsmValueExpression* L_15() const {return makeByteValue(fld<15, 15>());}
+          uint8_t L_sync() const {return fld<9, 10>();}
+          SgAsmValueExpression* LEV() const {return makeByteValue(fld<20, 26>());}
+          uint64_t LI() const {return IntegerOps::signExtend<26, 64>(uint64_t(fld<6, 29>() * 4));}
+          bool LK() const {return fld<31, 31>();}
+          SgAsmValueExpression* MB_32bit() const {return makeByteValue(fld<21, 25>());}
+          SgAsmValueExpression* ME_32bit() const {return makeByteValue(fld<26, 30>());}
+          SgAsmValueExpression* MB_64bit() const {return makeByteValue(fld<21, 26>());} // FIXME check for splitting
+          SgAsmValueExpression* ME_64bit() const {return makeByteValue(fld<21, 26>());} // FIXME check for splitting
+          SgAsmValueExpression* NB() const {return makeByteValue(fld<16, 20>() == 0 ? 32 : fld<16, 20>());}
+          bool OE() const {return fld<21, 21>();}
+          SgAsmPowerpcRegisterReferenceExpression* RA() const {return makeRegister(powerpc_regclass_gpr, fld<11, 15>());}
+          SgAsmExpression* RA_or_zero() const {return fld<11, 15>() == 0 ? (SgAsmExpression*)makeByteValue(0) : RA();}
+          SgAsmPowerpcRegisterReferenceExpression* RB() const {return makeRegister(powerpc_regclass_gpr, fld<16, 20>());}
+          bool Rc() const {return fld<31, 31>();}
+          SgAsmPowerpcRegisterReferenceExpression* RS() const {return makeRegister(powerpc_regclass_gpr, fld<6, 10>());}
+          SgAsmPowerpcRegisterReferenceExpression* RT() const {return RS();}
+          SgAsmValueExpression* SH_32bit() const {return makeByteValue(fld<16, 20>());}
+          SgAsmValueExpression* SH_64bit() const {return makeByteValue(fld<16, 20>() + fld<30, 30>() * 32);} // FIXME check
+          SgAsmValueExpression* SI() const {return D();}
+          SgAsmPowerpcRegisterReferenceExpression* SPR() const {return makeRegister(powerpc_regclass_spr, fld<16, 20>() * 32 + fld<11, 15>());}
+          SgAsmPowerpcRegisterReferenceExpression* SR() const {return makeRegister(powerpc_regclass_sr, fld<12, 15>());}
+          SgAsmPowerpcRegisterReferenceExpression* TBR() const {return makeRegister(powerpc_regclass_tbr, fld<16, 20>() * 32 + fld<11, 15>());}
+          SgAsmValueExpression* TH() const {return makeByteValue(fld<9, 10>());}
+          SgAsmValueExpression* TO() const {return makeByteValue(fld<6, 10>());}
+          SgAsmValueExpression* U() const {return makeByteValue(fld<16, 19>());}
+          SgAsmValueExpression* UI() const {return makeQWordValue(fld<16, 31>());}
+
+          SgAsmMemoryReferenceExpression* memref(SgAsmType* t) const {
+            return makeMemoryReference(makeAdd(RA_or_zero(), D()), NULL, t);
+          }
+          SgAsmMemoryReferenceExpression* memrefx(SgAsmType* t) const {
+            return makeMemoryReference(makeAdd(RA_or_zero(), RB()), NULL, t);
+          }
+          SgAsmMemoryReferenceExpression* memrefu(SgAsmType* t) const {
+            if (fld<11, 15>() == 0) throw BadInstruction();
+            return makeMemoryReference(makeAdd(RA(), D()), NULL, t);
+          }
+          SgAsmMemoryReferenceExpression* memrefux(SgAsmType* t) const {
+            if (fld<11, 15>() == 0) throw BadInstruction();
+            return makeMemoryReference(makeAdd(RA(), RB()), NULL, t);
+          }
+
        // There are 15 different forms of PowerPC instructions, but all are 32-bit (fixed length instruction set).
-       // SgAsmPowerpcInstruction* decode_I_formInstruction(const uint8_t* const instructionList, size_t positionInVector);
           SgAsmPowerpcInstruction* decode_I_formInstruction();
           SgAsmPowerpcInstruction* decode_B_formInstruction();
           SgAsmPowerpcInstruction* decode_SC_formInstruction();
-          SgAsmPowerpcInstruction* decode_D_formInstruction();
           SgAsmPowerpcInstruction* decode_DS_formInstruction();
-          SgAsmPowerpcInstruction* decode_X_formInstruction();
+          SgAsmPowerpcInstruction* decode_X_formInstruction_00();
+          SgAsmPowerpcInstruction* decode_X_formInstruction_1F();
+          SgAsmPowerpcInstruction* decode_X_formInstruction_3F();
           SgAsmPowerpcInstruction* decode_XL_formInstruction();
-          SgAsmPowerpcInstruction* decode_XFX_formInstruction();
-          SgAsmPowerpcInstruction* decode_XFL_formInstruction();
           SgAsmPowerpcInstruction* decode_XS_formInstruction();
-          SgAsmPowerpcInstruction* decode_XO_formInstruction();
-          SgAsmPowerpcInstruction* decode_A_formInstruction();
-          SgAsmPowerpcInstruction* decode_M_formInstruction();
+          SgAsmPowerpcInstruction* decode_A_formInstruction_00();
+          SgAsmPowerpcInstruction* decode_A_formInstruction_04();
+          SgAsmPowerpcInstruction* decode_A_formInstruction_3B();
+          SgAsmPowerpcInstruction* decode_A_formInstruction_3F();
           SgAsmPowerpcInstruction* decode_MD_formInstruction();
           SgAsmPowerpcInstruction* decode_MDS_formInstruction();
 
-          SgAsmDoubleWordValueExpression* makeBranchTarget( uint32_t targetAddr ) const;
-        };
+          SgAsmQuadWordValueExpression* makeBranchTarget( uint64_t targetAddr ) const;
 
-     SgAsmPowerpcInstruction* makeInstructionWithoutOperands(uint32_t address, const std::string& mnemonic, PowerpcInstructionKind kind, uint32_t insn);
 
-  // SgAsmPowerpcRegisterReferenceExpression* makeRegister(uint8_t reg);
-     SgAsmPowerpcRegisterReferenceExpression* makeRegister(PowerpcRegisterClass reg_class, int reg_number, PowerpcConditionRegisterAccessGranularity reg_grainularity = powerpc_condreggranularity_whole );
+          SgAsmPowerpcInstruction* disassemble();
+        };
 
+     SgAsmPowerpcInstruction* makeInstructionWithoutOperands(uint64_t address, const std::string& mnemonic, PowerpcInstructionKind kind, uint32_t insn);
+
   // SgAsmPowerpcInstruction* disassemble(const Parameters& p, const uint8_t* const insn, const uint64_t insnSize, size_t positionInVector, set<uint64_t>* knownSuccessorsReturn);
   // SgAsmPowerpcInstruction* disassemble(const Parameters& p, const uint32_t* const insn, const uint64_t insnSize, size_t positionInVector, set<uint64_t>* knownSuccessorsReturn);
   // SgAsmPowerpcInstruction* disassemble(const Parameters& p, const uint32_t insn, const uint64_t insnSize, size_t positionInVector, set<uint64_t>* knownSuccessorsReturn);
@@ -63,27 +143,27 @@
    }
 
 #define MAKE_INSN0(Mne) (makeInstructionWithoutOperands(p.ip, #Mne, powerpc_##Mne, insn))
+#define MAKE_INSN0_RC(Mne) (Rc() ? MAKE_INSN0(Mne##_record) : MAKE_INSN0(Mne))
+#define MAKE_INSN0_O_RC(Mne) (OE() ? MAKE_INSN0_RC(Mne##o) : MAKE_INSN0_RC(Mne))
 #define MAKE_INSN1(Mne, Op1) (appendOperand(MAKE_INSN0(Mne), (Op1)))
+#define MAKE_INSN1_RC(Mne, Op1) (appendOperand(MAKE_INSN0_RC(Mne), (Op1)))
+#define MAKE_INSN1_O_RC(Mne, Op1) (appendOperand(MAKE_INSN0_O_RC(Mne), (Op1)))
 #define MAKE_INSN2(Mne, Op1, Op2) (appendOperand(MAKE_INSN1(Mne, Op1), (Op2)))
+#define MAKE_INSN2_RC(Mne, Op1, Op2) (appendOperand(MAKE_INSN1_RC(Mne, Op1), (Op2)))
+#define MAKE_INSN2_O_RC(Mne, Op1, Op2) (appendOperand(MAKE_INSN1_O_RC(Mne, Op1), (Op2)))
 #define MAKE_INSN3(Mne, Op1, Op2, Op3) (appendOperand(MAKE_INSN2(Mne, Op1, Op2), (Op3)))
+#define MAKE_INSN3_RC(Mne, Op1, Op2, Op3) (appendOperand(MAKE_INSN2_RC(Mne, Op1, Op2), (Op3)))
+#define MAKE_INSN3_O_RC(Mne, Op1, Op2, Op3) (appendOperand(MAKE_INSN2_O_RC(Mne, Op1, Op2), (Op3)))
 #define MAKE_INSN4(Mne, Op1, Op2, Op3, Op4) (appendOperand(MAKE_INSN3(Mne, Op1, Op2, Op3), (Op4)))
+#define MAKE_INSN4_RC(Mne, Op1, Op2, Op3, Op4) (appendOperand(MAKE_INSN3_RC(Mne, Op1, Op2, Op3), (Op4)))
 #define MAKE_INSN5(Mne, Op1, Op2, Op3, Op4, Op5) (appendOperand(MAKE_INSN4(Mne, Op1, Op2, Op3, Op4), (Op5)))
+#define MAKE_INSN5_RC(Mne, Op1, Op2, Op3, Op4, Op5) (appendOperand(MAKE_INSN4_RC(Mne, Op1, Op2, Op3, Op4), (Op5)))
 
-SgAsmDoubleWordValueExpression*
-PowerpcDisassembler::SingleInstructionDisassembler::makeBranchTarget ( uint32_t targetAddr ) const
+SgAsmQuadWordValueExpression*
+PowerpcDisassembler::SingleInstructionDisassembler::makeBranchTarget ( uint64_t targetAddr ) const
    {
-  // int32_t val = insn & 0xFFFFFF;
-  // val <<= 8;
-  // val >>= 6; // Arithmetic shift to copy highest bit of immediate
-#if 0
-     uint32_t val_temp = (LI >= (1U << 23)) ? LI - (1U << 24) : LI;
-     val_temp <<= 2;
-
-     uint32_t targetAddr = p.ip + val_temp;
-#endif
-
      if (knownSuccessorsReturn) knownSuccessorsReturn->insert(targetAddr);
-     return makeDWordValue(targetAddr);
+     return makeQWordValue(targetAddr);
    }
 
 bool
@@ -94,12 +174,16 @@
    }
 
 SgAsmPowerpcInstruction*
-PowerpcDisassembler::makeInstructionWithoutOperands(uint32_t address, const std::string& mnemonic, PowerpcInstructionKind kind, uint32_t insn)
+PowerpcDisassembler::makeInstructionWithoutOperands(uint64_t address, const std::string& mnemonic, PowerpcInstructionKind kind, uint32_t insn)
    {
   // Constructor: SgAsmPowerpcInstruction(rose_addr_t address = 0, std::string mnemonic = "", PowerpcInstructionKind kind = powerpc_unknown_instruction);
      SgAsmPowerpcInstruction* instruction = new SgAsmPowerpcInstruction(address, mnemonic, kind);
      ROSE_ASSERT (instruction);
 
+     if (mnemonic.size() >= 7 && mnemonic.substr(mnemonic.size() - 7) == "_record") {
+       instruction->set_mnemonic(mnemonic.substr(0, mnemonic.size() - 7) + ".");
+     }
+
      SgAsmOperandList* operands = new SgAsmOperandList();
      instruction->set_operandList(operands);
      operands->set_parent(instruction);
@@ -133,7 +217,7 @@
   // r->set_powerpc_register_code((SgAsmPowerpcRegisterReferenceExpression::powerpc_register_enum)(reg + 1));
   // r->set_register_class((SgAsmPowerpcRegisterReferenceExpression::powerpc_register_enum)(reg + 1));
 
-     SgAsmPowerpcRegisterReferenceExpression* r = new SgAsmPowerpcRegisterReferenceExpression(reg_class,reg_number,reg_grainularity);
+     SgAsmPowerpcRegisterReferenceExpression* r = new SgAsmPowerpcRegisterReferenceExpression(reg_class, reg_number, reg_grainularity);
 
      return r;
   }
@@ -141,7 +225,7 @@
 SgAsmPowerpcInstruction*
 PowerpcDisassembler::disassemble(const Parameters& p, const uint8_t* const instructionList, const uint64_t insnSize, size_t positionInVector, set<uint64_t>* knownSuccessorsReturn)
    {
-  // printf ("Inside of PowerpcDisassembler::disassemble(): instructionList = %p insnSize = %zu positionInVector = %zu \n",instructionList,insnSize,positionInVector);
+  // printf ("Inside of PowerpcDisassembler::disassemble(): instructionList = %p insnSize = %zu positionInVector = %zu \n", instructionList, insnSize, positionInVector);
 
      ROSE_ASSERT(knownSuccessorsReturn != NULL);
 
@@ -158,35 +242,21 @@
      c = (c << 8) | instructionList[positionInVector + 2];
      c = (c << 8) | instructionList[positionInVector + 3];
 
-  // printf ("Single instruction opcode = 0x%x (calling disassembler) \n",c);
+  // printf ("Single instruction opcode = 0x%x (calling disassembler) \n", c);
 
   // Added this to get pass zero instruction (padding?)
-     if (c == 0)
-        {
-#if DEBUG_OPCODES
-          printf ("####### In PowerpcDisassembler::disassemble(): Return NULL pointer for case of c == 0 ####### \n");
-#endif
-          throw BadInstruction();
-        }
-
      SingleInstructionDisassembler sid(p, c, knownSuccessorsReturn);
-     return sid.disassemble(instructionList,positionInVector);
+     return sid.disassemble();
    }
 
 SgAsmPowerpcInstruction*
-PowerpcDisassembler::SingleInstructionDisassembler::disassemble(const uint8_t* const instructionList, size_t positionInVector)
+PowerpcDisassembler::SingleInstructionDisassembler::disassemble()
    {
   // The Primary Opcode Field is bits 0-5, 6-bits wide, so there are max 64 primary opcode values
      uint8_t primaryOpcode = (insn >> 26) & 0x3F;
 
-  // printf ("instruction opcode = 0x%x primaryOpcode = 0x%x \n",insn,primaryOpcode);
+  // printf ("instruction opcode = 0x%08"PRIx32" primaryOpcode = 0x%"PRIx8" \n", insn, primaryOpcode);
 
-  // This should not happend on a PowerPC system
-     ROSE_ASSERT(insn != 0);
-
-  // This should clear the upper two bits of the byte (so we only evaluate the Primary Opcode Field)
-  // getByte(opcode);
-
      SgAsmPowerpcInstruction* instruction = NULL;
 
      ROSE_ASSERT(knownSuccessorsReturn != NULL);
@@ -201,143 +271,110 @@
    // Handle all the different legal Primary Opcode values
      switch (primaryOpcode)
         {
-#if 0
-          case 0x00:
-          case 0x01: { /* illegal instruction */ ROSE_ASSERT(false); break; }
-#endif
-          case 0x02: { instruction = decode_D_formInstruction(); break; }
-          case 0x03: { instruction = decode_D_formInstruction(); break; }
+       // 0 : These are the BGL specific PowerPC440 FP2 Architecture instructions
+           case 0x00: // { instruction = decode_A_formInstruction(); break; }
+             {
+            // Depending on if this is A form or X form, the extended opCode maps to different bit ranges, so this code is incorrect!
+            // uint16_t x_Opcode   = (insn >> 1) & 0x3FF;
+               uint8_t  a_Opcode   = (insn >> 1) & 0x1F;
 
-          case 0x04: 
-          case 0x05: 
-          case 0x06: { /* illegal instruction */ ROSE_ASSERT(false); break; }
+            // printf ("x_Opcode = 0x%x = %d xfl_Opcode = 0x%x = %d a_Opcode = 0x%x = %d \n", x_Opcode, x_Opcode, xfl_Opcode, xfl_Opcode, a_Opcode, a_Opcode);
 
-          case 0x07: { instruction = decode_D_formInstruction(); break; }
-          case 0x08: { instruction = decode_D_formInstruction(); break; }
+            // Different parts of the instruction are used to identify what kind of instruction this is!
+               if (  a_Opcode == 5 || (a_Opcode >= 8 && a_Opcode <= 31) )
+                  {
+                    instruction = decode_A_formInstruction_00();
+                  }
+                 else
+                  {
+                    instruction = decode_X_formInstruction_00();
+                  }
 
-          case 0x09: { /* illegal instruction */ ROSE_ASSERT(false); break; }
+               ROSE_ASSERT(instruction != NULL);
+               break;
+             }
 
-          case 0x0A: { instruction = decode_D_formInstruction(); break; }
-          case 0x0B: { instruction = decode_D_formInstruction(); break; }
-          case 0x0C: { instruction = decode_D_formInstruction(); break; }
-          case 0x0D: { instruction = decode_D_formInstruction(); break; }
-          case 0x0E: { instruction = decode_D_formInstruction(); break; }
-          case 0x0F: { instruction = decode_D_formInstruction(); break; }
+          case 0x01: throw BadInstruction(); break;
+          case 0x02: instruction = MAKE_INSN3(tdi, TO(), RA(), SI()); break;
+          case 0x03: instruction = MAKE_INSN3(twi, TO(), RA(), SI()); break;
 
+       // 4 : These are the BGL specific PowerPC440 FP2 Architecture instructions
+          case 0x04: { instruction = decode_A_formInstruction_04(); break; }
+
+          case 0x05: throw BadInstruction(); break;
+          case 0x06: throw BadInstruction(); break;
+          case 0x07: instruction = MAKE_INSN3(mulli, RT(), RA(), SI()); break;
+          case 0x08: instruction = MAKE_INSN3(subfic, RT(), RA(), SI()); break;
+          case 0x09: throw BadInstruction(); break;
+          case 0x0A: instruction = MAKE_INSN4(cmpli, BF_cr(), L_10(), RA(), UI()); break;
+          case 0x0B: instruction = MAKE_INSN4(cmpi, BF_cr(), L_10(), RA(), SI()); break;
+          case 0x0C: instruction = MAKE_INSN3(addic, RT(), RA(), SI()); break;
+          case 0x0D: instruction = MAKE_INSN3(addic_record, RT(), RA(), SI()); break;
+          case 0x0E: instruction = MAKE_INSN3(addi, RT(), RA_or_zero(), SI()); break;
+          case 0x0F: instruction = MAKE_INSN3(addis, RT(), RA_or_zero(), SI()); break;
+
        // Branch instruction
           case 0x10: { instruction = decode_B_formInstruction(); break; }
 
           case 0x11: { instruction = decode_SC_formInstruction(); break; }
 
        // Conditional branch
-       // case 0x12: { instruction = decode_I_formInstruction(instructionList,positionInVector); break; }
           case 0x12: { instruction = decode_I_formInstruction(); break; }
 
           case 0x13: { instruction = decode_XL_formInstruction(); break; }
 
-       // 20
-          case 0x14: { instruction = decode_M_formInstruction(); break; }
-          case 0x15: { instruction = decode_M_formInstruction(); break; }
-
-          case 0x16: { /* illegal instruction */ ROSE_ASSERT(false); break; }
-
-          case 0x17: { instruction = decode_M_formInstruction(); break; }
-
-       // 24
-          case 0x18: { instruction = decode_D_formInstruction(); break; }
-          case 0x19: { instruction = decode_D_formInstruction(); break; }
-          case 0x1A: { instruction = decode_D_formInstruction(); break; }
-          case 0x1B: { instruction = decode_D_formInstruction(); break; }
-          case 0x1C: { instruction = decode_D_formInstruction(); break; }
-          case 0x1D: { instruction = decode_D_formInstruction(); break; }
-
+          case 0x14: instruction = MAKE_INSN5_RC(rlwimi, RA(), RS(), SH_32bit(), MB_32bit(), ME_32bit()); break;
+          case 0x15: instruction = MAKE_INSN5_RC(rlwinm, RA(), RS(), SH_32bit(), MB_32bit(), ME_32bit()); break;
+          case 0x17: instruction = MAKE_INSN5_RC(rlwnm, RA(), RS(), RB(), MB_32bit(), ME_32bit()); break;
+          case 0x18: instruction = MAKE_INSN3(ori, RS(), RA(), UI()); break;
+          case 0x19: instruction = MAKE_INSN3(oris, RS(), RA(), UI()); break;
+          case 0x1A: instruction = MAKE_INSN3(xori, RS(), RA(), UI()); break;
+          case 0x1B: instruction = MAKE_INSN3(xoris, RS(), RA(), UI()); break;
+          case 0x1C: instruction = MAKE_INSN3(andi_record, RS(), RA(), UI()); break;
+          case 0x1D: instruction = MAKE_INSN3(andis_record, RS(), RA(), UI()); break;
        // 30
           case 0x1E: { instruction = decode_MD_formInstruction(); break; }
 
        // 31: includes X form, XO form, XFX form, and XS form
-           case 0x1F:
-             {
-            // Depending on the extended Opcode this is an X form, XO form, XFX form,
-            // and XS form, the extended opCode maps to different bit ranges.
+          case 0x1F: { instruction = decode_X_formInstruction_1F(); break; }
 
-               uint16_t x_Opcode   = (insn >> 1) & 0x3FF;
-               uint16_t xfx_Opcode = x_Opcode;
-            // uint16_t xl_Opcode  = x_Opcode;
-            // uint16_t xfl_Opcode = x_Opcode;
-               uint16_t xs_Opcode  = (insn >> 2) & 0x1FF;
-               uint16_t xo_Opcode  = (insn >> 1) & 0x1FF;
-
-            // printf ("x_Opcode = 0x%x = %d xfx_Opcode = 0x%x = %d xs_Opcode = 0x%x = %d xo_Opcode = 0x%x = %d \n",x_Opcode,x_Opcode,xfx_Opcode,xfx_Opcode,xs_Opcode,xs_Opcode,xo_Opcode,xo_Opcode);
-
-            // Different parts of the instruction are used to identify what kind of instruction this is!
-               if (  xfx_Opcode == 19 || xfx_Opcode == 144 || xfx_Opcode == 339 || xfx_Opcode == 371 || xfx_Opcode == 467 )
-                  {
-                    instruction = decode_XFX_formInstruction();
-                  }
-                 else
-                  {
-                    if ( (xo_Opcode >= 8 && xo_Opcode <= 11) || xo_Opcode == 40 || xo_Opcode == 73 || xo_Opcode == 75 || 
-                         xo_Opcode == 104 || xo_Opcode == 136 || xo_Opcode == 138 || xo_Opcode == 200 || xo_Opcode == 202 || 
-                         (xo_Opcode >= 232 && xo_Opcode <= 235) || xo_Opcode == 266 || xo_Opcode == 457 || xo_Opcode == 459 || 
-                         xo_Opcode == 489 || xo_Opcode == 491 )
-                       {
-                         instruction = decode_XO_formInstruction();
-                       }
-                      else
-                       {
-                         if ( xs_Opcode == 413 )
-                            {
-                              instruction = decode_XS_formInstruction();
-                            }
-                           else
-                            {
-                              instruction = decode_X_formInstruction();
-                            }
-                       }
-                  }
-
-               ROSE_ASSERT(instruction != NULL);
-               break;
-             }
-
-       // 32 load store instructions
-          case 0x20: { instruction = decode_D_formInstruction(); break; }
-          case 0x21: { instruction = decode_D_formInstruction(); break; }
-          case 0x22: { instruction = decode_D_formInstruction(); break; }
-          case 0x23: { instruction = decode_D_formInstruction(); break; }
-          case 0x24: { instruction = decode_D_formInstruction(); break; }
-          case 0x25: { instruction = decode_D_formInstruction(); break; }
-          case 0x26: { instruction = decode_D_formInstruction(); break; }
-          case 0x27: { instruction = decode_D_formInstruction(); break; }
-          case 0x28: { instruction = decode_D_formInstruction(); break; }
-          case 0x29: { instruction = decode_D_formInstruction(); break; }
-          case 0x2A: { instruction = decode_D_formInstruction(); break; }
-          case 0x2B: { instruction = decode_D_formInstruction(); break; }
-          case 0x2C: { instruction = decode_D_formInstruction(); break; }
-          case 0x2D: { instruction = decode_D_formInstruction(); break; }
-          case 0x2E: { instruction = decode_D_formInstruction(); break; }
-          case 0x2F: { instruction = decode_D_formInstruction(); break; }
-          case 0x30: { instruction = decode_D_formInstruction(); break; }
-          case 0x31: { instruction = decode_D_formInstruction(); break; }
-          case 0x32: { instruction = decode_D_formInstruction(); break; }
-          case 0x33: { instruction = decode_D_formInstruction(); break; }
-          case 0x34: { instruction = decode_D_formInstruction(); break; }
-          case 0x35: { instruction = decode_D_formInstruction(); break; }
-          case 0x36: { instruction = decode_D_formInstruction(); break; }
-          case 0x37: { instruction = decode_D_formInstruction(); break; }
-
+          case 0x20: instruction = MAKE_INSN2(lwz, RT(), memref(DWORDT)); break;
+          case 0x21: instruction = MAKE_INSN2(lwzu, RT(), memrefu(DWORDT)); break;
+          case 0x22: instruction = MAKE_INSN2(lbz, RT(), memref(BYTET)); break;
+          case 0x23: instruction = MAKE_INSN2(lbzu, RT(), memrefu(BYTET)); break;
+          case 0x24: instruction = MAKE_INSN2(stw, RS(), memref(DWORDT)); break;
+          case 0x25: instruction = MAKE_INSN2(stwu, RS(), memrefu(DWORDT)); break;
+          case 0x26: instruction = MAKE_INSN2(stb, RS(), memref(BYTET)); break;
+          case 0x27: instruction = MAKE_INSN2(stbu, RS(), memrefu(BYTET)); break;
+          case 0x28: instruction = MAKE_INSN2(lhz, RT(), memref(WORDT)); break;
+          case 0x29: instruction = MAKE_INSN2(lhzu, RT(), memrefu(WORDT)); break;
+          case 0x2A: instruction = MAKE_INSN2(lha, RT(), memref(WORDT)); break;
+          case 0x2B: instruction = MAKE_INSN2(lhau, RT(), memrefu(WORDT)); break;
+          case 0x2C: instruction = MAKE_INSN2(sth, RS(), memref(WORDT)); break;
+          case 0x2D: instruction = MAKE_INSN2(sthu, RS(), memrefu(WORDT)); break;
+          case 0x2E: instruction = MAKE_INSN2(lmw, RT(), memref(DWORDT)); break;
+          case 0x2F: instruction = MAKE_INSN2(stmw, RS(), memref(DWORDT)); break;
+          case 0x30: instruction = MAKE_INSN2(lfs, FRT(), memref(FLOATT)); break;
+          case 0x31: instruction = MAKE_INSN2(lfsu, FRT(), memrefu(FLOATT)); break;
+          case 0x32: instruction = MAKE_INSN2(lfd, FRT(), memref(DOUBLET)); break;
+          case 0x33: instruction = MAKE_INSN2(lfdu, FRT(), memrefu(DOUBLET)); break;
+          case 0x34: instruction = MAKE_INSN2(stfs, FRS(), memref(FLOATT)); break;
+          case 0x35: instruction = MAKE_INSN2(stfsu, FRS(), memrefu(FLOATT)); break;
+          case 0x36: instruction = MAKE_INSN2(stfd, FRS(), memref(DOUBLET)); break;
+          case 0x37: instruction = MAKE_INSN2(stfdu, FRS(), memrefu(DOUBLET)); break;
        // 56
-          case 0x38: 
-          case 0x39: { /* illegal instruction */ ROSE_ASSERT(false); break; }
+          case 0x38: throw BadInstruction(); break;
+          case 0x39: throw BadInstruction(); break;
 
        // 58
           case 0x3A: { instruction = decode_DS_formInstruction(); break; }
 
-          case 0x3B: { instruction = decode_A_formInstruction(); break; }
+       // 59
+          case 0x3B: { instruction = decode_A_formInstruction_3B(); break; }
 
-       // 60
-          case 0x3C: 
-          case 0x3D: { /* illeagal instruction */ ROSE_ASSERT(false); break; }
+       // 60, 61
+          case 0x3C: throw BadInstruction(); break;
+          case 0x3D: throw BadInstruction(); break;
 
        // 62
           case 0x3E: { instruction = decode_DS_formInstruction(); break; }
@@ -346,27 +383,18 @@
           case 0x3F:
              {
             // Depending on if this is A form or X form, the extended opCode maps to different bit ranges, so this code is incorrect!
-               uint16_t x_Opcode   = (insn >> 1) & 0x3FF;
-               uint16_t xfl_Opcode = x_Opcode;
                uint8_t  a_Opcode   = (insn >> 1) & 0x1F;
 
-            // printf ("x_Opcode = 0x%x = %d xfl_Opcode = 0x%x = %d a_Opcode = 0x%x = %d \n",x_Opcode,x_Opcode,xfl_Opcode,xfl_Opcode,a_Opcode,a_Opcode);
+            // printf ("x_Opcode = 0x%x = %d xfl_Opcode = 0x%x = %d a_Opcode = 0x%x = %d \n", x_Opcode, x_Opcode, xfl_Opcode, xfl_Opcode, a_Opcode, a_Opcode);
 
             // Different parts of the instruction are used to identify what kind of instruction this is!
                if (  a_Opcode == 18 || (a_Opcode >= 20 && a_Opcode <= 31) )
                   {
-                    instruction = decode_A_formInstruction();
+                    instruction = decode_A_formInstruction_3F();
                   }
                  else
                   {
-                    if ( xfl_Opcode == 711 )
-                       {
-                         instruction = decode_XFL_formInstruction();
-                       }
-                      else
-                       {
-                         instruction = decode_X_formInstruction();
-                       }
+                    instruction = decode_X_formInstruction_3F(); // Also includes XFL form
                   }
 
                ROSE_ASSERT(instruction != NULL);
@@ -377,9 +405,9 @@
              {
             // The default case is now used for handling illegal instructions 
             // (during development it was for those not yet implemented).
-               printf ("Primary opcode not handled yet: primaryOpcode = %d \n",primaryOpcode);
-            // ROSE_ASSERT(false);
-               throw BadInstruction();
+               printf ("Primary opcode not handled yet: primaryOpcode = %d \n", primaryOpcode);
+               ROSE_ASSERT(false);
+            // throw BadInstruction();
              }
         }
 
@@ -396,70 +424,45 @@
      SgAsmPowerpcInstruction* instruction = NULL;
 
      uint8_t primaryOpcode = (insn >> 26) & 0x3F;
-
-  // Get bits 6-8, 3 bits as the BF opcode
-     uint32_t liOpcode = (insn >> 2) & 0xFFFFFF;
-
-  // Get bit 30, 1 bit as the reserved flag
-     uint8_t aaOpcode = (insn >> 1) & 0x1;
-
-  // Get bit 31, 1 bit as the reserved flag
-     uint8_t lkOpcode = (insn >> 0) & 0x1;
-
-#if DEBUG_OPCODES
-     printf ("I-Form instruction opcode = 0x%x liOpcode = 0x%x aaOpcode = 0x%x lkOpcode = 0x%x \n",insn,liOpcode,aaOpcode,lkOpcode);
-#endif
-
      switch(primaryOpcode)
         {
           case 0x12:
              {
-            // The address should be computed for the knownSuccessorsReturn set, but not computed for use 
-            // in the instuction (else we would be mixing the semantic analysis into the disassembly).
-            // SgAsmExpression* targetAddress = new SgAsmDoubleWordValueExpression(liOpcode);
-
-            // DQ (10/15/2008): Compute the address of the branch to restart the disassembly.
-            // The address is LI || 0b00 sign-extended.
-               uint32_t computedAddress = (liOpcode >= (1U << 23)) ? liOpcode - (1U << 24) : liOpcode;
-               computedAddress <<= 2;
-
-            // uint32_t targetAddr = p.ip + val_temp;
-               uint32_t targetBranchAddress = computedAddress;
-
-               if (aaOpcode == 0)
+               uint32_t targetBranchAddress = LI();
+               if (AA() == 0)
                   {
                  // In this case the address is the sum of LI || 0b00 sign-extended AND "the address of this instruction".
                     targetBranchAddress += p.ip;
                   }
 
-               SgAsmDoubleWordValueExpression* targetAddressExpression = makeBranchTarget(targetBranchAddress);
+               SgAsmQuadWordValueExpression* targetAddressExpression = makeBranchTarget(targetBranchAddress);
                ROSE_ASSERT(knownSuccessorsReturn->empty() == false);
 
-               if (aaOpcode == 0)
+               if (AA() == 0)
                   {
-                    if (lkOpcode == 0)
+                    if (LK() == 0)
                        {
-                         instruction = MAKE_INSN1(b,targetAddressExpression);
+                         instruction = MAKE_INSN1(b, targetAddressExpression);
                        }
                       else
                        {
-                         instruction = MAKE_INSN1(bl,targetAddressExpression);
+                         instruction = MAKE_INSN1(bl, targetAddressExpression);
                        }
                   }
                  else
                   {
-                    if (lkOpcode == 0)
+                    if (LK() == 0)
                        {
-                         instruction = MAKE_INSN1(ba,targetAddressExpression);
+                         instruction = MAKE_INSN1(ba, targetAddressExpression);
                        }
                       else
                        {
-                         instruction = MAKE_INSN1(bla,targetAddressExpression);
+                         instruction = MAKE_INSN1(bla, targetAddressExpression);
                        }
                   }
 
 #if DEBUG_BRANCH_LOGIC
-               printf ("Computation of targetAddressExpression = 0x%x \n",targetAddressExpression->get_value());
+               printf ("Computation of targetAddressExpression = 0x%x \n", targetAddressExpression->get_value());
 #endif
                break;
              }
@@ -468,12 +471,12 @@
              {
             // The default case is now used for handling illegal instructions 
             // (during development it was for those not yet implemented).
-               printf ("Error: I-Form primaryOpcode = %d (illegal instruction) \n",primaryOpcode);
+               printf ("Error: I-Form primaryOpcode = %d (illegal instruction) \n", primaryOpcode);
                ROSE_ASSERT(false);
              }
         }
 
-     if (lkOpcode == 1)
+     if (LK() == 1)
         {
        // Also need to disassemble the next instruction!
           knownSuccessorsReturn->insert(p.ip + 4);
@@ -489,70 +492,46 @@
      SgAsmPowerpcInstruction* instruction = NULL;
 
      uint8_t primaryOpcode = (insn >> 26) & 0x3F;
-
-  // Get bits 6-8, 3 bits as the BF opcode
-     uint8_t boOpcode = (insn >> 21) & 0x1F;
-
-  // Get the bits 11-15, next 5 bits, as the tertiary opcode
-     uint8_t biOpcode = (insn >> 16) & 0x1F;
-
-  // Get the bits 16-31, next 16 bits, as the tertiary opcode
-     uint16_t bdOpcode = (insn >> 2) & 0x3FFF;
-
-  // Get bit 30, 1 bit as the reserved flag
-     uint8_t aaOpcode = (insn >> 1) & 0x1;
-
-  // Get bit 31, 1 bit as the reserved flag
-     uint8_t lkOpcode = (insn >> 0) & 0x1;
-
 #if DEBUG_OPCODES
-     printf ("B-Form instruction opcode = 0x%x boOpcode = 0x%x biOpcode = 0x%x bdOpcode = 0x%x aaOpcode = 0x%x lkOpcode = 0x%x \n",insn,boOpcode,biOpcode,bdOpcode,aaOpcode,lkOpcode);
+     printf ("B-Form instruction opcode = 0x%x boOpcode = 0x%x biOpcode = 0x%x bdOpcode = 0x%x aaOpcode = 0x%x lkOpcode = 0x%x \n", insn, boOpcode, biOpcode, bdOpcode, aaOpcode, lkOpcode);
 #endif
 
      switch(primaryOpcode)
         {
           case 0x10:
              {
-            // Skip the registers for now!
-               SgAsmExpression* BO = new SgAsmByteValueExpression(boOpcode);
-               SgAsmExpression* BI = makeRegister(powerpc_regclass_gpr,biOpcode,powerpc_condreggranularity_bit);
-
             // DQ (10/15/2008): Compute the address of the branch to restart the disassembly.
             // The address is BD || 0b00 sign-extended.
-               uint32_t computedAddress = (bdOpcode >= (1U << 13)) ? bdOpcode - (1U << 14) : bdOpcode;
-               computedAddress <<= 2;
-
-               uint32_t targetBranchAddress = computedAddress;
-
-               if (aaOpcode == 0)
+               uint32_t targetBranchAddress = BD();
+               if (AA() == 0)
                   {
                  // In this case the address is the sum of BD || 0b00 sign-extended AND "the address of this instruction".
                     targetBranchAddress += p.ip;
                   }
 
-               SgAsmDoubleWordValueExpression* targetAddressExpression = makeBranchTarget(targetBranchAddress);
+               SgAsmQuadWordValueExpression* targetAddressExpression = makeBranchTarget(targetBranchAddress);
                ROSE_ASSERT(knownSuccessorsReturn->empty() == false);
 
-               if (lkOpcode == 0)
+               if (LK() == 0)
                   {
-                    if (aaOpcode == 0)
+                    if (AA() == 0)
                        {
-                         instruction = MAKE_INSN3(bc,BO,BI,targetAddressExpression);
+                         instruction = MAKE_INSN3(bc, BO(), BI(), targetAddressExpression);
                        }
                       else
                        {
-                         instruction = MAKE_INSN3(bca,BO,BI,targetAddressExpression);
+                         instruction = MAKE_INSN3(bca, BO(), BI(), targetAddressExpression);
                        }
                   }
                  else
                   {
-                    if (aaOpcode == 0)
+                    if (AA() == 0)
                        {
-                         instruction = MAKE_INSN3(bcl,BO,BI,targetAddressExpression);
+                         instruction = MAKE_INSN3(bcl, BO(), BI(), targetAddressExpression);
                        }
                       else
                        {
-                         instruction = MAKE_INSN3(bcla,BO,BI,targetAddressExpression);
+                         instruction = MAKE_INSN3(bcla, BO(), BI(), targetAddressExpression);
                        }
                   }
 
@@ -563,12 +542,12 @@
              {
             // The default case is now used for handling illegal instructions 
             // (during development it was for those not yet implemented).
-               printf ("Error: B-Form primaryOpcode = %d not handled! \n",primaryOpcode);
+               printf ("Error: B-Form primaryOpcode = %d not handled! \n", primaryOpcode);
                ROSE_ASSERT(false);
              }
         }
 
-     if (lkOpcode == 1)
+     if (LK() == 1)
         {
        // Also need to disassemble the next instruction!
           knownSuccessorsReturn->insert(p.ip + 4);
@@ -587,535 +566,21 @@
      uint8_t primaryOpcode = (insn >> 26) & 0x3F;
      ROSE_ASSERT(primaryOpcode == 0x11);
 
-  // Get the bits 6-10, next 5 bits, as the secondary opcode: RT, RS, TO, FRT, FRS
-     uint8_t levOpcode = (insn >> 5) & 0x7F;
-
   // Get bit 30, 1 bit as the reserved flag
      uint8_t constantOneOpcode = (insn >> 1) & 0x1;
      ROSE_ASSERT(constantOneOpcode == 1);
 
 #if DEBUG_OPCODES
-     printf ("SC-Form instruction opcode = 0x%x levOpcode = 0x%x constantOneOpcode = 0x%x \n",insn,levOpcode,constantOneOpcode);
+     printf ("SC-Form instruction opcode = 0x%x levOpcode = 0x%x constantOneOpcode = 0x%x \n", insn, levOpcode, constantOneOpcode);
 #endif
 
-     SgAsmExpression* LEV = new SgAsmWordValueExpression(levOpcode);
-     instruction = MAKE_INSN1(sc,LEV);
+     instruction = MAKE_INSN1(sc, LEV());
 
      ROSE_ASSERT(instruction != NULL);
      return instruction;
    }
 
 SgAsmPowerpcInstruction*
-PowerpcDisassembler::SingleInstructionDisassembler::decode_D_formInstruction()
-   {
-     SgAsmPowerpcInstruction* instruction = NULL;
-
-  // The primaryOpcode does not have to be 0x0B!
-     uint8_t primaryOpcode = (insn >> 26) & 0x3F;
-  // ROSE_ASSERT(primaryOpcode == 0x0B);
-
-  // Get the bits 6-10, next 5 bits, as the secondary opcode: RT, RS, TO, FRT, FRS
-     uint8_t secodaryOpcode = (insn >> 21) & 0x1F;
-     uint8_t rtOpcode  = (insn >> 21) & 0x1F;
-     uint8_t toOpcode  = rtOpcode;
-
-  // Get the bits 11-15, next 5 bits, as the tertiary opcode
-     uint8_t raOpcode = (insn >> 16) & 0x1F;
-
-  // Get bits 6-8, 3 bits as the BF opcode
-     uint8_t bfOpcode = (insn >> 21) & 0x8;
-
-  // Get bit 9, 1 bit as the reserved flag
-  // uint8_t reservedOpcode = (insn >> 24) & 0x1;
-
-  // Get bit 10, 1 bit as the length flag
-     uint8_t lengthOpcode = (insn >> 25) & 0x1;
-
-  // Get the bits 16-31, next 16 bits, as the tertiary opcode
-     uint8_t lastOpcode = (insn >> 0) & 0xFFFF;
-
-#if DEBUG_OPCODES
-  // printf ("D-Form instruction opcode = 0x%x secodaryOpcode = 0x%x bfOpcode = 0x%x reservedOpcode = 0x%x lengthOpcode = 0x%x raOpcode = 0x%x lastOpcode 0x%x \n",insn,secodaryOpcode,bfOpcode,reservedOpcode,lengthOpcode,raOpcode,lastOpcode);
-     printf ("D-Form instruction opcode = 0x%x secodaryOpcode = 0x%x bfOpcode = 0x%x lengthOpcode = 0x%x raOpcode = 0x%x lastOpcode 0x%x \n",insn,secodaryOpcode,bfOpcode,lengthOpcode,raOpcode,lastOpcode);
-#endif
-
-     switch(primaryOpcode)
-        {
-       // 2
-          case 0x2:
-             {
-               SgAsmExpression* TO = makeRegister(powerpc_regclass_gpr,toOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* SI = new SgAsmWordValueExpression(lastOpcode);
-               instruction = MAKE_INSN3(tdi,TO,RA,SI);
-               break;
-             }
-
-       // 3
-          case 0x3:
-             {
-               SgAsmExpression* TO = makeRegister(powerpc_regclass_gpr,toOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* SI = new SgAsmWordValueExpression(lastOpcode);
-               instruction = MAKE_INSN3(twi,TO,RA,SI);
-               break;
-             }
-
-       // 4-6
-          case 0x4:
-          case 0x5:
-          case 0x6: { /* illeagal instruction */ ROSE_ASSERT(false); break; }
-
-       // 7
-          case 0x7:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* SI = new SgAsmWordValueExpression(lastOpcode);
-               instruction = MAKE_INSN3(mulli,RT,RA,SI);
-               break;
-             }
-
-       // 8
-          case 0x8:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* SI = new SgAsmWordValueExpression(lastOpcode);
-               instruction = MAKE_INSN3(subfic,RT,RA,SI);
-               break;
-             }
-
-       // 9
-          case 0x9: { /* illeagal instruction */ ROSE_ASSERT(false); break; }
-
-       // 10
-          case 0x0A:
-             {
-               SgAsmExpression* BF = new SgAsmByteValueExpression(bfOpcode);
-               SgAsmExpression* L  = new SgAsmByteValueExpression(lengthOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* UI = new SgAsmWordValueExpression(lastOpcode);
-               instruction = MAKE_INSN4(cmpl,BF,L,RA,UI);
-               break;
-             }
-
-       // 11
-          case 0x0B:
-             {
-               SgAsmExpression* BF = new SgAsmByteValueExpression(bfOpcode);
-               SgAsmExpression* L  = new SgAsmByteValueExpression(lengthOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* SI = new SgAsmWordValueExpression(lastOpcode);
-               instruction = MAKE_INSN4(cmpi,BF,L,RA,SI);
-               break;
-             }
-
-       // 12
-          case 0x0C:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* SI = new SgAsmWordValueExpression(lastOpcode);
-               instruction = MAKE_INSN3(addic,RT,RA,SI);
-               break;
-             }
-
-       // 13
-          case 0x0D:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* SI = new SgAsmWordValueExpression(lastOpcode);
-               instruction = MAKE_INSN3(addic_record,RT,RA,SI);
-               break;
-             }
-
-       // 14
-          case 0x0E:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(addi,RT,mr);
-               break;
-             }
-
-       // 15
-          case 0x0F:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* SI = new SgAsmWordValueExpression(lastOpcode);
-               instruction = MAKE_INSN3(addis,RT,RA,SI);
-               break;
-             }
-
-       // 24
-          case 0x18:
-             {
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* UI = new SgAsmWordValueExpression(lastOpcode);
-               instruction = MAKE_INSN3(ori,RS,RA,UI);
-               break;
-             }
-
-       // 25
-          case 0x19:
-             {
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* UI = new SgAsmWordValueExpression(lastOpcode);
-               instruction = MAKE_INSN3(oris,RS,RA,UI);
-               break;
-             }
-
-       // 26
-          case 0x1A:
-             {
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* UI = new SgAsmWordValueExpression(lastOpcode);
-               instruction = MAKE_INSN3(xori,RS,RA,UI);
-               break;
-             }
-
-       // 27
-          case 0x1B:
-             {
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* UI = new SgAsmWordValueExpression(lastOpcode);
-               instruction = MAKE_INSN3(xoris,RS,RA,UI);
-               break;
-             }
-
-       // 28
-          case 0x1C:
-             {
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* UI = new SgAsmWordValueExpression(lastOpcode);
-               instruction = MAKE_INSN3(andi_record,RS,RA,UI);
-               break;
-             }
-
-       // 29
-          case 0x1D:
-             {
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* UI = new SgAsmWordValueExpression(lastOpcode);
-               instruction = MAKE_INSN3(andis_record,RS,RA,UI);
-               break;
-             }
-
-       // 32
-          case 0x20:
-             {
-            // The correct form of this instruction is "xxx RT,D(RA)", so maybe we need a more elaborate way to form "D(RA)" explicitly, perhaps as "(RA) + D".
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(lwz,RT,mr);
-               break;
-             }
-
-       // 33
-          case 0x21:
-             {
-            // The correct form of this instruction is "xxx RT,D(RA)", so maybe we need a more elaborate way to form "D(RA)" explicitly, perhaps as "(RA) + D".
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(lwzu,RT,mr);
-               break;
-             }
-
-       // 34
-          case 0x22:
-             {
-            // The correct form of this instruction is "xxx RT,D(RA)", so maybe we need a more elaborate way to form "D(RA)" explicitly, perhaps as "(RA) + D".
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(lbz,RT,mr);
-               break;
-             }
-
-       // 35
-          case 0x23:
-             {
-            // The correct form of this instruction is "xxx RT,D(RA)", so maybe we need a more elaborate way to form "D(RA)" explicitly, perhaps as "(RA) + D".
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(lbzu,RT,mr);
-               break;
-             }
-
-       // 36
-          case 0x24:
-             {
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(stw,RS,mr);
-               break;
-             }
-
-       // 37
-          case 0x25:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(stwu,RT,mr);
-               break;
-             }
-
-       // 38
-          case 0x26:
-             {
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(stb,RS,mr);
-               break;
-             }
-
-       // 39
-          case 0x27:
-             {
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(stbu,RS,mr);
-               break;
-             }
-
-       // 40
-          case 0x28:
-             {
-            // The correct form of this instruction is "xxx RT,D(RA)", so maybe we need a more elaborate way to form "D(RA)" explicitly, perhaps as "(RA) + D".
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(lhz,RT,mr);
-               break;
-             }
-
-       // 41
-          case 0x29:
-             {
-            // The correct form of this instruction is "xxx RT,D(RA)", so maybe we need a more elaborate way to form "D(RA)" explicitly, perhaps as "(RA) + D".
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(lhzu,RT,mr);
-               break;
-             }
-
-       // 42
-          case 0x2A:
-             {
-            // The correct form of this instruction is "xxx RT,D(RA)", so maybe we need a more elaborate way to form "D(RA)" explicitly, perhaps as "(RA) + D".
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(lha,RT,mr);
-               break;
-             }
-
-       // 43
-          case 0x2B:
-             {
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(sth,RS,mr);
-               break;
-             }
-
-       // 44
-          case 0x2C:
-             {
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(sth,RS,mr);
-               break;
-             }
-
-       // 45
-          case 0x2D:
-             {
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(sthu,RS,mr);
-               break;
-             }
-
-       // 46
-          case 0x2E:
-             {
-            // The correct form of this instruction is "xxx RT,D(RA)", so maybe we need a more elaborate way to form "D(RA)" explicitly, perhaps as "(RA) + D".
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(lmw,RT,mr);
-               break;
-             }
-
-       // 47
-          case 0x2F:
-             {
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(stmw,RS,mr);
-               break;
-             }
-
-       // 48
-          case 0x30:
-             {
-               SgAsmExpression* FRT = makeRegister(powerpc_regclass_fpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(lfs,FRT,mr);
-               break;
-             }
-
-       // 49
-          case 0x31:
-             {
-               SgAsmExpression* FRT = makeRegister(powerpc_regclass_fpr,secodaryOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(lfsu,FRT,mr);
-               break;
-             }
-
-       // 50
-          case 0x32:
-             {
-            // The correct form of this instruction is "xxx FRS,D(RA)", so maybe we need a more elaborate way to form "D(RA)" explicitly, perhaps as "(RA) + D".
-               SgAsmExpression* FRT = makeRegister(powerpc_regclass_fpr,secodaryOpcode);
-               SgAsmExpression* RA  = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D   = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(lfd,FRT,mr);
-               break;
-             }
-
-       // 52
-          case 0x34:
-             {
-            // The correct form of this instruction is "xxx FRS,D(RA)", so maybe we need a more elaborate way to form "D(RA)" explicitly, perhaps as "(RA) + D".
-               SgAsmExpression* FRS = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA  = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D   = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(stfs,FRS,mr);
-               break;
-             }
-
-       // 53
-          case 0x35:
-             {
-            // The correct form of this instruction is "xxx FRS,D(RA)", so maybe we need a more elaborate way to form "D(RA)" explicitly, perhaps as "(RA) + D".
-               SgAsmExpression* FRS = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA  = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D   = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(stfsu,FRS,mr);
-               break;
-             }
-
-       // 54
-          case 0x36:
-             {
-            // The correct form of this instruction is "xxx FRS,D(RA)", so maybe we need a more elaborate way to form "D(RA)" explicitly, perhaps as "(RA) + D".
-               SgAsmExpression* FRS = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA  = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D   = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(stfd,FRS,mr);
-               break;
-             }
-
-       // 55
-          case 0x37:
-             {
-            // The correct form of this instruction is "xxx FRS,D(RA)", so maybe we need a more elaborate way to form "D(RA)" explicitly, perhaps as "(RA) + D".
-               SgAsmExpression* FRS = makeRegister(powerpc_regclass_gpr,secodaryOpcode);
-               SgAsmExpression* RA  = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* D   = new SgAsmWordValueExpression(lastOpcode);
-               SgAsmExpression* addressExpr = makeAdd(RA,D);
-               SgAsmMemoryReferenceExpression* mr = makeMemoryReference(addressExpr,NULL);
-               instruction = MAKE_INSN2(stfdu,FRS,mr);
-               break;
-             }
-
-          default:
-             {
-            // The default case is now used for handling illegal instructions 
-            // (during development it was for those not yet implemented).
-               printf ("Error: D-Form primaryOpcode = %d not handled! \n",primaryOpcode);
-               ROSE_ASSERT(false);
-             }
-        }
-
-     ROSE_ASSERT(instruction != NULL);
-     return instruction;
-   }
-
-SgAsmPowerpcInstruction*
 PowerpcDisassembler::SingleInstructionDisassembler::decode_DS_formInstruction()
    {
      SgAsmPowerpcInstruction* instruction = NULL;
@@ -1127,803 +592,196 @@
    }
 
 SgAsmPowerpcInstruction*
-PowerpcDisassembler::SingleInstructionDisassembler::decode_X_formInstruction()
+PowerpcDisassembler::SingleInstructionDisassembler::decode_X_formInstruction_1F()
    {
      SgAsmPowerpcInstruction* instruction = NULL;
 
   // The primaryOpcode 
      uint8_t primaryOpcode = (insn >> 26) & 0x3F;
+     ROSE_ASSERT (primaryOpcode == 0x1F);
 
-  // X-form instructions can be associated with only 2 primary opcodes.
-     ROSE_ASSERT(primaryOpcode == 0x1F || primaryOpcode == 0x3F);
-
-  // Get the bits 6-10, next 5 bits
-     uint8_t rtOpcode  = (insn >> 21) & 0x1F;
-     uint8_t rsOpcode  = rtOpcode;
-     uint8_t btOpcode  = rtOpcode;
-
-     uint8_t bfOpcode  = (rtOpcode >> 2) & 0x7;
-     uint8_t lOpcode   = (rtOpcode >> 0) & 0x1;
-
-  // Values currently commented out are expected to be used later!
-  // uint8_t toOpcode  = rtOpcode;
-     uint8_t frtOpcode = rtOpcode;
-  // uint8_t frsOpcode = rtOpcode;
-  // uint8_t boOpcode  = rtOpcode;
-
-  // Values currently commented out are expected to be used later!
-  // Get the bits 11-15, next 5 bits
-     uint8_t raOpcode  = (insn >> 16) & 0x1F;
-     uint8_t fraOpcode = raOpcode;
-
-  // Get the bits 16-20, next 5 bits, as the secondary opcode: RT, RS, TO, FRT, FRS
-     uint8_t rbOpcode  = (insn >> 11) & 0x1F;
-  // uint8_t nbOpcode  = rbOpcode;
-     uint8_t shOpcode  = rbOpcode;
-     uint8_t frbOpcode = rbOpcode;
-
   // Get the bits 21-30, next 10 bits
      uint16_t xoOpcode = (insn >> 1) & 0x3FF;
 
-  // Get bit 31, 1 bit as the link bit
-     uint8_t rcOpcode = (insn >> 0) & 0x1;
-
 #if DEBUG_OPCODES
-     printf ("X-Form instruction opcode = 0x%x xoOpcode = 0x%x \n",insn,xoOpcode);
+     printf ("X-Form instruction 1F opcode = 0x%x primaryOpcode = 0x%x xoOpcode = 0x%x \n", insn, primaryOpcode, xoOpcode);
 #endif
 
      switch(xoOpcode)
         {
-       // 0
-          case 0x0:
-             {
-               if (primaryOpcode == 0x1F)
-                  {
-                    SgAsmExpression* BF = makeRegister(powerpc_regclass_gpr,bfOpcode);
-                    SgAsmExpression* L  = new SgAsmByteValueExpression(lOpcode);
-                    SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-                    SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-                    instruction = MAKE_INSN4(cmp,BF,L,RA,RB);
-                  }
-                 else
-                  {
-                    ROSE_ASSERT(primaryOpcode == 0x3F);
-                    SgAsmExpression* BF = makeRegister(powerpc_regclass_gpr,bfOpcode,powerpc_condreggranularity_bit);
-                    SgAsmExpression* FRA = makeRegister(powerpc_regclass_fpr,fraOpcode);
-                    SgAsmExpression* FRB = makeRegister(powerpc_regclass_fpr,frbOpcode);
-                    instruction = MAKE_INSN3(fcmpu,BF,FRA,FRB);
-                  }
-               break;
-             }
+          case 0x000: instruction = MAKE_INSN4(cmp, BF_cr(), L_10(), RA(), RB()); break;
+          case 0x004: instruction = MAKE_INSN3(tw, TO(), RA(), RB()); break;
+          case 0x008: instruction = MAKE_INSN3_RC(subfc, RT(), RA(), RB()); break;
+          case 0x009: instruction = MAKE_INSN3_RC(mulhdu, RT(), RA(), RB()); break;
+          case 0x00A: instruction = MAKE_INSN3_RC(addc, RT(), RA(), RB()); break;
+          case 0x00B: instruction = MAKE_INSN3_RC(mulhwu, RT(), RA(), RB()); break;
+          case 0x014: instruction = MAKE_INSN2(lwarx, RT(), memrefx(DWORDT)); break;
+          case 0x015: instruction = MAKE_INSN2(ldx, RT(), memrefx(QWORDT)); break;
+          case 0x017: instruction = MAKE_INSN2(lwzx, RT(), memrefx(DWORDT)); break;
+          case 0x018: instruction = MAKE_INSN3_RC(slw, RA(), RS(), RB()); break;
+          case 0x01A: instruction = MAKE_INSN2_RC(cntlzw, RA(), RS()); break;
+          case 0x01B: instruction = MAKE_INSN3_RC(sld, RA(), RS(), RB()); break;
+          case 0x01C: instruction = MAKE_INSN3_RC(and, RA(), RS(), RB()); break;
+          case 0x020: instruction = MAKE_INSN4(cmpl, BF_cr(), L_10(), RA(), RB()); break;
+          case 0x028: instruction = MAKE_INSN3_RC(subf, RT(), RA(), RB()); break;
+          case 0x035: instruction = MAKE_INSN2(ldux, RT(), memrefux(QWORDT)); break;
+          case 0x037: instruction = MAKE_INSN2(lwzux, RT(), memrefux(DWORDT)); break;
+          case 0x03C: instruction = MAKE_INSN3_RC(andc, RA(), RS(), RB()); break;
+          case 0x044: instruction = MAKE_INSN3(td, TO(), RA(), RB()); break;
+          case 0x049: instruction = MAKE_INSN3_RC(mulhd, RT(), RA(), RB()); break;
+          case 0x04B: instruction = MAKE_INSN3_RC(mulhw, RT(), RA(), RB()); break;
+          case 0x053: instruction = MAKE_INSN1(mfmsr, RT()); break;
+          case 0x057: instruction = MAKE_INSN2(lbzx, RT(), memrefx(BYTET)); break;
+          case 0x068: instruction = MAKE_INSN2_RC(neg, RT(), RA()); break;
+          case 0x077: instruction = MAKE_INSN2(lbzux, RT(), memrefux(BYTET)); break;
+          case 0x07C: instruction = MAKE_INSN3_RC(nor, RA(), RS(), RB()); break;
+          case 0x088: instruction = MAKE_INSN3_RC(adde, RT(), RA(), RB()); break;
+          case 0x08A: instruction = MAKE_INSN3_RC(subfe, RT(), RA(), RB()); break;
+          case 0x08E: instruction = MAKE_INSN2(lfssx, FRT(), memrefx(FLOATT)); break;
+          case 0x095: instruction = MAKE_INSN2(stdx, RS(), memrefx(QWORDT)); break;
+          case 0x096: instruction = MAKE_INSN2(stwcx_record, RS(), memrefx(DWORDT)); break;
+          case 0x097: instruction = MAKE_INSN2(stwx, RS(), memrefx(DWORDT)); break;
+          case 0x0AE: instruction = MAKE_INSN2(lfssux, FRT(), memrefux(FLOATT)); break;
+          case 0x0B5: instruction = MAKE_INSN2(stdux, RS(), memrefux(QWORDT)); break;
+          case 0x0B7: instruction = MAKE_INSN2(stwux, RS(), memrefux(DWORDT)); break;
+          case 0x0C8: instruction = MAKE_INSN2_RC(subfze, RT(), RA()); break;
+          case 0x0CA: instruction = MAKE_INSN2_RC(addze, RT(), RA()); break;
+          case 0x0CE: instruction = MAKE_INSN2(lfsdx, FRT(), memrefx(DOUBLET)); break;
+          case 0x0D6: instruction = MAKE_INSN2(stdcx_record, RS(), memrefx(QWORDT)); break;
+          case 0x0D7: instruction = MAKE_INSN2(stbx, RS(), memrefx(BYTET)); break;
+          case 0x0E8: instruction = MAKE_INSN2_RC(subfme, RT(), RA()); break;
+          case 0x0EA: instruction = MAKE_INSN2_RC(addme, RT(), RA()); break;
+          case 0x0EB: instruction = MAKE_INSN3_RC(mullw, RT(), RA(), RB()); break;
+          case 0x0EE: instruction = MAKE_INSN2(lfsdux, FRT(), memrefux(DOUBLET)); break;
+          case 0x0F7: instruction = MAKE_INSN2(stbux, RS(), memrefux(BYTET)); break;
+          case 0x10A: instruction = MAKE_INSN3_RC(add, RT(), RA(), RB()); break;
+          case 0x10E: instruction = MAKE_INSN2(lfxsx, FRT(), memrefx(V2FLOATT)); break;
+          case 0x116: instruction = MAKE_INSN1(dcbt, memrefx(BYTET)); break;
+          case 0x117: instruction = MAKE_INSN2(lhzx, RT(), memrefx(WORDT)); break;
+          case 0x11C: instruction = MAKE_INSN3_RC(eqv, RA(), RS(), RB()); break;
+          case 0x12E: instruction = MAKE_INSN2(lfxsux, FRT(), memrefux(V2FLOATT)); break;
+          case 0x137: instruction = MAKE_INSN2(lhzux, RT(), memrefux(WORDT)); break;
+          case 0x13C: instruction = MAKE_INSN3_RC(xor, RA(), RS(), RB()); break;
+          case 0x14E: instruction = MAKE_INSN2(lfxdx, FRT(), memrefx(V2DOUBLET)); break;
+          case 0x153: instruction = MAKE_INSN2(mfspr, RT(), SPR()); break;
+          case 0x155: instruction = MAKE_INSN2(lwax, RT(), memrefx(DWORDT)); break;
+          case 0x157: instruction = MAKE_INSN2(lhax, RT(), memrefx(WORDT)); break;
+          case 0x16E: instruction = MAKE_INSN2(lfxdux, FRT(), memrefux(V2DOUBLET)); break;
+          case 0x175: instruction = MAKE_INSN2(lwaux, RT(), memrefux(DWORDT)); break;
+          case 0x177: instruction = MAKE_INSN2(lhaux, RT(), memrefux(WORDT)); break;
+          case 0x18E: instruction = MAKE_INSN2(lfpsx, FRT(), memrefx(V2FLOATT)); break;
+          case 0x197: instruction = MAKE_INSN2(sthx, RS(), memrefx(WORDT)); break;
+          case 0x19C: instruction = MAKE_INSN3_RC(orc, RA(), RS(), RB()); break;
+          case 0x1AE: instruction = MAKE_INSN2(lfpsux, FRT(), memrefux(V2FLOATT)); break;
+          case 0x1B7: instruction = MAKE_INSN2(sthux, RS(), memrefux(WORDT)); break;
+          case 0x1BC: instruction = MAKE_INSN3_RC(or, RA(), RS(), RB()); break;
+          case 0x1C9: instruction = MAKE_INSN3_RC(divdu, RT(), RA(), RB()); break;
+          case 0x1CB: instruction = MAKE_INSN3_RC(divwu, RT(), RA(), RB()); break;
+          case 0x1CE: instruction = MAKE_INSN2(lfpdx, FRT(), memrefx(V2DOUBLET)); break;
+          case 0x1D3: instruction = MAKE_INSN2(mtspr, RS(), SPR()); break;
+          case 0x1DC: instruction = MAKE_INSN3_RC(nand, RA(), RS(), RB()); break;
+          case 0x1E9: instruction = MAKE_INSN3_RC(divd, RT(), RA(), RB()); break;
+          case 0x1EB: instruction = MAKE_INSN3_RC(divw, RT(), RA(), RB()); break;
+          case 0x1EE: instruction = MAKE_INSN2(lfpdux, FRT(), memrefux(V2DOUBLET)); break;
+          case 0x208: instruction = MAKE_INSN3_RC(subfco, RT(), RA(), RB()); break;
+          case 0x20A: instruction = MAKE_INSN3_RC(addco, RT(), RA(), RB()); break;
+          case 0x20E: instruction = MAKE_INSN2(stfpiwx, FRT(), memrefx(V2DWORDT)); break;
+          case 0x215: instruction = MAKE_INSN2(lswx, RT(), memrefx(DWORDT)); break;
+          case 0x216: instruction = MAKE_INSN2(lwbrx, RT(), memrefx(DWORDT)); break;
+          case 0x217: instruction = MAKE_INSN2(lfsx, FRT(), memrefx(FLOATT)); break;
+          case 0x218: instruction = MAKE_INSN3_RC(srw, RA(), RS(), RB()); break;
+          case 0x21B: instruction = MAKE_INSN3_RC(srd, RA(), RS(), RB()); break;
+          case 0x228: instruction = MAKE_INSN3_RC(subfo, RT(), RA(), RB()); break;
+          case 0x237: instruction = MAKE_INSN2(lfsux, FRT(), memrefux(FLOATT)); break;
+          case 0x255: instruction = MAKE_INSN2(lswx, RT(), memrefx(DWORDT)); break;
+          case 0x257: instruction = MAKE_INSN2(lfdx, FRT(), memrefx(DOUBLET)); break;
+          case 0x268: instruction = MAKE_INSN2_RC(nego, RT(), RA()); break;
+          case 0x288: instruction = MAKE_INSN3_RC(addeo, RT(), RA(), RB()); break;
+          case 0x28A: instruction = MAKE_INSN3_RC(subfeo, RT(), RA(), RB()); break;
+          case 0x28E: instruction = MAKE_INSN2(stfssx, FRT(), memrefx(FLOATT)); break;
+          case 0x295: instruction = MAKE_INSN2(stswx, RS(), memrefx(DWORDT)); break;
+          case 0x296: instruction = MAKE_INSN2(stwbrx, RS(), memrefx(DWORDT)); break;
+          case 0x2AE: instruction = MAKE_INSN2(stfssux, FRT(), memrefux(FLOATT)); break;
+          case 0x2C8: instruction = MAKE_INSN2_RC(subfzeo, RT(), RA()); break;
+          case 0x2CA: instruction = MAKE_INSN2_RC(addzeo, RT(), RA()); break;
+          case 0x2CE: instruction = MAKE_INSN2(stfsdx, FRT(), memrefx(DOUBLET)); break;
+          case 0x2D5: instruction = MAKE_INSN2(stswi, RS(), memrefx(DWORDT)); break;
+          case 0x2D7: instruction = MAKE_INSN2(stfdx, FRS(), memrefx(DOUBLET)); break;
+          case 0x2E8: instruction = MAKE_INSN2_RC(subfmeo, RT(), RA()); break;
+          case 0x2EA: instruction = MAKE_INSN2_RC(addmeo, RT(), RA()); break;
+          case 0x2EB: instruction = MAKE_INSN3_RC(mullwo, RT(), RA(), RB()); break;
+          case 0x2EE: instruction = MAKE_INSN2(stfsdux, FRT(), memrefux(DOUBLET)); break;
+          case 0x2F7: instruction = MAKE_INSN2(stfdux, FRS(), memrefx(DOUBLET)); break;
+          case 0x30A: instruction = MAKE_INSN3_RC(addo, RT(), RA(), RB()); break;
+          case 0x30E: instruction = MAKE_INSN2(stfxsx, FRT(), memrefx(V2FLOATT)); break;
+          case 0x316: instruction = MAKE_INSN2(lhbrx, RT(), memrefx(WORDT)); break;
+          case 0x318: instruction = MAKE_INSN3_RC(sraw, RA(), RS(), RB()); break;
+          case 0x31A: instruction = MAKE_INSN3_RC(srad, RA(), RS(), RB()); break;
+          case 0x32E: instruction = MAKE_INSN2(stfxsux, FRT(), memrefux(V2FLOATT)); break;
+          case 0x338: instruction = MAKE_INSN3_RC(srawi, RA(), RS(), SH_32bit()); break;
+          case 0x33A: instruction = MAKE_INSN3_RC(sradi, RA(), RS(), SH_64bit()); break; // The last bit of the ext. opcode is part of SH
+          case 0x33B: instruction = MAKE_INSN3_RC(sradi, RA(), RS(), SH_64bit()); break; // Same as previous insn
+          case 0x34E: instruction = MAKE_INSN2(stfxdx, FRT(), memrefx(V2DOUBLET)); break;
+          case 0x356: instruction = MAKE_INSN0(eieio); break;
+          case 0x36E: instruction = MAKE_INSN2(stfxdux, FRT(), memrefux(V2DOUBLET)); break;
+          case 0x38E: instruction = MAKE_INSN2(stfpsx, FRT(), memrefx(V2FLOATT)); break;
+          case 0x396: instruction = MAKE_INSN2(sthbrx, RS(), memrefx(WORDT)); break;
+          case 0x39A: instruction = MAKE_INSN2_RC(extsh, RA(), RS()); break;
+          case 0x3AE: instruction = MAKE_INSN2(stfpsux, FRT(), memrefux(V2FLOATT)); break;
+          case 0x3BA: instruction = MAKE_INSN2_RC(extsb, RA(), RS()); break;
+          case 0x3C9: instruction = MAKE_INSN3_RC(divduo, RT(), RA(), RB()); break;
+          case 0x3CB: instruction = MAKE_INSN3_RC(divwuo, RT(), RA(), RB()); break;
+          case 0x3CE: instruction = MAKE_INSN2(stfpdx, FRT(), memrefx(V2DOUBLET)); break;
+          case 0x3D7: instruction = MAKE_INSN2(stfiwx, FRS(), memrefx(DWORDT)); break;
+          case 0x3DA: instruction = MAKE_INSN2_RC(extsw, RA(), RS()); break;
+          case 0x3E9: instruction = MAKE_INSN3_RC(divdo, RT(), RA(), RB()); break;
+          case 0x3EB: instruction = MAKE_INSN3_RC(divwo, RT(), RA(), RB()); break;
+          case 0x3EE: instruction = MAKE_INSN2(stfpdux, FRT(), memrefux(V2DOUBLET)); break;
+          case 0x3F6: instruction = MAKE_INSN1(dcbz, memrefx(BYTET)); break;
 
-       // 21
-          case 0x15:
+        // FIXME: merge these into list
+          case 0x13:
              {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(ldx,RT,RA,RB);
-               break;
-             }
-
-       // 23
-          case 0x17:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(lwzx,RT,RA,RB);
-               break;
-             }
-
-       // 24
-          case 0x18:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (rcOpcode == 0)
+               if (fld<11, 11>() == 0)
                   {
-                    instruction = MAKE_INSN3(slw,RA,RS,RB);
+                    instruction = MAKE_INSN1(mfcr, RT());
                   }
                  else
                   {
-                    instruction = MAKE_INSN3(slw_record,RA,RS,RB);
-                  }
-               break;
-             }
+                 // instruction = MAKE_INSN1(mfocr, RT());
+                    instruction = MAKE_INSN1(mfcr, RT());
 
-       // 26
-          case 0x1A:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN2(cntlzw,RA,RS);
+                 // See note on page 124 of User Instruction Set Architecture version 2.02
+                    printf ("This mfocr instruction is an old form of the mfcr instruction ... \n");
+                    ROSE_ASSERT(false);
                   }
-                 else
-                  {
-                    instruction = MAKE_INSN2(cntlzw_record,RA,RS);
-                  }
                break;
              }
 
-       // 27
-          case 0x1B:
+          case 0x90:
              {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (rcOpcode == 0)
+               if (fld<11, 11>() == 0)
                   {
-                    instruction = MAKE_INSN3(sld,RA,RS,RB);
+                    instruction = MAKE_INSN2(mtcrf, FXM(), RS());
                   }
                  else
                   {
-                    instruction = MAKE_INSN3(sld_record,RA,RS,RB);
-                  }
-               break;
-             }
+                 // instruction = MAKE_INSN2(mtocrf, FXM(), RS());
+                    instruction = MAKE_INSN2(mtcrf, FXM(), RS());
 
-       // 28
-          case 0x1C:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(and,RA,RS,RB);
+                 // See note on page 124 of User Instruction Set Architecture version 2.02
+                    printf ("This mtocrf instruction is an old form of the mtcrf instruction ... \n");
+                    ROSE_ASSERT(false);
                   }
-                 else
-                  {
-                    instruction = MAKE_INSN3(and_record,RA,RS,RB);
-                  }
                break;
              }
 
-       // 32
-          case 0x20:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* BF = makeRegister(powerpc_regclass_gpr,bfOpcode);
-               SgAsmExpression* L  = new SgAsmByteValueExpression(lOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN4(cmpl,BF,L,RA,RB);
-               break;
-             }
-
-       // 38
-          case 0x26:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x3F);
-               SgAsmExpression* BT = new SgAsmByteValueExpression(btOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN1(mtfsb1,BT);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN1(mtfsb1_record,BT);
-                  }
-               break;
-             }
-
-       // 53
-          case 0x35:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(ldux,RT,RA,RB);
-               break;
-             }
-
-       // 55
-          case 0x37:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(lwzux,RT,RA,RB);
-               break;
-             }
-
-       // 60
-          case 0x3C:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(andc,RA,RS,RB);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(andc_record,RA,RS,RB);
-                  }
-               break;
-             }
-
-       // 70
-          case 0x46:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x3F);
-               SgAsmExpression* BT = new SgAsmByteValueExpression(btOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN1(mtfsb0,BT);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN1(mtfsb0_record,BT);
-                  }
-               break;
-             }
-
-       // 83
-          case 0x53:
-             {
-            // This is a privileged instruction (documented in Book III)!
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               instruction = MAKE_INSN1(mfmsr,RT);
-               break;
-             }
-
-       // 87
-          case 0x57:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(lbzx,RT,RA,RB);
-               break;
-             }
-
-       // 119
-          case 0x77:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(lbzux,RT,RA,RB);
-               break;
-             }
-
-       // 124
-          case 0x7C:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(nor,RA,RS,RB);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(nor_record,RA,RS,RB);
-                  }
-               break;
-             }
-
-       // 149
-          case 0x95:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(stdx,RS,RA,RB);
-               break;
-             }
-
-       // 151
-          case 0x97:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(stwx,RS,RA,RB);
-               break;
-             }
-
-       // 181
-          case 0xB5:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(stdux,RS,RA,RB);
-               break;
-             }
-
-       // 183
-          case 0xB7:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(stwux,RS,RA,RB);
-               break;
-             }
-
-       // 188
-          case 0xBC: // 188
-          case 0xD3: // 211
-             {
-            // This is a illegal instruction which I will translate to NOP (in PowerPC: nop -> ori for now!
-
-               printf ("Processing an illegal instruction (generating a NOP)! \n");
-               ROSE_ASSERT(false);
-#if 0
-               SgAsmExpression* R0a = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* R0b = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* zero = new SgAsmByteValueExpression(0);
-               instruction = MAKE_INSN3(ori,R0a,R0b,zero);
-#endif
-               break;
-             }
-
-       // 215
-          case 0xD7:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(stbx,RS,RA,RB);
-               break;
-             }
-
-       // 247
-          case 0xF7:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(stbux,RS,RA,RB);
-               break;
-             }
-
-       // 278
-          case 0x116:
-             {
-            // This is an instruction from Book II (data cache block touch)
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN2(dcbt,RA,RB);
-               break;
-             }
-
-       // 279
-          case 0x117:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(lhzx,RT,RA,RB);
-               break;
-             }
-
-       // 284
-          case 0x11C:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(eqv,RA,RS,RB);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(eqv_record,RA,RS,RB);
-                  }
-               break;
-             }
-
-       // 311
-          case 0x137:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(lhzux,RT,RA,RB);
-               break;
-             }
-
-       // 316
-          case 0x13C:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(xor,RA,RS,RB);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(xor_record,RA,RS,RB);
-                  }
-               break;
-             }
-
-       // 341
-          case 0x155:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(lwax,RT,RA,RB);
-               break;
-             }
-
-       // 343
-          case 0x157:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(lhax,RT,RA,RB);
-               break;
-             }
-
-       // 373
-          case 0x175:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(lwaux,RT,RA,RB);
-               break;
-             }
-
-       // 375
-          case 0x177:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(lhaux,RT,RA,RB);
-               break;
-             }
-
-       // 407
-          case 0x197:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(sthx,RS,RA,RB);
-               break;
-             }
-
-       // 412
-          case 0x19C:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(orc,RA,RS,RB);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(orc_record,RA,RS,RB);
-                  }
-               break;
-             }
-
-       // 439
-          case 0x1B7:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(sthux,RS,RA,RB);
-               break;
-             }
-
-       // 444
-          case 0x1BC:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(or,RA,RS,RB);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(or_record,RA,RS,RB);
-                  }
-               break;
-             }
-
-       // 476
-          case 0x1DC:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(nand,RA,RS,RB);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(nand_record,RA,RS,RB);
-                  }
-               break;
-             }
-
-       // 533
-          case 0x215:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(lswx,RT,RA,RB);
-               break;
-             }
-
-       // 534
-          case 0x216:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(lwbrx,RT,RA,RB);
-               break;
-             }
-
-       // 536
-          case 0x218:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(srw,RA,RS,RB);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(srw_record,RA,RS,RB);
-                  }
-               break;
-             }
-
-       // 539
-          case 0x21B:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(srd,RA,RS,RB);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(srd_record,RA,RS,RB);
-                  }
-               break;
-             }
-
-       // 583
-          case 0x247:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x3F);
-               SgAsmExpression* FRT = makeRegister(powerpc_regclass_fpr,frtOpcode,powerpc_condreggranularity_whole);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN1(mffs,FRT);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN1(mffs_record,FRT);
-                  }
-               break;
-             }
-
-       // 597
-          case 0x255:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(lswx,RT,RA,RB);
-               break;
-             }
-
-       // 661
-          case 0x295:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(stswx,RS,RA,RB);
-               break;
-             }
-
-       // 662
-          case 0x296:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(stwbrx,RS,RA,RB);
-               break;
-             }
-
-       // 725
-           case 0x2D5:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(stswi,RS,RA,RB);
-               break;
-             }
-
-       // 790
-          case 0x316:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(lhbrx,RT,RA,RB);
-               break;
-             }
-
-       // 792
-          case 0x318:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* SH = new SgAsmByteValueExpression(shOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(srad,RA,RS,SH);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(srad_record,RA,RS,SH);
-                  }
-               break;
-             }
-
-       // 794
-          case 0x31A:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* SH = new SgAsmByteValueExpression(shOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(sraw,RA,RS,SH);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(sraw_record,RA,RS,SH);
-                  }
-               break;
-             }
-
-       // 824
-          case 0x338:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* SH = new SgAsmByteValueExpression(shOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(srawi,RA,RS,SH);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(srawi_record,RA,RS,SH);
-                  }
-               break;
-             }
-
-       // 854
-          case 0x356:
-             {
-            // This is a book II instruction "Enforce In-order Execution of I/O
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               instruction = MAKE_INSN0(eieio);
-               break;
-             }
-
-       // 918
-          case 0x396:
-             {
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               instruction = MAKE_INSN3(sthbrx,RS,RA,RB);
-               break;
-             }
-
-       // BGL specific instructions
-          case 0x36: // 54
-          case 0x56: // 86
-          case 0x1CE: // 462
-          case 0x1EE: // 494
-          case 0x256: // 598
-          case 0x257: // 599
-          case 0x2D7: // 727
-          case 0x3BA: // 954
-          case 0x3BE: // 958
-          case 0x3CE: // 974
-          case 0x3EE: // 1006
-             {
-            // These appear to be BGL specific instructions (not a part of the public PowerPC instruction set documentation).
-               ROSE_ASSERT(primaryOpcode == 0x1F);
-               instruction = MAKE_INSN0(unknown_instruction);
-               break;
-             }
-
           default:
              {
             // The default case is now used for handling illegal instructions 
             // (during development it was for those not yet implemented).
-               printf ("Error: X-Form xoOpcode = %d not handled! \n",xoOpcode);
+               printf ("Error: X-Form 1F xoOpcode = %d not handled! \n", xoOpcode);
                throw BadInstruction();
-            // ROSE_ASSERT(false);
              }
         }
 
@@ -1932,188 +790,86 @@
    }
 
 SgAsmPowerpcInstruction*
-PowerpcDisassembler::SingleInstructionDisassembler::decode_XL_formInstruction()
+PowerpcDisassembler::SingleInstructionDisassembler::decode_X_formInstruction_3F()
    {
      SgAsmPowerpcInstruction* instruction = NULL;
 
   // The primaryOpcode 
      uint8_t primaryOpcode = (insn >> 26) & 0x3F;
-     ROSE_ASSERT(primaryOpcode == 0x13);
+     ROSE_ASSERT (primaryOpcode == 0x3F);
 
-  // Get the bits 6-10, next 5 bits
-     uint8_t btOpcode = (insn >> 21) & 0x1F;
-     uint8_t boOpcode = btOpcode;
-     uint8_t bfOpcode = btOpcode;
-
-  // Get the bits 11-15, next 5 bits
-     uint8_t baOpcode = (insn >> 16) & 0x1F;
-     uint8_t biOpcode = baOpcode;
-
-  // Get the bits 11-13, next 3 bits
-     uint8_t bfaOpcode = (insn >> 18) & 0x7;
-
-  // Get the bits 16-20, next 5 bits
-     uint8_t bbOpcode = (insn >> 11) & 0x1F;
-
-  // Get the bits 19-20, next 2 bits
-     uint8_t bhOpcode = (insn >> 11) & 0x3;
-
   // Get the bits 21-30, next 10 bits
      uint16_t xoOpcode = (insn >> 1) & 0x3FF;
 
-  // Get bit 31, 1 bit as the link bit
-     uint8_t lkOpcode = (insn >> 0) & 0x1;
-
 #if DEBUG_OPCODES
-     printf ("XL-Form instruction opcode = 0x%x xoOpcode = 0x%x = %d btOpcode = 0x%x = %d baOpcode = 0x%x = %d bbOpcode = 0x%x = %d bhOpcode = 0x%x = %d lkOpcode = 0x%x \n",
-          insn,xoOpcode,xoOpcode,btOpcode,btOpcode,baOpcode,baOpcode,bbOpcode,bbOpcode,bhOpcode,bhOpcode,lkOpcode);
+     printf ("X-Form instruction opcode = 0x%x primaryOpcode = 0x%x xoOpcode = 0x%x \n", insn, primaryOpcode, xoOpcode);
 #endif
 
      switch(xoOpcode)
         {
-       // 0
-          case 0x0:
-             {
-               SgAsmExpression* BF  = makeRegister(powerpc_regclass_gpr,bfOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BFA = makeRegister(powerpc_regclass_gpr,bfaOpcode,powerpc_condreggranularity_bit);
-               instruction = MAKE_INSN2(mcrf,BF,BFA);
-               break;
-             }
+          case 0x0: instruction = MAKE_INSN3(fcmpu, BF_cr(), FRA(), FRB()); break;
+          case 0xC: instruction = MAKE_INSN2_RC(frsp, FRT(), FRB()); break;
+          case 0xE: instruction = MAKE_INSN2_RC(fctiw, FRT(), FRB()); break;
+          case 0xF: instruction = MAKE_INSN2_RC(fctiwz, FRT(), FRB()); break;
+          case 0x26: instruction = MAKE_INSN1(mtfsb1, BT()); break;
+          case 0x28: instruction = MAKE_INSN2_RC(fneg, FRT(), FRB()); break;
+          case 0x46: instruction = MAKE_INSN1_RC(mtfsb0, BT()); break;
+          case 0x48: instruction = MAKE_INSN2_RC(fmr, FRT(), FRB()); break;
+          case 0x86: instruction = MAKE_INSN2_RC(mtfsfi, BF_fpscr(), U()); break;
+          case 0x88: instruction = MAKE_INSN2_RC(fnabs, FRT(), FRB()); break;
+          case 0x108: instruction = MAKE_INSN2_RC(fabs, FRT(), FRB()); break;
+          case 0x247: instruction = MAKE_INSN1_RC(mffs, FRT()); break;
+          case 0x2C7: instruction = MAKE_INSN2_RC(mtfsf, FLM(), FRB()); break;
 
-       // 16
-          case 0x10:
+          default:
              {
-               SgAsmExpression* BO = new SgAsmByteValueExpression(boOpcode);
-               SgAsmExpression* BI = makeRegister(powerpc_regclass_gpr,biOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BH = new SgAsmByteValueExpression(bhOpcode);
-               if (lkOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(bclr,BO,BI,BH);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(bclrl,BO,BI,BH);
+            // The default case is now used for handling illegal instructions 
+            // (during development it was for those not yet implemented).
+               printf ("Error: X-Form 3F xoOpcode = %d not handled! \n", xoOpcode);
+               ROSE_ASSERT(false);
 
-                    knownSuccessorsReturn->insert(p.ip + 4);
-                  }
-
-#if DEBUG_BRANCH_LOGIC
-               printf ("***** Need to compute branch address (but it is indirect, via link register) ***** \n");
-            // ROSE_ASSERT(false);
-#endif
-               break;
+           // throw BadInstruction();
              }
+        }
 
-       // 33
-          case 0x21:
-             {
-               SgAsmExpression* BT = makeRegister(powerpc_regclass_gpr,btOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BA = makeRegister(powerpc_regclass_gpr,baOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BB = makeRegister(powerpc_regclass_gpr,bbOpcode,powerpc_condreggranularity_bit);
-               instruction = MAKE_INSN3(crnor,BT,BA,BB);
-               break;
-             }
+     ROSE_ASSERT(instruction != NULL);
+     return instruction;
+   }
 
-       // 129
-          case 0x81:
-             {
-               SgAsmExpression* BT = makeRegister(powerpc_regclass_gpr,btOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BA = makeRegister(powerpc_regclass_gpr,baOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BB = makeRegister(powerpc_regclass_gpr,bbOpcode,powerpc_condreggranularity_bit);
-               instruction = MAKE_INSN3(crandc,BT,BA,BB);
-               break;
-             }
+SgAsmPowerpcInstruction*
+PowerpcDisassembler::SingleInstructionDisassembler::decode_X_formInstruction_00()
+   {
+     SgAsmPowerpcInstruction* instruction = NULL;
 
-       // 193
-          case 0xC1:
-             {
-               SgAsmExpression* BT = makeRegister(powerpc_regclass_gpr,btOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BA = makeRegister(powerpc_regclass_gpr,baOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BB = makeRegister(powerpc_regclass_gpr,bbOpcode,powerpc_condreggranularity_bit);
-               instruction = MAKE_INSN3(crxor,BT,BA,BB);
-               break;
-             }
+     if (insn == 0) throw BadInstruction(); // Special, known bad instruction form
 
-       // 225
-          case 0xE1:
-             {
-               SgAsmExpression* BT = makeRegister(powerpc_regclass_gpr,btOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BA = makeRegister(powerpc_regclass_gpr,baOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BB = makeRegister(powerpc_regclass_gpr,bbOpcode,powerpc_condreggranularity_bit);
-               instruction = MAKE_INSN3(crnand,BT,BA,BB);
-               break;
-             }
+  // Get the bits 21-30, next 10 bits
+     uint16_t xoOpcode = (insn >> 1) & 0x3FF;
 
-       // 257
-          case 0x101:
-             {
-               SgAsmExpression* BT = makeRegister(powerpc_regclass_gpr,btOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BA = makeRegister(powerpc_regclass_gpr,baOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BB = makeRegister(powerpc_regclass_gpr,bbOpcode,powerpc_condreggranularity_bit);
-               instruction = MAKE_INSN3(crand,BT,BA,BB);
-               break;
-             }
-
-       // 289
-          case 0x121:
-             {
-               SgAsmExpression* BT = makeRegister(powerpc_regclass_gpr,btOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BA = makeRegister(powerpc_regclass_gpr,baOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BB = makeRegister(powerpc_regclass_gpr,bbOpcode,powerpc_condreggranularity_bit);
-               instruction = MAKE_INSN3(creqv,BT,BA,BB);
-               break;
-             }
-
-       // 417
-          case 0x1A1:
-             {
-               SgAsmExpression* BT = makeRegister(powerpc_regclass_gpr,btOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BA = makeRegister(powerpc_regclass_gpr,baOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BB = makeRegister(powerpc_regclass_gpr,bbOpcode,powerpc_condreggranularity_bit);
-               instruction = MAKE_INSN3(crorc,BT,BA,BB);
-               break;
-             }
-
-       // 449
-          case 0x1C1:
-             {
-               SgAsmExpression* BT = makeRegister(powerpc_regclass_gpr,btOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BA = makeRegister(powerpc_regclass_gpr,baOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BB = makeRegister(powerpc_regclass_gpr,bbOpcode,powerpc_condreggranularity_bit);
-               instruction = MAKE_INSN3(cror,BT,BA,BB);
-               break;
-             }
-
-       // 528
-          case 0x210:
-             {
-               SgAsmExpression* BO = new SgAsmByteValueExpression(boOpcode);
-               SgAsmExpression* BI = makeRegister(powerpc_regclass_gpr,biOpcode,powerpc_condreggranularity_bit);
-               SgAsmExpression* BH = new SgAsmByteValueExpression(bhOpcode);
-               if (lkOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(bcctr,BO,BI,BH);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(bcctrl,BO,BI,BH);
-
-                    knownSuccessorsReturn->insert(p.ip + 4);
-                  }
-
-#if DEBUG_BRANCH_LOGIC
-               printf ("***** Need to compute branch address (but it is indirect, via link register) ***** \n");
-            // ROSE_ASSERT(false);
-#endif
-               break;
-             }
-
+     switch(xoOpcode)
+        {
+          case 0x020: instruction = MAKE_INSN2(fpmr, FRT(), FRB()); break;
+          case 0x060: instruction = MAKE_INSN2(fpabs, FRT(), FRB()); break;
+          case 0x0A0: instruction = MAKE_INSN2(fpneg, FRT(), FRB()); break;
+          case 0x0C0: instruction = MAKE_INSN2(fprsp, FRT(), FRB()); break;
+          case 0x0E0: instruction = MAKE_INSN2(fpnabs, FRT(), FRB()); break;
+          case 0x120: instruction = MAKE_INSN2(fsmr, FRT(), FRB()); break;
+          case 0x160: instruction = MAKE_INSN2(fsabs, FRT(), FRB()); break;
+          case 0x1A0: instruction = MAKE_INSN2(fsneg, FRT(), FRB()); break;
+          case 0x1E0: instruction = MAKE_INSN2(fsnabs, FRT(), FRB()); break;
+          case 0x220: instruction = MAKE_INSN2(fxmr, FRT(), FRB()); break;
+          case 0x240: instruction = MAKE_INSN2(fpctiw, FRT(), FRB()); break;
+          case 0x2C0: instruction = MAKE_INSN2(fpctiwz, FRT(), FRB()); break;
+          case 0x320: instruction = MAKE_INSN2(fsmtp, FRT(), FRB()); break;
+          case 0x3A0: instruction = MAKE_INSN2(fsmfp, FRT(), FRB()); break;
           default:
              {
             // The default case is now used for handling illegal instructions 
             // (during development it was for those not yet implemented).
-               printf ("Error: XL-Form xoOpcode = %d not handled! \n",xoOpcode);
+               printf ("Error: X-Form 00 xoOpcode = %d not handled! \n", xoOpcode);
                ROSE_ASSERT(false);
+
+           // throw BadInstruction();
              }
         }
 
@@ -2122,106 +878,65 @@
    }
 
 SgAsmPowerpcInstruction*
-PowerpcDisassembler::SingleInstructionDisassembler::decode_XFX_formInstruction()
+PowerpcDisassembler::SingleInstructionDisassembler::decode_XL_formInstruction()
    {
      SgAsmPowerpcInstruction* instruction = NULL;
 
   // The primaryOpcode 
      uint8_t primaryOpcode = (insn >> 26) & 0x3F;
-     ROSE_ASSERT(primaryOpcode == 0x1F);
+     ROSE_ASSERT(primaryOpcode == 0x13);
 
-  // Get the bits 6-10, 5 bits wide
-     uint8_t rtOpcode = (insn >> 21) & 0x1F;
-     uint8_t rsOpcode = rtOpcode;
-
-  // Get the bits 11-20, 10 bits wide
-     uint16_t sprOpcode_temp = (insn >> 11) & 0x3FF;
-     uint16_t sprOpcode = ((sprOpcode_temp >> 5) | (sprOpcode_temp << 5)) & 0x3FF;
-
-  // Values currently commented out are expected to be used later!
-  // uint16_t tbrOpcode = sprOpcode;
-
-  // Get the bit 11, 1 bit wide
-     uint8_t constantOpcode = (insn >> 20) & 0x1;
-
-  // Values currently commented out are expected to be used later!
-  // Get the bits 12-20, 8 bits wide
-     uint8_t fxmOpcode = (insn >> 12) & 0xFF;
-
   // Get the bits 21-30, next 10 bits
      uint16_t xoOpcode = (insn >> 1) & 0x3FF;
 
 #if DEBUG_OPCODES
-     printf ("XFX-Form instruction opcode = 0x%x xoOpcode = 0x%x \n",insn,xoOpcode);
+     printf ("XL-Form instruction opcode = 0x%x xoOpcode = 0x%x = %d btOpcode = 0x%x = %d baOpcode = 0x%x = %d bbOpcode = 0x%x = %d bhOpcode = 0x%x = %d lkOpcode = 0x%x \n",
+          insn, xoOpcode, xoOpcode, btOpcode, btOpcode, baOpcode, baOpcode, bbOpcode, bbOpcode, bhOpcode, bhOpcode, lkOpcode);
 #endif
 
      switch(xoOpcode)
         {
-       // 19
-          case 0x13:
+          case 0x000: instruction = MAKE_INSN2(mcrf, BF_cr(), BFA_cr()); break;
+          case 0x010:
              {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               if (constantOpcode == 0)
+               if (LK() == 0)
                   {
-                    instruction = MAKE_INSN1(mfcr,RT);
+                    instruction = MAKE_INSN3(bclr, BO(), BI(), BH());
                   }
                  else
                   {
-                 // instruction = MAKE_INSN1(mfocr,RT);
-                    instruction = MAKE_INSN1(mfcr,RT);
-
-                 // See note on page 124 of User Instruction Set Architecture version 2.02
-                    printf ("This mfocr instruction is an old form of the mfcr instruction ... \n");
-                    ROSE_ASSERT(false);
+                    instruction = MAKE_INSN3(bclrl, BO(), BI(), BH());
+                    knownSuccessorsReturn->insert(p.ip + 4);
                   }
                break;
              }
-
-       // 144
-          case 0x90:
+          case 0x021: instruction = MAKE_INSN3(crnor, BT(), BA(), BB()); break;
+          case 0x081: instruction = MAKE_INSN3(crandc, BT(), BA(), BB()); break;
+          case 0x0C1: instruction = MAKE_INSN3(crxor, BT(), BA(), BB()); break;
+          case 0x0E1: instruction = MAKE_INSN3(crnand, BT(), BA(), BB()); break;
+          case 0x101: instruction = MAKE_INSN3(crand, BT(), BA(), BB()); break;
+          case 0x121: instruction = MAKE_INSN3(creqv, BT(), BA(), BB()); break;
+          case 0x1A1: instruction = MAKE_INSN3(crorc, BT(), BA(), BB()); break;
+          case 0x1C1: instruction = MAKE_INSN3(cror, BT(), BA(), BB()); break;
+          case 0x210:
              {
-               SgAsmExpression* FXM = new SgAsmByteValueExpression(fxmOpcode);
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               if (constantOpcode == 0)
+               if (LK() == 0)
                   {
-                    instruction = MAKE_INSN2(mtcrf,FXM,RS);
+                    instruction = MAKE_INSN3(bcctr, BO(), BI(), BH());
                   }
                  else
                   {
-                 // instruction = MAKE_INSN2(mtocrf,FXM,RS);
-                    instruction = MAKE_INSN2(mtcrf,FXM,RS);
-
-                 // See note on page 124 of User Instruction Set Architecture version 2.02
-                    printf ("This mtocrf instruction is an old form of the mtcrf instruction ... \n");
-                    ROSE_ASSERT(false);
+                    instruction = MAKE_INSN3(bcctrl, BO(), BI(), BH());
+                    knownSuccessorsReturn->insert(p.ip + 4);
                   }
                break;
              }
 
-       // 339
-          case 0x153:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-            // SgAsmExpression* SPR = new SgAsmWordValueExpression(sprOpcode);
-               SgAsmExpression* SPR = makeRegister(powerpc_regclass_spr,sprOpcode,powerpc_condreggranularity_whole);
-               instruction = MAKE_INSN2(mfspr,RT,SPR);
-               break;
-             }
-
-       // 467
-          case 0x1d3:
-             {
-               SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
-               SgAsmExpression* SPR = makeRegister(powerpc_regclass_spr,sprOpcode,powerpc_condreggranularity_whole);
-               instruction = MAKE_INSN2(mfspr,RS,SPR);
-               break;
-             }
-
           default:
              {
             // The default case is now used for handling illegal instructions 
             // (during development it was for those not yet implemented).
-               printf ("Error: XFX-Form xoOpcode = %d not handled! \n",xoOpcode);
+               printf ("Error: XL-Form xoOpcode = %d not handled! \n", xoOpcode);
                ROSE_ASSERT(false);
              }
         }
@@ -2231,650 +946,80 @@
    }
 
 SgAsmPowerpcInstruction*
-PowerpcDisassembler::SingleInstructionDisassembler::decode_XFL_formInstruction()
+PowerpcDisassembler::SingleInstructionDisassembler::decode_A_formInstruction_00()
    {
      SgAsmPowerpcInstruction* instruction = NULL;
 
-  // The primaryOpcode 
-     uint8_t primaryOpcode = (insn >> 26) & 0x3F;
-     ROSE_ASSERT(primaryOpcode == 0x3F);
-
-  // Get the bits 7-14, 8 bits wide
-     uint8_t flmOpcode = (insn >> 17) & 0xFF;
-
-  // Get the bits 16-20, 5 bits wide
-     uint8_t frbOpcode = (insn >> 11) & 0x1F;
-
-  // Get the bit 31, 1 bit wide
-     uint8_t rcOpcode = (insn >> 0) & 0x1;
-
 #if DEBUG_OPCODES
-     printf ("XFL-Form instruction opcode = 0x%x flmOpcode = 0x%x = %d frbOpcode = 0x%x = %d \n",insn,flmOpcode,flmOpcode,frbOpcode,frbOpcode);
+     printf ("A-Form instruction opcode = 0x%x primaryOpcode = 0x%x frtOpcode = 0x%x fraOpcode = 0x%x frbOpcode = 0x%x frcOpcode = 0x%x xOpcode = 0x%x rcOpcode = 0x%x \n", insn, primaryOpcode, frtOpcode, fraOpcode, frbOpcode, frcOpcode, xOpcode, rcOpcode);
 #endif
 
-     SgAsmExpression* FLM = new SgAsmWordValueExpression(flmOpcode);
-     SgAsmExpression* FRB = makeRegister(powerpc_regclass_gpr,frbOpcode);
-     if (rcOpcode == 0)
+     switch(fld<26, 30>())
         {
-          instruction = MAKE_INSN2(mtfsf,FLM,FRB);
+          case 0x05: instruction = MAKE_INSN4(fpsel, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x08: instruction = MAKE_INSN3(fpmul, FRT(), FRA(), FRC()); break;
+          case 0x09: instruction = MAKE_INSN3(fxmul, FRT(), FRA(), FRC()); break;
+          case 0x0A: instruction = MAKE_INSN3(fxpmul, FRT(), FRA(), FRC()); break;
+          case 0x0B: instruction = MAKE_INSN3(fxsmul, FRT(), FRA(), FRC()); break;
+          case 0x0C: instruction = MAKE_INSN3(fpadd, FRT(), FRA(), FRB()); break;
+          case 0x0D: instruction = MAKE_INSN3(fpsub, FRT(), FRA(), FRB()); break;
+          case 0x0E: instruction = MAKE_INSN2(fpre, FRT(), FRB()); break;
+          case 0x0F: instruction = MAKE_INSN2(fprsqrte, FRT(), FRB()); break;
+          case 0x10: instruction = MAKE_INSN4(fpmadd, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x11: instruction = MAKE_INSN4(fxmadd, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x12: instruction = MAKE_INSN4(fxcpmadd, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x13: instruction = MAKE_INSN4(fxcsmadd, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x14: instruction = MAKE_INSN4(fpnmadd, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x15: instruction = MAKE_INSN4(fxnmadd, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x16: instruction = MAKE_INSN4(fxcpnmadd, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x17: instruction = MAKE_INSN4(fxcsnmadd, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x18: instruction = MAKE_INSN4(fpmsub, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x19: instruction = MAKE_INSN4(fxmsub, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x1A: instruction = MAKE_INSN4(fxcpmsub, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x1B: instruction = MAKE_INSN4(fxcsmsub, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x1C: instruction = MAKE_INSN4(fpnmsub, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x1D: instruction = MAKE_INSN4(fxnmsub, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x1E: instruction = MAKE_INSN4(fxcpnmsub, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x1F: instruction = MAKE_INSN4(fxcsnmsub, FRT(), FRA(), FRB(), FRC()); break;
+          default:
+             {
+            // The default case is now used for handling illegal instructions 
+            // (during development it was for those not yet implemented).
+               printf ("Error: A-Form xOpcode = %d (illegal instruction) \n", int(fld<26, 30>()));
+               ROSE_ASSERT(false);
+             }
         }
-       else
-        {
-          instruction = MAKE_INSN2(mtfsf_record,FLM,FRB);
-        }
 
      ROSE_ASSERT(instruction != NULL);
      return instruction;
    }
 
 SgAsmPowerpcInstruction*
-PowerpcDisassembler::SingleInstructionDisassembler::decode_XS_formInstruction()
+PowerpcDisassembler::SingleInstructionDisassembler::decode_A_formInstruction_04()
    {
      SgAsmPowerpcInstruction* instruction = NULL;
 
-     printf ("XS-Form instructions not implemented yet, I have no examples so far! \n");
-
-     ROSE_ASSERT(instruction != NULL);
-     return instruction;
-   }
-
-SgAsmPowerpcInstruction*
-PowerpcDisassembler::SingleInstructionDisassembler::decode_XO_formInstruction()
-   {
-     SgAsmPowerpcInstruction* instruction = NULL;
-
-  // The primaryOpcode 
-     uint8_t primaryOpcode = (insn >> 26) & 0x3F;
-     ROSE_ASSERT(primaryOpcode == 0x1F);
-
-  // Get the bits 6-10, 5 bits wide
-     uint8_t rtOpcode = (insn >> 21) & 0x1F;
-
-  // Get the bits 11-15, 5 bits wide
-     uint8_t raOpcode = (insn >> 16) & 0x1F;
-
-  // Get the bits 16-20, 5 bits wide
-     uint8_t rbOpcode = (insn >> 11) & 0x1F;
-
-  // Get the bit 21, 1 bit wide
-     uint8_t oeOpcode = (insn >> 10) & 0x1;
-
-  // Get the bits 21-30, next 10 bits
-     uint16_t xoOpcode = (insn >> 1) & 0x1FF;
-
-  // Get the bit 31, 1 bit wide
-     uint8_t rcOpcode = (insn >> 0) & 0x1;
-
 #if DEBUG_OPCODES
-     printf ("XO-Form instruction opcode = 0x%x xoOpcode = 0x%x \n",insn,xoOpcode);
+     printf ("A-Form instruction opcode = 0x%x primaryOpcode = 0x%x frtOpcode = 0x%x fraOpcode = 0x%x frbOpcode = 0x%x frcOpcode = 0x%x xOpcode = 0x%x rcOpcode = 0x%x \n", insn, primaryOpcode, frtOpcode, fraOpcode, frbOpcode, frcOpcode, xOpcode, rcOpcode);
 #endif
 
-     switch(xoOpcode)
-        {
-       // 8
-          case 0x8:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (oeOpcode == 0)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(subfc,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(subfc_record,RT,RA,RB);
-                       }
-                  }
-                 else
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(subfco,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(subfco_record,RT,RA,RB);
-                       }
-                  }
-               break;
-             }
+  // FIX ME: Make the floating point registers use the powerpc_regclass_fpr instead of powerpc_regclass_gpr
 
-       // 9
-          case 0x9:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(mulhdu,RT,RA,RB);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(mulhdu_record,RT,RA,RB);
-                  }
-               break;
-             }
-
-       // 10
-          case 0xA:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (oeOpcode == 0)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(addc,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(addc_record,RT,RA,RB);
-                       }
-                  }
-                 else
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(addco,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(addco_record,RT,RA,RB);
-                       }
-                  }
-               break;
-             }
-
-       // 11
-          case 0xB:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(mulhwu,RT,RA,RB);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(mulhwu_record,RT,RA,RB);
-                  }
-               break;
-             }
-
-       // 40
-          case 0x28:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (oeOpcode == 0)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(subf,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(subf_record,RT,RA,RB);
-                       }
-                  }
-                 else
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(subfo,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(subfo_record,RT,RA,RB);
-                       }
-                  }
-               break;
-             }
-
-       // 73
-          case 0x49:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(mulhd,RT,RA,RB);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(mulhd_record,RT,RA,RB);
-                  }
-               break;
-             }
-
-       // 75
-          case 0x4B:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN3(mulhw,RT,RA,RB);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN3(mulhw_record,RT,RA,RB);
-                  }
-               break;
-             }
-
-       // 104
-          case 0x68:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               if (oeOpcode == 0)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN2(neg,RT,RA);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN2(neg_record,RT,RA);
-                       }
-                  }
-                 else
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN2(nego,RT,RA);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN2(nego_record,RT,RA);
-                       }
-                  }
-               break;
-             }
-
-       // 136
-          case 0x88:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (oeOpcode == 0)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(adde,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(adde_record,RT,RA,RB);
-                       }
-                  }
-                 else
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(addeo,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(addeo_record,RT,RA,RB);
-                       }
-                  }
-               break;
-             }
-
-       // 138
-          case 0x8A:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (oeOpcode == 0)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(subfe,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(subfe_record,RT,RA,RB);
-                       }
-                  }
-                 else
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(subfeo,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(subfeo_record,RT,RA,RB);
-                       }
-                  }
-               break;
-             }
-
-       // 200
-          case 0xC8:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               if (oeOpcode == 0)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN2(subfze,RT,RA);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN2(subfze_record,RT,RA);
-                       }
-                  }
-                 else
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN2(subfzeo,RT,RA);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN2(subfzeo_record,RT,RA);
-                       }
-                  }
-               break;
-             }
-
-       // 202
-          case 0xCA:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               if (oeOpcode == 0)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN2(addze,RT,RA);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN2(addze_record,RT,RA);
-                       }
-                  }
-                 else
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN2(addzeo,RT,RA);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN2(addzeo_record,RT,RA);
-                       }
-                  }
-               break;
-             }
-
-       // 232
-          case 0xE8:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               if (oeOpcode == 0)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN2(subfme,RT,RA);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN2(subfme_record,RT,RA);
-                       }
-                  }
-                 else
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN2(subfmeo,RT,RA);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN2(subfmeo_record,RT,RA);
-                       }
-                  }
-               break;
-             }
-
-       // 234
-          case 0xEA:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               if (oeOpcode == 0)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN2(addme,RT,RA);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN2(addme_record,RT,RA);
-                       }
-                  }
-                 else
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN2(addmeo,RT,RA);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN2(addmeo_record,RT,RA);
-                       }
-                  }
-               break;
-             }
-
-       // 235
-          case 0xEB:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (oeOpcode == 0)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(mullw,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(mullw_record,RT,RA,RB);
-                       }
-                  }
-                 else
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(mullwo,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(mullwo_record,RT,RA,RB);
-                       }
-                  }
-               break;
-             }
-
-       // 266
-          case 0x10A:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (oeOpcode == 0)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(add,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(add_record,RT,RA,RB);
-                       }
-                  }
-                 else
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(addo,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(addo_record,RT,RA,RB);
-                       }
-                  }
-               break;
-             }
-
-       // 457
-          case 0x1C9:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (oeOpcode == 0)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(divdu,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(divdu_record,RT,RA,RB);
-                       }
-                  }
-                 else
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(divduo,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(divduo_record,RT,RA,RB);
-                       }
-                  }
-               break;
-             }
-
-       // 459
-          case 0x1CB:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (oeOpcode == 0)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(divwu,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(divwu_record,RT,RA,RB);
-                       }
-                  }
-                 else
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(divwuo,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(divwuo_record,RT,RA,RB);
-                       }
-                  }
-               break;
-             }
-
-       // 489
-          case 0x1E9:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (oeOpcode == 0)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(divd,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(divd_record,RT,RA,RB);
-                       }
-                  }
-                 else
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(divdo,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(divdo_record,RT,RA,RB);
-                       }
-                  }
-               break;
-             }
-
-       // 491
-          case 0x1EB:
-             {
-               SgAsmExpression* RT = makeRegister(powerpc_regclass_gpr,rtOpcode);
-               SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-               SgAsmExpression* RB = makeRegister(powerpc_regclass_gpr,rbOpcode);
-               if (oeOpcode == 0)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(divw,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(divw_record,RT,RA,RB);
-                       }
-                  }
-                 else
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(divwo,RT,RA,RB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(divwo_record,RT,RA,RB);
-                       }
-                  }
-               break;
-             }
-
+     switch(fld<26, 30>())
+        {
+          case 0x18: instruction = MAKE_INSN4(fxcpnpma, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x19: instruction = MAKE_INSN4(fxcsnpma, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x1A: instruction = MAKE_INSN4(fxcpnsma, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x1B: instruction = MAKE_INSN4(fxcsnsma, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x1C: instruction = MAKE_INSN4(fxcxma, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x1D: instruction = MAKE_INSN4(fxcxnpma, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x1E: instruction = MAKE_INSN4(fxcxnsma, FRT(), FRA(), FRB(), FRC()); break;
+          case 0x1F: instruction = MAKE_INSN4(fxcxnms, FRT(), FRA(), FRB(), FRC()); break;
           default:
              {
             // The default case is now used for handling illegal instructions 
             // (during development it was for those not yet implemented).
-               printf ("Error: XO-Form xoOpcode = %d not handled! \n",xoOpcode);
+               printf ("Error: A-Form xOpcode = %d (illegal instruction) \n", int(fld<26, 30>()));
                ROSE_ASSERT(false);
              }
         }
@@ -2884,232 +1029,28 @@
    }
 
 SgAsmPowerpcInstruction*
-PowerpcDisassembler::SingleInstructionDisassembler::decode_A_formInstruction()
+PowerpcDisassembler::SingleInstructionDisassembler::decode_A_formInstruction_3B()
    {
      SgAsmPowerpcInstruction* instruction = NULL;
 
-  // The primaryOpcode
-     uint8_t primaryOpcode = (insn >> 26) & 0x3F;
-
-  // Get the bits 6-10, next 5 bits
-     uint8_t frtOpcode  = (insn >> 21) & 0x1F;
-
-  // Get the bits 11-15, next 5 bits
-     uint8_t fraOpcode  = (insn >> 16) & 0x1F;
-
-  // Get the bits 16-20, next 5 bits
-     uint8_t frbOpcode  = (insn >> 11) & 0x1F;
-
-  // Get the bits 21-25, next 5 bits
-     uint8_t frcOpcode  = (insn >> 6) & 0x1F;
-
-  // Get the bits 26-30, next 5 bits
-     uint8_t xOpcode  = (insn >> 1) & 0x1F;
-
-  // Get bit 31, 1 bit as the record bit
-     uint8_t rcOpcode = (insn >> 0) & 0x1;
-
-#if DEBUG_OPCODES
-     printf ("A-Form instruction opcode = 0x%x frtOpcode = 0x%x fraOpcode = 0x%x frbOpcode = 0x%x frcOpcode = 0x%x xOpcode = 0x%x rcOpcode = 0x%x \n",insn,frtOpcode,fraOpcode,frbOpcode,frcOpcode,xOpcode,rcOpcode);
-#endif
-
-     SgAsmExpression* FRT = makeRegister(powerpc_regclass_gpr,frtOpcode);
-
-     switch(xOpcode)
+     switch(fld<26, 30>())
         {
-       // 18
-          case 0x12:
-             {
-               SgAsmExpression* FRA = makeRegister(powerpc_regclass_gpr,fraOpcode);
-               SgAsmExpression* FRB = makeRegister(powerpc_regclass_gpr,frbOpcode);
-               if (primaryOpcode == 0x3B /*59*/)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(fdiv,FRT,FRA,FRB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(fdiv_record,FRT,FRA,FRB);
-                       }
-                  }
-                 else
-                  {
-                    ROSE_ASSERT (primaryOpcode == 0x3F /*63*/);
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(fdivs,FRT,FRA,FRB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(fdivs_record,FRT,FRA,FRB);
-                       }
-                  }
-               break;
-             }
-
-       // 20
-          case 0x14:
-             {
-               SgAsmExpression* FRA = makeRegister(powerpc_regclass_gpr,fraOpcode);
-               SgAsmExpression* FRB = makeRegister(powerpc_regclass_gpr,frbOpcode);
-               if (primaryOpcode == 0x3B /*59*/)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(fsub,FRT,FRA,FRB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(fsub_record,FRT,FRA,FRB);
-                       }
-                  }
-                 else
-                  {
-                    ROSE_ASSERT (primaryOpcode == 0x3F /*63*/);
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(fsubs,FRT,FRA,FRB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(fsubs_record,FRT,FRA,FRB);
-                       }
-                  }
-               break;
-             }
-
-       // 21
-          case 0x15:
-             {
-               SgAsmExpression* FRA = makeRegister(powerpc_regclass_gpr,fraOpcode);
-               SgAsmExpression* FRB = makeRegister(powerpc_regclass_gpr,frbOpcode);
-               if (primaryOpcode == 0x3B /*59*/)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(fadd,FRT,FRA,FRB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(fadd_record,FRT,FRA,FRB);
-                       }
-                  }
-                 else
-                  {
-                    ROSE_ASSERT (primaryOpcode == 0x3F /*63*/);
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(fadds,FRT,FRA,FRB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(fadds_record,FRT,FRA,FRB);
-                       }
-                  }
-               break;
-             }
-
-       // 25
-          case 0x19:
-             {
-               SgAsmExpression* FRA = makeRegister(powerpc_regclass_gpr,fraOpcode);
-               SgAsmExpression* FRC = makeRegister(powerpc_regclass_gpr,frcOpcode);
-               if (primaryOpcode == 0x3B /*59*/)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(fmul,FRT,FRA,FRC);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(fmul_record,FRT,FRA,FRC);
-                       }
-                  }
-                 else
-                  {
-                    ROSE_ASSERT (primaryOpcode == 0x3F /*63*/);
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN3(fmuls,FRT,FRA,FRC);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN3(fmuls_record,FRT,FRA,FRC);
-                       }
-                  }
-               break;
-             }
-
-       // 28
-          case 0x1C:
-             {
-               SgAsmExpression* FRA = makeRegister(powerpc_regclass_gpr,fraOpcode);
-               SgAsmExpression* FRB = makeRegister(powerpc_regclass_gpr,frbOpcode);
-               SgAsmExpression* FRC = makeRegister(powerpc_regclass_gpr,frcOpcode);
-               if (primaryOpcode == 0x3B /*59*/)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN4(fmsub,FRT,FRA,FRC,FRB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN4(fmsub_record,FRT,FRA,FRC,FRB);
-                       }
-                  }
-                 else
-                  {
-                    ROSE_ASSERT (primaryOpcode == 0x3F /*63*/);
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN4(fmsubs,FRT,FRA,FRC,FRB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN4(fmsubs_record,FRT,FRA,FRC,FRB);
-                       }
-                  }
-               break;
-             }
-
-       // 29
-          case 0x1D:
-             {
-               SgAsmExpression* FRA = makeRegister(powerpc_regclass_gpr,fraOpcode);
-               SgAsmExpression* FRB = makeRegister(powerpc_regclass_gpr,frbOpcode);
-               SgAsmExpression* FRC = makeRegister(powerpc_regclass_gpr,frcOpcode);
-               if (primaryOpcode == 0x3B /*59*/)
-                  {
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN4(fmadd,FRT,FRA,FRC,FRB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN4(fmadd_record,FRT,FRA,FRC,FRB);
-                       }
-                  }
-                 else
-                  {
-                    ROSE_ASSERT (primaryOpcode == 0x3F /*63*/);
-                    if (rcOpcode == 0)
-                       {
-                         instruction = MAKE_INSN4(fmadds,FRT,FRA,FRC,FRB);
-                       }
-                      else
-                       {
-                         instruction = MAKE_INSN4(fmadds_record,FRT,FRA,FRC,FRB);
-                       }
-                  }
-               break;
-             }
-
+          case 0x12: instruction = MAKE_INSN3_RC(fdivs, FRT(), FRA(), FRB()); break;
+          case 0x14: instruction = MAKE_INSN3_RC(fsubs, FRT(), FRA(), FRB()); break;
+          case 0x15: instruction = MAKE_INSN3_RC(fadds, FRT(), FRA(), FRB()); break;
+          case 0x16: instruction = MAKE_INSN2_RC(fsqrts, FRT(), FRB()); break;
+          case 0x18: instruction = MAKE_INSN2_RC(fres, FRT(), FRB()); break;
+          case 0x19: instruction = MAKE_INSN3_RC(fmuls, FRT(), FRA(), FRC()); break;
+          case 0x1A: instruction = MAKE_INSN2_RC(frsqrtes, FRT(), FRB()); break;
+          case 0x1C: instruction = MAKE_INSN4_RC(fmsubs, FRT(), FRA(), FRC(), FRB()); break;
+          case 0x1D: instruction = MAKE_INSN4_RC(fmadds, FRT(), FRA(), FRC(), FRB()); break;
+          case 0x1E: instruction = MAKE_INSN4_RC(fnmsubs, FRT(), FRA(), FRC(), FRB()); break;
+          case 0x1F: instruction = MAKE_INSN4_RC(fnmadds, FRT(), FRA(), FRC(), FRB()); break;
           default:
              {
             // The default case is now used for handling illegal instructions 
             // (during development it was for those not yet implemented).
-               printf ("Error: A-Form primaryOpcode = %d (illegal instruction) \n",xOpcode);
+               printf ("Error: A-Form xOpcode = %d (illegal instruction) \n", int(fld<26, 30>()));
                ROSE_ASSERT(false);
              }
         }
@@ -3119,94 +1060,35 @@
    }
 
 SgAsmPowerpcInstruction*
-PowerpcDisassembler::SingleInstructionDisassembler::decode_M_formInstruction()
+PowerpcDisassembler::SingleInstructionDisassembler::decode_A_formInstruction_3F()
    {
      SgAsmPowerpcInstruction* instruction = NULL;
 
-  // The primaryOpcode
-     uint8_t primaryOpcode = (insn >> 26) & 0x3F;
-
-  // Get the bits 6-10, next 5 bits
-     uint8_t rsOpcode  = (insn >> 21) & 0x1F;
-
-  // Get the bits 11-15, next 5 bits
-     uint8_t raOpcode  = (insn >> 16) & 0x1F;
-
-  // Get the bits 16-20, next 5 bits
-     uint8_t rbOpcode  = (insn >> 11) & 0x1F;
-     uint8_t shOpcode  = rbOpcode;
-
-  // Get the bits 21-25, next 5 bits
-     uint8_t mbOpcode  = (insn >> 6) & 0x1F;
-
-  // Get the bits 26-30, next 5 bits
-     uint8_t meOpcode  = (insn >> 1) & 0x1F;
-
-  // Get bit 31, 1 bit as the record bit
-     uint8_t rcOpcode = (insn >> 0) & 0x1;
-
 #if DEBUG_OPCODES
-     printf ("M-Form instruction opcode = 0x%x rsOpcode = 0x%x raOpcode = 0x%x rbOpcode = 0x%x mbOpcode = 0x%x meOpcode = 0x%x rcOpcode = 0x%x \n",insn,rsOpcode,raOpcode,rbOpcode,mbOpcode,meOpcode,rcOpcode);
+     printf ("A-Form instruction opcode = 0x%x primaryOpcode = 0x%x frtOpcode = 0x%x fraOpcode = 0x%x frbOpcode = 0x%x frcOpcode = 0x%x xOpcode = 0x%x rcOpcode = 0x%x \n", insn, primaryOpcode, frtOpcode, fraOpcode, frbOpcode, frcOpcode, xOpcode, rcOpcode);
 #endif
 
-     SgAsmExpression* RA = makeRegister(powerpc_regclass_gpr,raOpcode);
-     SgAsmExpression* RS = makeRegister(powerpc_regclass_gpr,rsOpcode);
+  // FIX ME: Make the floating point registers use the powerpc_regclass_fpr instead of powerpc_regclass_gpr
 
-  // There should be a build function for these!
-     SgAsmExpression* SH = new SgAsmByteValueExpression(shOpcode);
-     SgAsmExpression* MB = new SgAsmByteValueExpression(mbOpcode);
-     SgAsmExpression* ME = new SgAsmByteValueExpression(meOpcode);
-
-     switch(primaryOpcode)
+     switch(fld<26, 30>())
         {
-       // 20
-          case 0x14:
-             {
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN5(rlwimi,RA,RS,SH,MB,ME);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN5(rlwimi_record,RA,RS,SH,MB,ME);
-                  }
-               break;
-             }
-
-       // 21
-          case 0x15:
-             {
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN5(rlwinm,RA,RS,SH,MB,ME);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN5(rlwinm_record,RA,RS,SH,MB,ME);
-                  }
-               break;
-             }
-
-       // 23
-          case 0x17:
-             {
-               if (rcOpcode == 0)
-                  {
-                    instruction = MAKE_INSN5(rlwnm,RA,RS,SH,MB,ME);
-                  }
-                 else
-                  {
-                    instruction = MAKE_INSN5(rlwnm_record,RA,RS,SH,MB,ME);
-                  }
-               break;
-             }
-
+          case 0x12: instruction = MAKE_INSN3_RC(fdiv, FRT(), FRA(), FRB()); break;
+          case 0x14: instruction = MAKE_INSN3_RC(fsub, FRT(), FRA(), FRB()); break;
+          case 0x15: instruction = MAKE_INSN3_RC(fadd, FRT(), FRA(), FRB()); break;
+          case 0x16: instruction = MAKE_INSN2_RC(fsqrt, FRT(), FRB()); break;
+          case 0x17: instruction = MAKE_INSN4_RC(fsel, FRT(), FRA(), FRC(), FRB()); break;
+          case 0x18: instruction = MAKE_INSN2_RC(fre, FRT(), FRB()); break;
+          case 0x19: instruction = MAKE_INSN3_RC(fmul, FRT(), FRA(), FRC()); break;
+          case 0x1A: instruction = MAKE_INSN2_RC(frsqrte, FRT(), FRB()); break;
+          case 0x1C: instruction = MAKE_INSN4_RC(fmsub, FRT(), FRA(), FRC(), FRB()); break;
+          case 0x1D: instruction = MAKE_INSN4_RC(fmadd, FRT(), FRA(), FRC(), FRB()); break;
+          case 0x1E: instruction = MAKE_INSN4_RC(fnmsub, FRT(), FRA(), FRC(), FRB()); break;
+          case 0x1F: instruction = MAKE_INSN4_RC(fnmadd, FRT(), FRA(), FRC(), FRB()); break;
           default:
              {
             // The default case is now used for handling illegal instructions 
             // (during development it was for those not yet implemented).
-            // There are only 3 legal M-form instructions, so everything else is an illegal instruction!
-               printf ("Error: M-Form primaryOpcode = %d (illegal instruction) \n",primaryOpcode);
+               printf ("Error: A-Form xOpcode = %d (illegal instruction) \n", int(fld<26, 30>()));
                ROSE_ASSERT(false);
              }
         }

Modified: branches/testonly/src/frontend/Disassemblers/x86Disassembler.C
===================================================================
--- branches/testonly/src/frontend/Disassemblers/x86Disassembler.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/Disassemblers/x86Disassembler.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -2,16 +2,32 @@
 #include <fcntl.h>
 #include <vector>
 #include "rose.h"
+#include "integerOps.h"
 
-// DQ (8/21/2008): No longer used (using new IR nodes now)
-// #include "freebsd_elf_combined.h"
-// #include "ExecGeneric.h"
-
 using namespace std;
 using namespace SageBuilderAsm;
+using namespace IntegerOps;
 
-// DQ (8/21/2008): No longer used (using new IR nodes now)
-// using namespace Exec;
+// These are macros to make them look like constants while they are really
+// function calls
+#define BYTET (SgAsmTypeByte::createType())
+#define WORDT (SgAsmTypeWord::createType())
+#define DWORDT (SgAsmTypeDoubleWord::createType())
+#define QWORDT (SgAsmTypeQuadWord::createType())
+#define DQWORDT (SgAsmTypeDoubleQuadWord::createType())
+#define FLOATT (SgAsmTypeSingleFloat::createType())
+#define DOUBLET (SgAsmTypeDoubleFloat::createType())
+#define LDOUBLET (SgAsmType80bitFloat::createType())
+#define V8BYTET (SgAsmTypeVector::createType(8, BYTET))
+#define V16BYTET (SgAsmTypeVector::createType(16, BYTET))
+#define V4WORDT (SgAsmTypeVector::createType(4, WORDT))
+#define V8WORDT (SgAsmTypeVector::createType(8, WORDT))
+#define V2DWORDT (SgAsmTypeVector::createType(2, DWORDT))
+#define V4DWORDT (SgAsmTypeVector::createType(4, DWORDT))
+#define V2FLOATT (SgAsmTypeVector::createType(2, FLOATT))
+#define V4FLOATT (SgAsmTypeVector::createType(4, FLOATT))
+#define V2QWORDT (SgAsmTypeVector::createType(2, QWORDT))
+#define V2DOUBLET (SgAsmTypeVector::createType(2, DOUBLET))
 
 namespace X86Disassembler {
 
@@ -61,44 +77,44 @@
       case rmLegacyByte: {
         ref = new SgAsmx86RegisterReferenceExpression(x86_regclass_gpr, fullRegisterNumber % 4);
         ref->set_position_in_register((fullRegisterNumber & 4) ? x86_regpos_high_byte : x86_regpos_low_byte);
-        ref->set_type(SgAsmTypeByte::createType());
+        ref->set_type(BYTET);
         break;
       }
       case rmRexByte: {
         ref = new SgAsmx86RegisterReferenceExpression(x86_regclass_gpr, fullRegisterNumber);
         ref->set_position_in_register(x86_regpos_low_byte);
-        ref->set_type(SgAsmTypeByte::createType());
+        ref->set_type(BYTET);
         break;
       }
       case rmWord: {
         ref = new SgAsmx86RegisterReferenceExpression(x86_regclass_gpr, fullRegisterNumber);
         ref->set_position_in_register(x86_regpos_word);
-        ref->set_type(SgAsmTypeWord::createType());
+        ref->set_type(WORDT);
         break;
       }
       case rmDWord: {
         ref = new SgAsmx86RegisterReferenceExpression(x86_regclass_gpr, fullRegisterNumber);
         ref->set_position_in_register(x86_regpos_dword);
-        ref->set_type(SgAsmTypeDoubleWord::createType());
+        ref->set_type(DWORDT);
         break;
       }
       case rmQWord: {
         ref = new SgAsmx86RegisterReferenceExpression(x86_regclass_gpr, fullRegisterNumber);
         ref->set_position_in_register(x86_regpos_qword);
-        ref->set_type(SgAsmTypeQuadWord::createType());
+        ref->set_type(QWORDT);
         break;
       }
       case rmSegment: {
         if (fullRegisterNumber >= 6) throw BadInstruction();
         ref = new SgAsmx86RegisterReferenceExpression(x86_regclass_segment, fullRegisterNumber);
         ref->set_position_in_register(x86_regpos_all);
-        ref->set_type(SgAsmTypeWord::createType());
+        ref->set_type(WORDT);
         break;
       }
       case rmST: {
         ref = new SgAsmx86RegisterReferenceExpression(x86_regclass_st, fullRegisterNumber);
         ref->set_position_in_register(x86_regpos_all);
-        ref->set_type(SgAsmType80bitFloat::createType());
+        ref->set_type(LDOUBLET);
         break;
       }
       case rmMM: {
@@ -372,7 +388,7 @@
         if (modeField == 0 && rmField == 5) { // Special case
           uint32_t offset;
           getDWord(offset);
-          addressExpr = makeAddrSizeValue((int64_t)(int32_t)offset);
+          addressExpr = makeAddrSizeValue(signExtend<32, 64>((uint64_t)offset));
           if (p.insnSize == x86_insnsize_64) {
             addressExpr = makeAdd(makeIP(), addressExpr);
           }
@@ -387,7 +403,7 @@
             SgAsmExpression* sibBase = NULL;
             if (sibBaseField == 5) {
               switch (modeField) {
-                case 0: {uint32_t offset; getDWord(offset); sibBase = makeAddrSizeValue((int64_t)(int32_t)offset); break;}
+                case 0: {uint32_t offset; getDWord(offset); sibBase = makeAddrSizeValue(signExtend<32, 64>((uint64_t)offset)); break;}
                 case 1: {sibBase = makeRegister((rexB ? 13 : 5), sizeToMode(p.insnSize)); defaultSeg = x86_segreg_ss; break;}
                 case 2: {sibBase = makeRegister((rexB ? 13 : 5), sizeToMode(p.insnSize)); defaultSeg = x86_segreg_ss; break;}
                 default: ROSE_ASSERT (false);
@@ -409,8 +425,8 @@
           }
           switch (modeField) {
             case 0: break; // No offset
-            case 1: {uint8_t offset; getByte(offset); addressExpr = makeAdd(addressExpr, makeAddrSizeValue((int64_t)(int8_t)offset)); break;}
-            case 2: {uint32_t offset; getDWord(offset); addressExpr = makeAdd(addressExpr, makeAddrSizeValue((int64_t)(int32_t)offset)); break;}
+            case 1: {uint8_t offset; getByte(offset); addressExpr = makeAdd(addressExpr, makeAddrSizeValue(signExtend<8, 64>((uint64_t)offset))); break;}
+            case 2: {uint32_t offset; getDWord(offset); addressExpr = makeAdd(addressExpr, makeAddrSizeValue(signExtend<32, 64>((uint64_t)offset))); break;}
             default: ROSE_ASSERT (false);
           }
         }
@@ -453,7 +469,7 @@
     }
 
     SgAsmExpression* getModrmForByte() {
-      return makeModrmNormal(rmLegacyByte, SgAsmTypeByte::createType());
+      return makeModrmNormal(rmLegacyByte, BYTET);
     }
 
     SgAsmExpression* getModrmForXword() {
@@ -461,7 +477,7 @@
     }
 
     SgAsmExpression* getModrmForWord() {
-      return makeModrmNormal(rmWord, SgAsmTypeWord::createType());
+      return makeModrmNormal(rmWord, WORDT);
     }
 
     SgAsmExpression* getModrmForFloat(SgAsmType* t) {
@@ -470,9 +486,6 @@
 
     SgAsmx86Instruction* makeNullaryInstruction(const string& mnemonic, X86InstructionKind kind) {
       SgAsmx86Instruction* newInsn = makeInstructionWithoutOperands(p.ip, mnemonic, kind, p.insnSize, effectiveOperandSize(), effectiveAddressSize(), lock);
-
-   // DQ (8/30/2008): IR node now uses a SgUnsignedCharList instead of a std::string.
-   // newInsn->set_raw_bytes(string(insn + positionInVector, insn + positionInVector + positionInInstruction));
       newInsn->set_raw_bytes(SgUnsignedCharList(insn + positionInVector, insn + positionInVector + positionInInstruction));
 
       SgAsmOperandList* operands = new SgAsmOperandList();
@@ -605,7 +618,7 @@
         case x86_insnsize_64: {
           uint32_t val;
           getDWord(val);
-          return makeQWordValue((int64_t)(int32_t)val);
+          return makeQWordValue(signExtend<32, 64>((uint64_t)val));
         }
         default: ROSE_ASSERT (false);
       }
@@ -624,37 +637,39 @@
       uint8_t val;
       getByte(val);
       switch (effectiveOperandSize()) {
-        case x86_insnsize_16: return makeWordValue((int16_t)(int8_t)val);
-        case x86_insnsize_32: return makeDWordValue((int32_t)(int8_t)val);
-        case x86_insnsize_64: return makeQWordValue((int64_t)(int8_t)val);
+        case x86_insnsize_16: return makeWordValue(signExtend<8, 16>((uint64_t)val));
+        case x86_insnsize_32: return makeDWordValue(signExtend<8, 32>((uint64_t)val));
+        case x86_insnsize_64: return makeQWordValue(signExtend<8, 64>((uint64_t)val));
         default: ROSE_ASSERT (false);
       }
     }
 
     SgAsmExpression* getImmJb() {
-      int8_t val;
-      getByte((uint8_t&)val);
+      uint8_t val;
+      getByte(val);
+      uint64_t target = p.ip + positionInInstruction + signExtend<8, 64>((uint64_t)val);
       if (knownSuccessorsReturn) {
-        knownSuccessorsReturn->insert(p.ip + positionInInstruction + (int64_t)(int8_t)val);
+        knownSuccessorsReturn->insert(target);
       }
-      return makeQWordValue(p.ip + positionInInstruction + (int64_t)(int8_t)val);
+      return makeQWordValue(target);
     }
 
     SgAsmExpression* getImmJz() {
-      int64_t val;
+      uint64_t val;
       if (effectiveOperandSize() == x86_insnsize_16) {
         uint16_t val2;
         getWord(val2);
-        val = (int64_t)(int16_t)val2;
+        val = signExtend<16, 64>((uint64_t)val2);
       } else {
         uint32_t val2;
         getDWord(val2);
-        val = (int64_t)(int32_t)val2;
+        val = signExtend<32, 64>((uint64_t)val2);
       }
+      uint64_t target = p.ip + positionInInstruction + val;
       if (knownSuccessorsReturn) {
-        knownSuccessorsReturn->insert(p.ip + positionInInstruction + val);
+        knownSuccessorsReturn->insert(target);
       }
-      return makeQWordValue(p.ip + positionInInstruction + val);
+      return makeQWordValue(target);
     }
 
     SgAsmExpression* getImmForAddr() {
@@ -682,65 +697,65 @@
     getByte(opcode);
     SgAsmx86Instruction* insn = 0;
     switch (opcode) {
-      case 0x00: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(add, add, modrm, reg); goto done;}
+      case 0x00: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(add, add, modrm, reg); goto done;}
       case 0x01: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(add, add, modrm, reg); goto done;}
-      case 0x02: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(add, add, reg, modrm); goto done;}
+      case 0x02: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(add, add, reg, modrm); goto done;}
       case 0x03: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(add, add, reg, modrm); goto done;}
       case 0x04: {SgAsmExpression* imm = getImmByteAsIv(); insn = MAKE_INSN2(add, add, makeRegister(0, rmLegacyByte), imm); goto done;}
       case 0x05: {SgAsmExpression* imm = getImmIzAsIv(); insn = MAKE_INSN2(add, add, makeRegisterEffective(0), imm); goto done;}
       case 0x06: {not64(); insn = MAKE_INSN1(push, push, makeRegister(0, rmSegment)); goto done;}
       case 0x07: {not64(); insn = MAKE_INSN1(pop, pop, makeRegister(0, rmSegment)); goto done;}
-      case 0x08: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(or, or, modrm, reg); goto done;}
+      case 0x08: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(or, or, modrm, reg); goto done;}
       case 0x09: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(or, or, modrm, reg); goto done;}
-      case 0x0A: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(or, or, reg, modrm); goto done;}
+      case 0x0A: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(or, or, reg, modrm); goto done;}
       case 0x0B: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(or, or, reg, modrm); goto done;}
       case 0x0C: {SgAsmExpression* imm = getImmByteAsIv(); insn = MAKE_INSN2(or, or, makeRegister(0, rmLegacyByte), imm); goto done;}
       case 0x0D: {SgAsmExpression* imm = getImmIzAsIv(); insn = MAKE_INSN2(or, or, makeRegisterEffective(0), imm); goto done;}
       case 0x0E: {not64(); insn = MAKE_INSN1(push, push, makeRegister(1, rmSegment)); goto done;}
       case 0x0F: {insn = decodeOpcode0F(); goto done;}
-      case 0x10: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(adc, adc, modrm, reg); goto done;}
+      case 0x10: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(adc, adc, modrm, reg); goto done;}
       case 0x11: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(adc, adc, modrm, reg); goto done;}
-      case 0x12: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(adc, adc, reg, modrm); goto done;}
+      case 0x12: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(adc, adc, reg, modrm); goto done;}
       case 0x13: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(adc, adc, reg, modrm); goto done;}
       case 0x14: {SgAsmExpression* imm = getImmByteAsIv(); insn = MAKE_INSN2(adc, adc, makeRegister(0, rmLegacyByte), imm); goto done;}
       case 0x15: {SgAsmExpression* imm = getImmIzAsIv(); insn = MAKE_INSN2(adc, adc, makeRegisterEffective(0), imm); goto done;}
       case 0x16: {not64(); insn = MAKE_INSN1(push, push, makeRegister(2, rmSegment)); goto done;}
       case 0x17: {not64(); insn = MAKE_INSN1(pop, pop, makeRegister(2, rmSegment)); goto done;}
-      case 0x18: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(sbb, sbb, modrm, reg); goto done;}
+      case 0x18: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(sbb, sbb, modrm, reg); goto done;}
       case 0x19: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(sbb, sbb, modrm, reg); goto done;}
-      case 0x1A: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(sbb, sbb, reg, modrm); goto done;}
+      case 0x1A: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(sbb, sbb, reg, modrm); goto done;}
       case 0x1B: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(sbb, sbb, reg, modrm); goto done;}
       case 0x1C: {SgAsmExpression* imm = getImmByteAsIv(); insn = MAKE_INSN2(sbb, sbb, makeRegister(0, rmLegacyByte), imm); goto done;}
       case 0x1D: {SgAsmExpression* imm = getImmIzAsIv(); insn = MAKE_INSN2(sbb, sbb, makeRegisterEffective(0), imm); goto done;}
       case 0x1E: {not64(); insn = MAKE_INSN1(push, push, makeRegister(3, rmSegment)); goto done;}
       case 0x1F: {not64(); insn = MAKE_INSN1(pop, pop, makeRegister(3, rmSegment)); goto done;}
-      case 0x20: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(and, and, modrm, reg); goto done;}
+      case 0x20: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(and, and, modrm, reg); goto done;}
       case 0x21: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(and, and, modrm, reg); goto done;}
-      case 0x22: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(and, and, reg, modrm); goto done;}
+      case 0x22: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(and, and, reg, modrm); goto done;}
       case 0x23: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(and, and, reg, modrm); goto done;}
       case 0x24: {SgAsmExpression* imm = getImmByteAsIv(); insn = MAKE_INSN2(and, and, makeRegister(0, rmLegacyByte), imm); goto done;}
       case 0x25: {SgAsmExpression* imm = getImmIzAsIv(); insn = MAKE_INSN2(and, and, makeRegisterEffective(0), imm); goto done;}
       case 0x26: {segOverride = x86_segreg_es; insn = disassemble(); goto done;}
       case 0x27: {not64(); insn = MAKE_INSN0(daa, daa); goto done;}
-      case 0x28: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(sub, sub, modrm, reg); goto done;}
+      case 0x28: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(sub, sub, modrm, reg); goto done;}
       case 0x29: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(sub, sub, modrm, reg); goto done;}
-      case 0x2A: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(sub, sub, reg, modrm); goto done;}
+      case 0x2A: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(sub, sub, reg, modrm); goto done;}
       case 0x2B: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(sub, sub, reg, modrm); goto done;}
       case 0x2C: {SgAsmExpression* imm = getImmByteAsIv(); insn = MAKE_INSN2(sub, sub, makeRegister(0, rmLegacyByte), imm); goto done;}
       case 0x2D: {SgAsmExpression* imm = getImmIzAsIv(); insn = MAKE_INSN2(sub, sub, makeRegisterEffective(0), imm); goto done;}
       case 0x2E: {segOverride = x86_segreg_cs; branchPrediction = x86_branch_prediction_not_taken; insn = disassemble(); goto done;}
       case 0x2F: {not64(); insn = MAKE_INSN0(das, das); goto done;}
-      case 0x30: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(xor, xor, modrm, reg); goto done;}
+      case 0x30: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(xor, xor, modrm, reg); goto done;}
       case 0x31: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(xor, xor, modrm, reg); goto done;}
-      case 0x32: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(xor, xor, reg, modrm); goto done;}
+      case 0x32: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(xor, xor, reg, modrm); goto done;}
       case 0x33: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(xor, xor, reg, modrm); goto done;}
       case 0x34: {SgAsmExpression* imm = getImmByteAsIv(); insn = MAKE_INSN2(xor, xor, makeRegister(0, rmLegacyByte), imm); goto done;}
       case 0x35: {SgAsmExpression* imm = getImmIzAsIv(); insn = MAKE_INSN2(xor, xor, makeRegisterEffective(0), imm); goto done;}
       case 0x36: {segOverride = x86_segreg_ss; insn = disassemble(); goto done;}
       case 0x37: {not64(); insn = MAKE_INSN0(aaa, aaa); goto done;}
-      case 0x38: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(cmp, cmp, modrm, reg); goto done;}
+      case 0x38: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(cmp, cmp, modrm, reg); goto done;}
       case 0x39: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(cmp, cmp, modrm, reg); goto done;}
-      case 0x3A: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(cmp, cmp, reg, modrm); goto done;}
+      case 0x3A: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(cmp, cmp, reg, modrm); goto done;}
       case 0x3B: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(cmp, cmp, reg, modrm); goto done;}
       case 0x3C: {SgAsmExpression* imm = getImmByteAsIv(); insn = MAKE_INSN2(cmp, cmp, makeRegister(0, rmLegacyByte), imm); goto done;}
       case 0x3D: {SgAsmExpression* imm = getImmIzAsIv(); insn = MAKE_INSN2(cmp, cmp, makeRegisterEffective(0), imm); goto done;}
@@ -781,7 +796,7 @@
       case 0x60: {not64(); if (effectiveOperandSize() == x86_insnsize_32) insn = MAKE_INSN0(pushad, pushad); else insn = MAKE_INSN0(pusha, pusha); goto done;}
       case 0x61: {not64(); if (effectiveOperandSize() == x86_insnsize_32) insn = MAKE_INSN0(popad, popad); else insn = MAKE_INSN0(popa, popa); goto done;}
       case 0x62: {not64(); getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); requireMemory(); insn = MAKE_INSN2(bound, bound, reg, modrm); goto done;}
-      case 0x63: {if (longMode()) {getModRegRM(effectiveOperandMode(), rmDWord, SgAsmTypeDoubleWord::createType()); insn = MAKE_INSN2(movsxd, movsxd, reg, modrm); goto done;} else {getModRegRM(rmWord, rmWord, SgAsmTypeWord::createType()); insn = MAKE_INSN2(arpl, arpl, modrm, reg); goto done;}}
+      case 0x63: {if (longMode()) {getModRegRM(effectiveOperandMode(), rmDWord, DWORDT); insn = MAKE_INSN2(movsxd, movsxd, reg, modrm); goto done;} else {getModRegRM(rmWord, rmWord, WORDT); insn = MAKE_INSN2(arpl, arpl, modrm, reg); goto done;}}
       case 0x64: {segOverride = x86_segreg_fs; insn = disassemble(); goto done;}
       case 0x65: {segOverride = x86_segreg_gs; insn = disassemble(); goto done;}
       case 0x66: {operandSizeOverride = true; insn = disassemble(); goto done;}
@@ -840,37 +855,37 @@
           default: ROSE_ASSERT (false);
         }
       }
-      case 0x70: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jo , jo , /* prediction, */ imm); goto done;}
-      case 0x71: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jno, jno, /* prediction, */ imm); goto done;}
-      case 0x72: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jb , jb , /* prediction, */ imm); goto done;}
-      case 0x73: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jae, jae, /* prediction, */ imm); goto done;}
-      case 0x74: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(je , je , /* prediction, */ imm); goto done;}
-      case 0x75: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jne, jne, /* prediction, */ imm); goto done;}
-      case 0x76: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jbe, jbe, /* prediction, */ imm); goto done;}
-      case 0x77: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(ja , ja , /* prediction, */ imm); goto done;}
-      case 0x78: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(js , js , /* prediction, */ imm); goto done;}
-      case 0x79: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jns, jns, /* prediction, */ imm); goto done;}
-      case 0x7A: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jpe, jpe, /* prediction, */ imm); goto done;}
-      case 0x7B: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jpo, jpo, /* prediction, */ imm); goto done;}
-      case 0x7C: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jl , jl , /* prediction, */ imm); goto done;}
-      case 0x7D: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jge, jge, /* prediction, */ imm); goto done;}
-      case 0x7E: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jle, jle, /* prediction, */ imm); goto done;}
-      case 0x7F: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jg , jg , /* prediction, */ imm); goto done;}
-      case 0x80: {getModRegRM(rmReturnNull, rmLegacyByte, SgAsmTypeByte::createType()); SgAsmExpression* imm = getImmByte(); insn = decodeGroup1(imm); goto done;}
+      case 0x70: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jo , jo , imm); goto done;}
+      case 0x71: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jno, jno, imm); goto done;}
+      case 0x72: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jb , jb , imm); goto done;}
+      case 0x73: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jae, jae, imm); goto done;}
+      case 0x74: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(je , je , imm); goto done;}
+      case 0x75: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jne, jne, imm); goto done;}
+      case 0x76: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jbe, jbe, imm); goto done;}
+      case 0x77: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(ja , ja , imm); goto done;}
+      case 0x78: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(js , js , imm); goto done;}
+      case 0x79: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jns, jns, imm); goto done;}
+      case 0x7A: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jpe, jpe, imm); goto done;}
+      case 0x7B: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jpo, jpo, imm); goto done;}
+      case 0x7C: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jl , jl , imm); goto done;}
+      case 0x7D: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jge, jge, imm); goto done;}
+      case 0x7E: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jle, jle, imm); goto done;}
+      case 0x7F: {SgAsmExpression* imm = getImmJb(); branchPredictionEnabled = true; insn = MAKE_INSN1(jg , jg , imm); goto done;}
+      case 0x80: {getModRegRM(rmReturnNull, rmLegacyByte, BYTET); SgAsmExpression* imm = getImmByte(); insn = decodeGroup1(imm); goto done;}
       case 0x81: {getModRegRM(rmReturnNull, effectiveOperandMode(), effectiveOperandType()); SgAsmExpression* imm = getImmIzAsIv(); insn = decodeGroup1(imm); goto done;}
-      case 0x82: {not64(); getModRegRM(rmReturnNull, rmLegacyByte, SgAsmTypeByte::createType()); SgAsmExpression* imm = getImmByte(); insn = decodeGroup1(imm); goto done;}
+      case 0x82: {not64(); getModRegRM(rmReturnNull, rmLegacyByte, BYTET); SgAsmExpression* imm = getImmByte(); insn = decodeGroup1(imm); goto done;}
       case 0x83: {getModRegRM(rmReturnNull, effectiveOperandMode(), effectiveOperandType()); SgAsmExpression* imm = getImmByteAsIv(); insn = decodeGroup1(imm); goto done;}
-      case 0x84: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(test, test, modrm, reg); goto done;}
+      case 0x84: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(test, test, modrm, reg); goto done;}
       case 0x85: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(test, test, modrm, reg); goto done;}
-      case 0x86: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(xchg, xchg, modrm, reg); goto done;}
+      case 0x86: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(xchg, xchg, modrm, reg); goto done;}
       case 0x87: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(xchg, xchg, modrm, reg); goto done;}
-      case 0x88: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(mov, mov, modrm, reg); goto done;}
+      case 0x88: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(mov, mov, modrm, reg); goto done;}
       case 0x89: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(mov, mov, modrm, reg); goto done;}
-      case 0x8A: {getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); insn = MAKE_INSN2(mov, mov, reg, modrm); goto done;}
+      case 0x8A: {getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); insn = MAKE_INSN2(mov, mov, reg, modrm); goto done;}
       case 0x8B: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); insn = MAKE_INSN2(mov, mov, reg, modrm); goto done;}
-      case 0x8C: {getModRegRM(rmSegment, effectiveOperandMode(), SgAsmTypeWord::createType()); insn = MAKE_INSN2(mov, mov, modrm, reg); goto done;}
+      case 0x8C: {getModRegRM(rmSegment, effectiveOperandMode(), WORDT); insn = MAKE_INSN2(mov, mov, modrm, reg); goto done;}
       case 0x8D: {getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); requireMemory(); insn = MAKE_INSN2(lea, lea, reg, modrm); goto done;}
-      case 0x8E: {getModRegRM(rmSegment, rmWord, SgAsmTypeWord::createType()); insn = MAKE_INSN2(mov, mov, reg, modrm); goto done;}
+      case 0x8E: {getModRegRM(rmSegment, rmWord, WORDT); insn = MAKE_INSN2(mov, mov, reg, modrm); goto done;}
       case 0x8F: {getModRegRM(rmReturnNull, effectiveOperandMode(), effectiveOperandType()); insn = decodeGroup1a(); goto done;}
       case 0x90: {
         if (rexB) {
@@ -927,9 +942,9 @@
       }
       case 0x9E: {insn = MAKE_INSN0(sahf, sahf); goto done;}
       case 0x9F: {insn = MAKE_INSN0(lahf, lahf); goto done;}
-      case 0xA0: {SgAsmExpression* addr = getImmForAddr(); insn = MAKE_INSN2(mov, mov, makeRegister(0, rmLegacyByte), makeMemoryReference(addr, currentDataSegment(), SgAsmTypeByte::createType())); goto done;}
+      case 0xA0: {SgAsmExpression* addr = getImmForAddr(); insn = MAKE_INSN2(mov, mov, makeRegister(0, rmLegacyByte), makeMemoryReference(addr, currentDataSegment(), BYTET)); goto done;}
       case 0xA1: {SgAsmExpression* addr = getImmForAddr(); insn = MAKE_INSN2(mov, mov, makeRegisterEffective(0), makeMemoryReference(addr, currentDataSegment(), effectiveOperandType())); goto done;}
-      case 0xA2: {SgAsmExpression* addr = getImmForAddr(); insn = MAKE_INSN2(mov, mov, makeMemoryReference(addr, currentDataSegment(), SgAsmTypeByte::createType()), makeRegister(0, rmLegacyByte)); goto done;}
+      case 0xA2: {SgAsmExpression* addr = getImmForAddr(); insn = MAKE_INSN2(mov, mov, makeMemoryReference(addr, currentDataSegment(), BYTET), makeRegister(0, rmLegacyByte)); goto done;}
       case 0xA3: {SgAsmExpression* addr = getImmForAddr(); insn = MAKE_INSN2(mov, mov, makeMemoryReference(addr, currentDataSegment(), effectiveOperandType()), makeRegisterEffective(0)); goto done;}
       case 0xA4: {
         switch (repeatPrefix) {
@@ -1107,13 +1122,13 @@
       case 0xBD: {SgAsmExpression* imm = getImmIv(); insn = MAKE_INSN2(mov, mov, makeRegisterEffective(rexB, 5), imm); goto done;}
       case 0xBE: {SgAsmExpression* imm = getImmIv(); insn = MAKE_INSN2(mov, mov, makeRegisterEffective(rexB, 6), imm); goto done;}
       case 0xBF: {SgAsmExpression* imm = getImmIv(); insn = MAKE_INSN2(mov, mov, makeRegisterEffective(rexB, 7), imm); goto done;}
-      case 0xC0: {getModRegRM(rmReturnNull, rmLegacyByte, SgAsmTypeByte::createType()); SgAsmExpression* imm = getImmByte(); insn = decodeGroup2(imm); goto done;}
+      case 0xC0: {getModRegRM(rmReturnNull, rmLegacyByte, BYTET); SgAsmExpression* imm = getImmByte(); insn = decodeGroup2(imm); goto done;}
       case 0xC1: {getModRegRM(rmReturnNull, effectiveOperandMode(), effectiveOperandType()); SgAsmExpression* imm = getImmByteAsIv(); insn = decodeGroup2(imm); goto done;}
       case 0xC2: {isUnconditionalJump = true; SgAsmExpression* imm = getImmWord(); insn = MAKE_INSN1(ret, ret, imm); goto done;}
       case 0xC3: {isUnconditionalJump = true; insn = MAKE_INSN0(ret, ret); goto done;}
       case 0xC4: {not64(); getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); requireMemory(); insn = MAKE_INSN2(les, les, reg, modrm); goto done;}
       case 0xC5: {not64(); getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); requireMemory(); insn = MAKE_INSN2(lds, lds, reg, modrm); goto done;}
-      case 0xC6: {getModRegRM(rmReturnNull, rmLegacyByte, SgAsmTypeByte::createType()); SgAsmExpression* imm = getImmByte(); insn = decodeGroup11(imm); goto done;}
+      case 0xC6: {getModRegRM(rmReturnNull, rmLegacyByte, BYTET); SgAsmExpression* imm = getImmByte(); insn = decodeGroup11(imm); goto done;}
       case 0xC7: {getModRegRM(rmReturnNull, effectiveOperandMode(), effectiveOperandType()); SgAsmExpression* imm = getImmIzAsIv(); insn = decodeGroup11(imm); goto done;}
       case 0xC8: {SgAsmExpression* immw; {SgAsmExpression* imm = getImmWord(); immw = imm;} SgAsmExpression* imm = getImmByte(); insn = MAKE_INSN2(enter, enter, immw, imm); goto done;}
       case 0xC9: {insn = MAKE_INSN0(leave, leave); goto done;}
@@ -1123,9 +1138,9 @@
       case 0xCD: {SgAsmExpression* imm = getImmByte(); insn = MAKE_INSN1(int, int, imm); goto done;}
       case 0xCE: {not64(); insn = MAKE_INSN0(into, into); goto done;}
       case 0xCF: {isUnconditionalJump = true; insn = MAKE_INSN0(iret, iret); goto done;}
-      case 0xD0: {getModRegRM(rmReturnNull, rmLegacyByte, SgAsmTypeByte::createType()); insn = decodeGroup2(makeByteValue(1)); goto done;}
+      case 0xD0: {getModRegRM(rmReturnNull, rmLegacyByte, BYTET); insn = decodeGroup2(makeByteValue(1)); goto done;}
       case 0xD1: {getModRegRM(rmReturnNull, effectiveOperandMode(), effectiveOperandType()); insn = decodeGroup2(makeByteValue(1)); goto done;}
-      case 0xD2: {getModRegRM(rmReturnNull, rmLegacyByte, SgAsmTypeByte::createType()); insn = decodeGroup2(makeRegister(1, rmLegacyByte)); goto done;}
+      case 0xD2: {getModRegRM(rmReturnNull, rmLegacyByte, BYTET); insn = decodeGroup2(makeRegister(1, rmLegacyByte)); goto done;}
       case 0xD3: {getModRegRM(rmReturnNull, effectiveOperandMode(), effectiveOperandType()); insn = decodeGroup2(makeRegister(1, rmLegacyByte)); goto done;}
       case 0xD4: {not64(); SgAsmExpression* imm = getImmByte(); insn = MAKE_INSN1(aam, aam, imm); goto done;}
       case 0xD5: {not64(); SgAsmExpression* imm = getImmByte(); insn = MAKE_INSN1(aad, aad, imm); goto done;}
@@ -1139,16 +1154,16 @@
       case 0xDD: {insn = decodeX87InstructionDD(); goto done;}
       case 0xDE: {insn = decodeX87InstructionDE(); goto done;}
       case 0xDF: {insn = decodeX87InstructionDF(); goto done;}
-      case 0xE0: {SgAsmExpression* imm = getImmJb(); insn = MAKE_INSN1(loopnz, loopnz, /* prediction, */ imm); goto done;}
-      case 0xE1: {SgAsmExpression* imm = getImmJb(); insn = MAKE_INSN1(loopz, loopz, /* prediction, */ imm); goto done;}
-      case 0xE2: {SgAsmExpression* imm = getImmJb(); insn = MAKE_INSN1(loop, loop, /* prediction, */ imm); goto done;}
+      case 0xE0: {SgAsmExpression* imm = getImmJb(); insn = MAKE_INSN1(loopnz, loopnz, imm); goto done;}
+      case 0xE1: {SgAsmExpression* imm = getImmJb(); insn = MAKE_INSN1(loopz, loopz, imm); goto done;}
+      case 0xE2: {SgAsmExpression* imm = getImmJb(); insn = MAKE_INSN1(loop, loop, imm); goto done;}
       case 0xE3: {
         SgAsmExpression* imm = getImmJb();
         branchPredictionEnabled = true;
         switch (effectiveOperandSize()) {
-          case x86_insnsize_16: insn = MAKE_INSN1(jcxz, jcxz, /* prediction, */ imm); goto done;
-          case x86_insnsize_32: insn = MAKE_INSN1(jecxz, jecxz, /* prediction, */ imm); goto done;
-          case x86_insnsize_64: insn = MAKE_INSN1(jrcxz, jrcxz, /* prediction, */ imm); goto done;
+          case x86_insnsize_16: insn = MAKE_INSN1(jcxz, jcxz, imm); goto done;
+          case x86_insnsize_32: insn = MAKE_INSN1(jecxz, jecxz, imm); goto done;
+          case x86_insnsize_64: insn = MAKE_INSN1(jrcxz, jrcxz, imm); goto done;
           default: ROSE_ASSERT (false);
         }
       }
@@ -1170,7 +1185,7 @@
       case 0xF3: {repeatPrefix = rpRepe; insn = disassemble(); goto done;}
       case 0xF4: {insn = MAKE_INSN0(hlt, hlt); isUnconditionalJump = true; goto done;}
       case 0xF5: {insn = MAKE_INSN0(cmc, cmc); goto done;}
-      case 0xF6: {getModRegRM(rmReturnNull, rmLegacyByte, SgAsmTypeByte::createType()); SgAsmExpression* immMaybe = NULL; if (regField <= 1) {SgAsmExpression* imm = getImmByteAsIv(); immMaybe = imm;}; insn = decodeGroup3(immMaybe); goto done;}
+      case 0xF6: {getModRegRM(rmReturnNull, rmLegacyByte, BYTET); SgAsmExpression* immMaybe = NULL; if (regField <= 1) {SgAsmExpression* imm = getImmByteAsIv(); immMaybe = imm;}; insn = decodeGroup3(immMaybe); goto done;}
       case 0xF7: {getModRegRM(rmReturnNull, effectiveOperandMode(), effectiveOperandType()); SgAsmExpression* immMaybe = NULL; if (regField <= 1) {SgAsmExpression* imm = getImmIzAsIv(); immMaybe = imm;}; insn = decodeGroup3(immMaybe); goto done;}
       case 0xF8: {insn = MAKE_INSN0(clc, clc); goto done;}
       case 0xF9: {insn = MAKE_INSN0(stc, stc); goto done;}
@@ -1178,7 +1193,7 @@
       case 0xFB: {insn = MAKE_INSN0(sti, sti); goto done;}
       case 0xFC: {insn = MAKE_INSN0(cld, cld); goto done;}
       case 0xFD: {insn = MAKE_INSN0(std, std); goto done;}
-      case 0xFE: {getModRegRM(rmReturnNull, rmLegacyByte, SgAsmTypeByte::createType()); insn = decodeGroup4(); goto done;}
+      case 0xFE: {getModRegRM(rmReturnNull, rmLegacyByte, BYTET); insn = decodeGroup4(); goto done;}
       case 0xFF: {
         getModRegRM(rmReturnNull, rmReturnNull, NULL);
         if (regField >= 2 && regField <= 6) {sizeMustBe64Bit = true;}
@@ -1196,9 +1211,9 @@
   }
 
   SgAsmx86Instruction* SingleInstructionDisassembler::decodeX87InstructionD8() {
-    getModRegRM(rmReturnNull, rmST, SgAsmTypeSingleFloat::createType());
+    getModRegRM(rmReturnNull, rmST, FLOATT);
     if (isSgAsmMemoryReferenceExpression(modrm)) {
-      isSgAsmMemoryReferenceExpression(modrm)->set_type(SgAsmTypeSingleFloat::createType());
+      isSgAsmMemoryReferenceExpression(modrm)->set_type(FLOATT);
     }
     if (modregrmByte < 0xC0) { // Using memory
       switch (regField) {
@@ -1233,14 +1248,14 @@
       SgAsmMemoryReferenceExpression* mr = isSgAsmMemoryReferenceExpression(modrm);
       ROSE_ASSERT (mr);
       switch (regField) {
-        case 0: mr->set_type(SgAsmTypeSingleFloat::createType()); return MAKE_INSN1(fld, fld, modrm);
+        case 0: mr->set_type(FLOATT); return MAKE_INSN1(fld, fld, modrm);
         case 1: throw BadInstruction();
-        case 2: mr->set_type(SgAsmTypeSingleFloat::createType()); return MAKE_INSN1(fst, fst, modrm);
-        case 3: mr->set_type(SgAsmTypeSingleFloat::createType()); return MAKE_INSN1(fstp, fstp, modrm);
-        case 4: mr->set_type(SgAsmTypeByte::createType()); return MAKE_INSN1(fldenv, fldenv, modrm);
-        case 5: mr->set_type(SgAsmTypeWord::createType()); return MAKE_INSN1(fldcw, fldcw, modrm);
-        case 6: mr->set_type(SgAsmTypeByte::createType()); return MAKE_INSN1(fnstenv, fnstenv, modrm);
-        case 7: mr->set_type(SgAsmTypeWord::createType()); return MAKE_INSN1(fnstcw, fnstcw, modrm);
+        case 2: mr->set_type(FLOATT); return MAKE_INSN1(fst, fst, modrm);
+        case 3: mr->set_type(FLOATT); return MAKE_INSN1(fstp, fstp, modrm);
+        case 4: mr->set_type(BYTET); return MAKE_INSN1(fldenv, fldenv, modrm);
+        case 5: mr->set_type(WORDT); return MAKE_INSN1(fldcw, fldcw, modrm);
+        case 6: mr->set_type(BYTET); return MAKE_INSN1(fnstenv, fnstenv, modrm);
+        case 7: mr->set_type(WORDT); return MAKE_INSN1(fnstcw, fnstcw, modrm);
         default: ROSE_ASSERT (false);
       }
     } else if (regField == 0 || regField == 1) { // FLD and FXCH on registers
@@ -1286,7 +1301,7 @@
   }
 
   SgAsmx86Instruction* SingleInstructionDisassembler::decodeX87InstructionDA() {
-    getModRegRM(rmReturnNull, rmReturnNull, SgAsmTypeDoubleWord::createType());
+    getModRegRM(rmReturnNull, rmReturnNull, DWORDT);
     if (modeField < 3) {
       switch (regField) {
         case 0: return MAKE_INSN1(fiadd, fiadd, modrm);
@@ -1322,9 +1337,9 @@
       SgAsmMemoryReferenceExpression* mr = isSgAsmMemoryReferenceExpression(modrm);
       ROSE_ASSERT (mr);
       if (regField <= 3) {
-        mr->set_type(SgAsmTypeDoubleWord::createType());
+        mr->set_type(DWORDT);
       } else {
-        mr->set_type(SgAsmType80bitFloat::createType());
+        mr->set_type(LDOUBLET);
       }
       switch (regField) {
         case 0: return MAKE_INSN1(fild, fild, modrm);
@@ -1358,7 +1373,7 @@
   }
 
   SgAsmx86Instruction* SingleInstructionDisassembler::decodeX87InstructionDC() {
-    getModRegRM(rmReturnNull, rmST, SgAsmTypeDoubleFloat::createType());
+    getModRegRM(rmReturnNull, rmST, DOUBLET);
     if (modeField < 3) { // Using memory
       switch (regField & 7) {
         case 0: return MAKE_INSN1(fadd, fadd, modrm);
@@ -1392,14 +1407,14 @@
       SgAsmMemoryReferenceExpression* mr = isSgAsmMemoryReferenceExpression(modrm);
       ROSE_ASSERT (mr);
       switch (regField) {
-        case 0: mr->set_type(SgAsmTypeDoubleFloat::createType()); return MAKE_INSN1(fld, fld, modrm);
-        case 1: mr->set_type(SgAsmTypeQuadWord::createType()); return MAKE_INSN1(fisttp, fisttp, modrm);
-        case 2: mr->set_type(SgAsmTypeDoubleFloat::createType()); return MAKE_INSN1(fst, fst, modrm);
-        case 3: mr->set_type(SgAsmTypeDoubleFloat::createType()); return MAKE_INSN1(fstp, fstp, modrm);
-        case 4: mr->set_type(SgAsmTypeByte::createType()); return MAKE_INSN1(frstor, frstor, modrm);
+        case 0: mr->set_type(DOUBLET); return MAKE_INSN1(fld, fld, modrm);
+        case 1: mr->set_type(QWORDT); return MAKE_INSN1(fisttp, fisttp, modrm);
+        case 2: mr->set_type(DOUBLET); return MAKE_INSN1(fst, fst, modrm);
+        case 3: mr->set_type(DOUBLET); return MAKE_INSN1(fstp, fstp, modrm);
+        case 4: mr->set_type(BYTET); return MAKE_INSN1(frstor, frstor, modrm);
         case 5: throw BadInstruction();
-        case 6: mr->set_type(SgAsmTypeByte::createType()); return MAKE_INSN1(fnsave, fnsave, modrm);
-        case 7: mr->set_type(SgAsmTypeWord::createType()); return MAKE_INSN1(fnstsw, fnstsw, modrm);
+        case 6: mr->set_type(BYTET); return MAKE_INSN1(fnsave, fnsave, modrm);
+        case 7: mr->set_type(WORDT); return MAKE_INSN1(fnstsw, fnstsw, modrm);
         default: ROSE_ASSERT (false);
       }
     } else { // Register forms
@@ -1418,7 +1433,7 @@
   }
 
   SgAsmx86Instruction* SingleInstructionDisassembler::decodeX87InstructionDE() {
-    getModRegRM(rmReturnNull, rmST, SgAsmTypeWord::createType());
+    getModRegRM(rmReturnNull, rmST, WORDT);
     if (modeField < 3) { // Using memory
       switch (regField & 7) {
         case 0: return MAKE_INSN1(fiadd, fiadd, modrm);
@@ -1457,14 +1472,14 @@
       SgAsmMemoryReferenceExpression* mr = isSgAsmMemoryReferenceExpression(modrm);
       ROSE_ASSERT (mr);
       switch (regField) {
-        case 0: mr->set_type(SgAsmTypeWord::createType()); return MAKE_INSN1(fild, fild, modrm);
-        case 1: mr->set_type(SgAsmTypeWord::createType()); return MAKE_INSN1(fisttp, fisttp, modrm);
-        case 2: mr->set_type(SgAsmTypeWord::createType()); return MAKE_INSN1(fist, fist, modrm);
-        case 3: mr->set_type(SgAsmTypeWord::createType()); return MAKE_INSN1(fistp, fistp, modrm);
-        case 4: mr->set_type(SgAsmTypeByte::createType()); return MAKE_INSN1(fbld, fbld, modrm);
-        case 5: mr->set_type(SgAsmTypeQuadWord::createType()); return MAKE_INSN1(fild, fild, modrm);
-        case 6: mr->set_type(SgAsmTypeByte::createType()); return MAKE_INSN1(fbstp, fbstp, modrm);
-        case 7: mr->set_type(SgAsmTypeQuadWord::createType()); return MAKE_INSN1(fistp, fistp, modrm);
+        case 0: mr->set_type(WORDT); return MAKE_INSN1(fild, fild, modrm);
+        case 1: mr->set_type(WORDT); return MAKE_INSN1(fisttp, fisttp, modrm);
+        case 2: mr->set_type(WORDT); return MAKE_INSN1(fist, fist, modrm);
+        case 3: mr->set_type(WORDT); return MAKE_INSN1(fistp, fistp, modrm);
+        case 4: mr->set_type(BYTET); return MAKE_INSN1(fbld, fbld, modrm);
+        case 5: mr->set_type(QWORDT); return MAKE_INSN1(fild, fild, modrm);
+        case 6: mr->set_type(BYTET); return MAKE_INSN1(fbstp, fbstp, modrm);
+        case 7: mr->set_type(QWORDT); return MAKE_INSN1(fistp, fistp, modrm);
         default: ROSE_ASSERT (false);
       }
     } else {
@@ -1493,10 +1508,10 @@
     uint8_t opcode;
     getByte(opcode);
     switch (opcode) {
-      case 0x00: {getModRegRM(rmReturnNull, rmWord, SgAsmTypeWord::createType()); return decodeGroup6();}
+      case 0x00: {getModRegRM(rmReturnNull, rmWord, WORDT); return decodeGroup6();}
       case 0x01: return decodeGroup7();
-      case 0x02: {getModRegRM(rmWord, rmWord, SgAsmTypeWord::createType()); return MAKE_INSN2(lar, lar, reg, modrm);}
-      case 0x03: {getModRegRM(rmWord, rmWord, SgAsmTypeWord::createType()); return MAKE_INSN2(lsl, lsl, reg, modrm);}
+      case 0x02: {getModRegRM(rmWord, rmWord, WORDT); return MAKE_INSN2(lar, lar, reg, modrm);}
+      case 0x03: {getModRegRM(rmWord, rmWord, WORDT); return MAKE_INSN2(lsl, lsl, reg, modrm);}
       case 0x04: throw BadInstruction();
       case 0x05: return MAKE_INSN0(syscall, syscall);
       case 0x06: return MAKE_INSN0(clts, clts);
@@ -1515,30 +1530,30 @@
         if (thirdOpcodeByte < 0x80) { // Conversions
           switch (thirdOpcodeByte) {
             case 0x0C: {
-              fillInModRM(rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); 
-              reg = makeModrmRegister(rmMM, SgAsmTypeVector::createType(2, SgAsmTypeSingleFloat::createType()));
+              fillInModRM(rmMM, V4WORDT); 
+              reg = makeModrmRegister(rmMM, V2FLOATT);
               return MAKE_INSN2(pi2fw, pi2fw, reg, modrm);
             }
             case 0x0D: {
-              fillInModRM(rmMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType())); 
-              reg = makeModrmRegister(rmMM, SgAsmTypeVector::createType(2, SgAsmTypeSingleFloat::createType()));
+              fillInModRM(rmMM, V2DWORDT); 
+              reg = makeModrmRegister(rmMM, V2FLOATT);
               return MAKE_INSN2(pi2fd, pi2fd, reg, modrm);
             }
             case 0x1C: {
-              fillInModRM(rmMM, SgAsmTypeVector::createType(2, SgAsmTypeSingleFloat::createType())); 
-              reg = makeModrmRegister(rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType()));
+              fillInModRM(rmMM, V2FLOATT); 
+              reg = makeModrmRegister(rmMM, V4WORDT);
               return MAKE_INSN2(pf2iw, pf2iw, reg, modrm);
             }
             case 0x1D: {
-              fillInModRM(rmMM, SgAsmTypeVector::createType(2, SgAsmTypeSingleFloat::createType())); 
-              reg = makeModrmRegister(rmMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType()));
+              fillInModRM(rmMM, V2FLOATT); 
+              reg = makeModrmRegister(rmMM, V2DWORDT);
               return MAKE_INSN2(pf2id, pf2id, reg, modrm);
             }
             default: throw BadInstruction();
           }
         } else if (thirdOpcodeByte < 0xB7) { // Floating-point operations
-          fillInModRM(rmMM, SgAsmTypeVector::createType(2, SgAsmTypeSingleFloat::createType()));
-          reg = makeModrmRegister(rmMM, SgAsmTypeVector::createType(2, SgAsmTypeSingleFloat::createType()));
+          fillInModRM(rmMM, V2FLOATT);
+          reg = makeModrmRegister(rmMM, V2FLOATT);
           switch (thirdOpcodeByte) {
             case 0x8A: return MAKE_INSN2(pfnacc, pfnacc, reg, modrm);
             case 0x8E: return MAKE_INSN2(pfpnacc, pfpnacc, reg, modrm);
@@ -1561,78 +1576,78 @@
           }
         } else { // Extra integer operations
           switch (thirdOpcodeByte) {
-            case 0xB7: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(pmulhrw, pmulhrw, reg, modrm);
-            case 0xBB: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(pswapd, pswapd, reg, modrm);
-            case 0xBF: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(8, SgAsmTypeByte::createType())); return MAKE_INSN2(pavgusb, pavgusb, reg, modrm);
+            case 0xB7: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(pmulhrw, pmulhrw, reg, modrm);
+            case 0xBB: getModRegRM(rmMM, rmMM, V2DWORDT); return MAKE_INSN2(pswapd, pswapd, reg, modrm);
+            case 0xBF: getModRegRM(rmMM, rmMM, V8BYTET); return MAKE_INSN2(pavgusb, pavgusb, reg, modrm);
             default: throw BadInstruction();
           }
         }
       }
       case 0x10: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(movups, movups, reg, modrm);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeSingleFloat::createType()); return MAKE_INSN2(movss, movss, reg, modrm);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(movupd, movupd, reg, modrm);
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); return MAKE_INSN2(movsd_sse, movsd, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(movups, movups, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, rmXMM, FLOATT); return MAKE_INSN2(movss, movss, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(movupd, movupd, reg, modrm);
+          case mmF2: getModRegRM(rmXMM, rmXMM, DOUBLET); return MAKE_INSN2(movsd_sse, movsd, reg, modrm);
         }
       }
       case 0x11: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(movups, movups, modrm, reg);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeSingleFloat::createType()); return MAKE_INSN2(movss, movss, modrm, reg);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(movupd, movupd, modrm, reg);
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); return MAKE_INSN2(movsd_sse, movsd, modrm, reg);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(movups, movups, modrm, reg);
+          case mmF3: getModRegRM(rmXMM, rmXMM, FLOATT); return MAKE_INSN2(movss, movss, modrm, reg);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(movupd, movupd, modrm, reg);
+          case mmF2: getModRegRM(rmXMM, rmXMM, DOUBLET); return MAKE_INSN2(movsd_sse, movsd, modrm, reg);
         }
       }
       case 0x12: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); if (modeField == 3) return MAKE_INSN2(movhlps, movhlps, reg, modrm); else return MAKE_INSN2(movlps, movlps, reg, modrm);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(movsldup, movsldup, reg, modrm);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); requireMemory(); return MAKE_INSN2(movlpd, movlpd, reg, modrm);
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); return MAKE_INSN2(movddup, movddup, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); if (modeField == 3) return MAKE_INSN2(movhlps, movhlps, reg, modrm); else return MAKE_INSN2(movlps, movlps, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(movsldup, movsldup, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, DOUBLET); requireMemory(); return MAKE_INSN2(movlpd, movlpd, reg, modrm);
+          case mmF2: getModRegRM(rmXMM, rmXMM, DOUBLET); return MAKE_INSN2(movddup, movddup, reg, modrm);
         }
       }
       case 0x13: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); requireMemory(); return MAKE_INSN2(movlps, movlps, modrm, reg);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); requireMemory(); return MAKE_INSN2(movlps, movlps, modrm, reg);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); requireMemory(); return MAKE_INSN2(movlpd, movlpd, modrm, reg);
+          case mm66: getModRegRM(rmXMM, rmXMM, DOUBLET); requireMemory(); return MAKE_INSN2(movlpd, movlpd, modrm, reg);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x14: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeSingleFloat::createType()), SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(unpcklps, unpcklps, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V2FLOATT, V4FLOATT); return MAKE_INSN2(unpcklps, unpcklps, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType(), SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(unpcklpd, unpcklpd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, DOUBLET, V2DOUBLET); return MAKE_INSN2(unpcklpd, unpcklpd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x15: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeSingleFloat::createType()), SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(unpckhps, unpckhps, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V2FLOATT, V4FLOATT); return MAKE_INSN2(unpckhps, unpckhps, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType(), SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(unpckhpd, unpckhpd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, DOUBLET, V2DOUBLET); return MAKE_INSN2(unpckhpd, unpckhpd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x16: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); if (modeField == 3) return MAKE_INSN2(movlhps, movlhps, reg, modrm); else return MAKE_INSN2(movhps, movhps, reg, modrm);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(movshdup, movshdup, reg, modrm);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); requireMemory(); return MAKE_INSN2(movhpd, movhpd, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); if (modeField == 3) return MAKE_INSN2(movlhps, movlhps, reg, modrm); else return MAKE_INSN2(movhps, movhps, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(movshdup, movshdup, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, DOUBLET); requireMemory(); return MAKE_INSN2(movhpd, movhpd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x17: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); requireMemory(); return MAKE_INSN2(movhps, movhps, modrm, reg);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); requireMemory(); return MAKE_INSN2(movhps, movhps, modrm, reg);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); requireMemory(); return MAKE_INSN2(movhpd, movhpd, modrm, reg);
+          case mm66: getModRegRM(rmXMM, rmXMM, DOUBLET); requireMemory(); return MAKE_INSN2(movhpd, movhpd, modrm, reg);
           case mmF2: throw BadInstruction();
         }
       }
-      case 0x18: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return decodeGroup16();
+      case 0x18: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return decodeGroup16();
       case 0x19: getModRegRM(rmReturnNull, rmReturnNull, NULL); return MAKE_INSN0(nop, nop);
       case 0x1A: getModRegRM(rmReturnNull, rmReturnNull, NULL); return MAKE_INSN0(nop, nop);
       case 0x1B: getModRegRM(rmReturnNull, rmReturnNull, NULL); return MAKE_INSN0(nop, nop);
@@ -1650,66 +1665,66 @@
       case 0x27: throw BadInstruction();
       case 0x28: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(movaps, movaps, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(movaps, movaps, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(movapd, movapd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(movapd, movapd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x29: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(movaps, movaps, modrm, reg);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(movaps, movaps, modrm, reg);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(movapd, movapd, modrm, reg);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(movapd, movapd, modrm, reg);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x2A: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType()), SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(cvtpi2ps, cvtpi2ps, reg, modrm);
-          case mmF3: getModRegRM(rmXMM, effectiveOperandMode(), effectiveOperandType(), SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(cvtsi2ss, cvtsi2ss, reg, modrm);
-          case mm66: getModRegRM(rmXMM, rmMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType()), SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(cvtpi2pd, cvtpi2pd, reg, modrm);
-          case mmF2: getModRegRM(rmXMM, effectiveOperandMode(), effectiveOperandType(), SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(cvtsi2sd, cvtsi2sd, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmMM, V2DWORDT, V4FLOATT); return MAKE_INSN2(cvtpi2ps, cvtpi2ps, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, effectiveOperandMode(), effectiveOperandType(), V4FLOATT); return MAKE_INSN2(cvtsi2ss, cvtsi2ss, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmMM, V2DWORDT, V2DOUBLET); return MAKE_INSN2(cvtpi2pd, cvtpi2pd, reg, modrm);
+          case mmF2: getModRegRM(rmXMM, effectiveOperandMode(), effectiveOperandType(), V2DOUBLET); return MAKE_INSN2(cvtsi2sd, cvtsi2sd, reg, modrm);
         }
       }
       case 0x2B: {
         requireMemory();
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(movntps, movntps, modrm, reg);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeSingleFloat::createType()); return MAKE_INSN2(movntss, movntss, modrm, reg);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(movntpd, movntpd, modrm, reg);
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); return MAKE_INSN2(movntsd, movntsd, modrm, reg);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(movntps, movntps, modrm, reg);
+          case mmF3: getModRegRM(rmXMM, rmXMM, FLOATT); return MAKE_INSN2(movntss, movntss, modrm, reg);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(movntpd, movntpd, modrm, reg);
+          case mmF2: getModRegRM(rmXMM, rmXMM, DOUBLET); return MAKE_INSN2(movntsd, movntsd, modrm, reg);
         }
       }
       case 0x2C: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType()), SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(cvttps2pi, cvttps2pi, reg, modrm);
-          case mmF3: getModRegRM(effectiveOperandMode(), rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType()), effectiveOperandType()); return MAKE_INSN2(cvttss2si, cvttss2si, reg, modrm);
-          case mm66: getModRegRM(rmMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType()), SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(cvttpd2pi, cvttpd2pi, reg, modrm);
-          case mmF2: getModRegRM(effectiveOperandMode(), rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType()), effectiveOperandType()); return MAKE_INSN2(cvttsd2si, cvttsd2si, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmXMM, V4FLOATT, V2DWORDT); return MAKE_INSN2(cvttps2pi, cvttps2pi, reg, modrm);
+          case mmF3: getModRegRM(effectiveOperandMode(), rmXMM, V4FLOATT, effectiveOperandType()); return MAKE_INSN2(cvttss2si, cvttss2si, reg, modrm);
+          case mm66: getModRegRM(rmMM, rmXMM, V2DOUBLET, V2DWORDT); return MAKE_INSN2(cvttpd2pi, cvttpd2pi, reg, modrm);
+          case mmF2: getModRegRM(effectiveOperandMode(), rmXMM, V2DOUBLET, effectiveOperandType()); return MAKE_INSN2(cvttsd2si, cvttsd2si, reg, modrm);
         }
       }
       case 0x2D: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType()), SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(cvtps2pi, cvtps2pi, reg, modrm);
-          case mmF3: getModRegRM(effectiveOperandMode(), rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType()), effectiveOperandType()); return MAKE_INSN2(cvtss2si, cvtss2si, reg, modrm);
-          case mm66: getModRegRM(rmMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType()), SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(cvtpd2pi, cvtpd2pi, reg, modrm);
-          case mmF2: getModRegRM(effectiveOperandMode(), rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType()), effectiveOperandType()); return MAKE_INSN2(cvtsd2si, cvtsd2si, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmXMM, V4FLOATT, V2DWORDT); return MAKE_INSN2(cvtps2pi, cvtps2pi, reg, modrm);
+          case mmF3: getModRegRM(effectiveOperandMode(), rmXMM, V4FLOATT, effectiveOperandType()); return MAKE_INSN2(cvtss2si, cvtss2si, reg, modrm);
+          case mm66: getModRegRM(rmMM, rmXMM, V2DOUBLET, V2DWORDT); return MAKE_INSN2(cvtpd2pi, cvtpd2pi, reg, modrm);
+          case mmF2: getModRegRM(effectiveOperandMode(), rmXMM, V2DOUBLET, effectiveOperandType()); return MAKE_INSN2(cvtsd2si, cvtsd2si, reg, modrm);
         }
       }
       case 0x2E: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeSingleFloat::createType()); return MAKE_INSN2(ucomiss, ucomiss, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, FLOATT); return MAKE_INSN2(ucomiss, ucomiss, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); return MAKE_INSN2(ucomisd, ucomisd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, DOUBLET); return MAKE_INSN2(ucomisd, ucomisd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x2F: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeSingleFloat::createType()); return MAKE_INSN2(comiss, comiss, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, FLOATT); return MAKE_INSN2(comiss, comiss, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); return MAKE_INSN2(comisd, comisd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, DOUBLET); return MAKE_INSN2(comisd, comisd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
@@ -1747,225 +1762,225 @@
       case 0x4F: getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); return MAKE_INSN2(cmovg, cmovg, reg, modrm);
       case 0x50: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmDWord, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); if (modeField == 3) return MAKE_INSN2(movmskps, movmskps, reg, modrm); else throw BadInstruction();
+          case mmNone: getModRegRM(rmDWord, rmXMM, V4FLOATT); if (modeField == 3) return MAKE_INSN2(movmskps, movmskps, reg, modrm); else throw BadInstruction();
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmDWord, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); if (modeField == 3) return MAKE_INSN2(movmskpd, movmskpd, reg, modrm); else throw BadInstruction();
+          case mm66: getModRegRM(rmDWord, rmXMM, V2DOUBLET); if (modeField == 3) return MAKE_INSN2(movmskpd, movmskpd, reg, modrm); else throw BadInstruction();
           case mmF2: throw BadInstruction();
         }
       }
       case 0x51: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(sqrtps, sqrtps, reg, modrm);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeSingleFloat::createType()); return MAKE_INSN2(sqrtss, sqrtss, reg, modrm);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(sqrtpd, sqrtpd, reg, modrm);
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); return MAKE_INSN2(sqrtsd, sqrtsd, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(sqrtps, sqrtps, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, rmXMM, FLOATT); return MAKE_INSN2(sqrtss, sqrtss, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(sqrtpd, sqrtpd, reg, modrm);
+          case mmF2: getModRegRM(rmXMM, rmXMM, DOUBLET); return MAKE_INSN2(sqrtsd, sqrtsd, reg, modrm);
         }
       }
       case 0x52: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(rsqrtps, rsqrtps, reg, modrm);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeSingleFloat::createType()); return MAKE_INSN2(rsqrtss, rsqrtss, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(rsqrtps, rsqrtps, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, rmXMM, FLOATT); return MAKE_INSN2(rsqrtss, rsqrtss, reg, modrm);
           case mm66: throw BadInstruction();
           case mmF2: throw BadInstruction();
         }
       }
       case 0x53: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(rcpps, rcpps, reg, modrm);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeSingleFloat::createType()); return MAKE_INSN2(rcpss, rcpss, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(rcpps, rcpps, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, rmXMM, FLOATT); return MAKE_INSN2(rcpss, rcpss, reg, modrm);
           case mm66: throw BadInstruction();
           case mmF2: throw BadInstruction();
         }
       }
       case 0x54: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(andps, andps, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(andps, andps, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(andpd, andpd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(andpd, andpd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x55: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(andnps, andnps, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(andnps, andnps, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(andnpd, andnpd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(andnpd, andnpd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x56: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(orps, orps, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(orps, orps, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(orpd, orpd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(orpd, orpd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x57: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(xorps, xorps, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(xorps, xorps, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(xorpd, xorpd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(xorpd, xorpd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x58: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(addps, addps, reg, modrm);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeSingleFloat::createType()); return MAKE_INSN2(addss, addss, reg, modrm);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(addpd, addpd, reg, modrm);
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); return MAKE_INSN2(addsd, addsd, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(addps, addps, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, rmXMM, FLOATT); return MAKE_INSN2(addss, addss, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(addpd, addpd, reg, modrm);
+          case mmF2: getModRegRM(rmXMM, rmXMM, DOUBLET); return MAKE_INSN2(addsd, addsd, reg, modrm);
         }
       }
       case 0x59: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(mulps, mulps, reg, modrm);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeSingleFloat::createType()); return MAKE_INSN2(mulss, mulss, reg, modrm);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(mulpd, mulpd, reg, modrm);
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); return MAKE_INSN2(mulsd, mulsd, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(mulps, mulps, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, rmXMM, FLOATT); return MAKE_INSN2(mulss, mulss, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(mulpd, mulpd, reg, modrm);
+          case mmF2: getModRegRM(rmXMM, rmXMM, DOUBLET); return MAKE_INSN2(mulsd, mulsd, reg, modrm);
         }
       }
       case 0x5A: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType()), SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(cvtps2pd, cvtps2pd, reg, modrm);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeSingleFloat::createType(), SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(cvtss2sd, cvtss2sd, reg, modrm);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType()), SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(cvtpd2ps, cvtpd2ps, reg, modrm);
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType(), SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(cvtsd2ss, cvtsd2ss, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT, V2DOUBLET); return MAKE_INSN2(cvtps2pd, cvtps2pd, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, rmXMM, FLOATT, V2DOUBLET); return MAKE_INSN2(cvtss2sd, cvtss2sd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET, V4FLOATT); return MAKE_INSN2(cvtpd2ps, cvtpd2ps, reg, modrm);
+          case mmF2: getModRegRM(rmXMM, rmXMM, DOUBLET, V4FLOATT); return MAKE_INSN2(cvtsd2ss, cvtsd2ss, reg, modrm);
         }
       }
       case 0x5B: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType()), SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(cvtdq2ps, cvtdq2ps, reg, modrm);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType()), SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(cvttps2dq, cvttps2dq, reg, modrm);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType()), SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(cvtps2dq, cvtps2dq, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4DWORDT, V4FLOATT); return MAKE_INSN2(cvtdq2ps, cvtdq2ps, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, rmXMM, V4FLOATT, V4DWORDT); return MAKE_INSN2(cvttps2dq, cvttps2dq, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V4FLOATT, V4DWORDT); return MAKE_INSN2(cvtps2dq, cvtps2dq, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x5C: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(subps, subps, reg, modrm);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeSingleFloat::createType()); return MAKE_INSN2(subss, subss, reg, modrm);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(subpd, subpd, reg, modrm);
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); return MAKE_INSN2(subsd, subsd, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(subps, subps, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, rmXMM, FLOATT); return MAKE_INSN2(subss, subss, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(subpd, subpd, reg, modrm);
+          case mmF2: getModRegRM(rmXMM, rmXMM, DOUBLET); return MAKE_INSN2(subsd, subsd, reg, modrm);
         }
       }
       case 0x5D: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(minps, minps, reg, modrm);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeSingleFloat::createType()); return MAKE_INSN2(minss, minss, reg, modrm);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(minpd, minpd, reg, modrm);
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); return MAKE_INSN2(minsd, minsd, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(minps, minps, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, rmXMM, FLOATT); return MAKE_INSN2(minss, minss, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(minpd, minpd, reg, modrm);
+          case mmF2: getModRegRM(rmXMM, rmXMM, DOUBLET); return MAKE_INSN2(minsd, minsd, reg, modrm);
         }
       }
       case 0x5E: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(divps, divps, reg, modrm);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeSingleFloat::createType()); return MAKE_INSN2(divss, divss, reg, modrm);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(divpd, divpd, reg, modrm);
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); return MAKE_INSN2(divsd, divsd, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(divps, divps, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, rmXMM, FLOATT); return MAKE_INSN2(divss, divss, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(divpd, divpd, reg, modrm);
+          case mmF2: getModRegRM(rmXMM, rmXMM, DOUBLET); return MAKE_INSN2(divsd, divsd, reg, modrm);
         }
       }
       case 0x5F: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(maxps, maxps, reg, modrm);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeSingleFloat::createType()); return MAKE_INSN2(maxss, maxss, reg, modrm);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(maxpd, maxpd, reg, modrm);
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); return MAKE_INSN2(maxsd, maxsd, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(maxps, maxps, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, rmXMM, FLOATT); return MAKE_INSN2(maxss, maxss, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(maxpd, maxpd, reg, modrm);
+          case mmF2: getModRegRM(rmXMM, rmXMM, DOUBLET); return MAKE_INSN2(maxsd, maxsd, reg, modrm);
         }
       }
       case 0x60: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(8, SgAsmTypeByte::createType()), SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(punpcklbw, punpcklbw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V8BYTET, V4WORDT); return MAKE_INSN2(punpcklbw, punpcklbw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(16, SgAsmTypeByte::createType()), SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(punpcklbw, punpcklbw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V16BYTET, V8WORDT); return MAKE_INSN2(punpcklbw, punpcklbw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x61: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType()), SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(punpcklwd, punpcklwd, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT, V2DWORDT); return MAKE_INSN2(punpcklwd, punpcklwd, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType()), SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(punpcklwd, punpcklwd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT, V4DWORDT); return MAKE_INSN2(punpcklwd, punpcklwd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x62: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType()), SgAsmTypeQuadWord::createType()); return MAKE_INSN2(punpckldq, punpckldq, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V2DWORDT, QWORDT); return MAKE_INSN2(punpckldq, punpckldq, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType()), SgAsmTypeVector::createType(2, SgAsmTypeQuadWord::createType())); return MAKE_INSN2(punpckldq, punpckldq, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V4DWORDT, V2QWORDT); return MAKE_INSN2(punpckldq, punpckldq, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x63: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType()), SgAsmTypeVector::createType(8, SgAsmTypeByte::createType())); return MAKE_INSN2(packsswb, packsswb, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT, V8BYTET); return MAKE_INSN2(packsswb, packsswb, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType()), SgAsmTypeVector::createType(16, SgAsmTypeByte::createType())); return MAKE_INSN2(packsswb, packsswb, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT, V16BYTET); return MAKE_INSN2(packsswb, packsswb, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x64: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(8, SgAsmTypeByte::createType())); return MAKE_INSN2(pcmpgtb, pcmpgtb, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V8BYTET); return MAKE_INSN2(pcmpgtb, pcmpgtb, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(16, SgAsmTypeByte::createType())); return MAKE_INSN2(pcmpgtb, pcmpgtb, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V16BYTET); return MAKE_INSN2(pcmpgtb, pcmpgtb, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x65: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(pcmpgtw, pcmpgtw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(pcmpgtw, pcmpgtw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(pcmpgtw, pcmpgtw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT); return MAKE_INSN2(pcmpgtw, pcmpgtw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x66: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(pcmpgtd, pcmpgtd, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V2DWORDT); return MAKE_INSN2(pcmpgtd, pcmpgtd, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(pcmpgtd, pcmpgtd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V4DWORDT); return MAKE_INSN2(pcmpgtd, pcmpgtd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x67: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType()), SgAsmTypeVector::createType(8, SgAsmTypeByte::createType())); return MAKE_INSN2(packuswb, packuswb, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT, V8BYTET); return MAKE_INSN2(packuswb, packuswb, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType()), SgAsmTypeVector::createType(16, SgAsmTypeByte::createType())); return MAKE_INSN2(packuswb, packuswb, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT, V16BYTET); return MAKE_INSN2(packuswb, packuswb, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x68: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(8, SgAsmTypeByte::createType()), SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(punpckhbw, punpckhbw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V8BYTET, V4WORDT); return MAKE_INSN2(punpckhbw, punpckhbw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(16, SgAsmTypeByte::createType()), SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(punpckhbw, punpckhbw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V16BYTET, V8WORDT); return MAKE_INSN2(punpckhbw, punpckhbw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x69: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType()), SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(punpckhwd, punpckhwd, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT, V2DWORDT); return MAKE_INSN2(punpckhwd, punpckhwd, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType()), SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(punpckhwd, punpckhwd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT, V4DWORDT); return MAKE_INSN2(punpckhwd, punpckhwd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x6A: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType()), SgAsmTypeQuadWord::createType()); return MAKE_INSN2(punpckhdq, punpckhdq, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V2DWORDT, QWORDT); return MAKE_INSN2(punpckhdq, punpckhdq, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType()), SgAsmTypeVector::createType(2, SgAsmTypeQuadWord::createType())); return MAKE_INSN2(punpckhdq, punpckhdq, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V4DWORDT, V2QWORDT); return MAKE_INSN2(punpckhdq, punpckhdq, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x6B: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType()), SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(packssdw, packssdw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V2DWORDT, V4WORDT); return MAKE_INSN2(packssdw, packssdw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType()), SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(packssdw, packssdw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V4DWORDT, V8WORDT); return MAKE_INSN2(packssdw, packssdw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
@@ -1973,7 +1988,7 @@
         switch (mmPrefix()) {
           case mmNone: throw BadInstruction();
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeQuadWord::createType()), SgAsmTypeDoubleQuadWord::createType()); return MAKE_INSN2(punpcklqdq, punpcklqdq, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2QWORDT, DQWORDT); return MAKE_INSN2(punpcklqdq, punpcklqdq, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
@@ -1981,38 +1996,38 @@
         switch (mmPrefix()) {
           case mmNone: throw BadInstruction();
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeQuadWord::createType()), SgAsmTypeDoubleQuadWord::createType()); return MAKE_INSN2(punpckhqdq, punpckhqdq, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2QWORDT, DQWORDT); return MAKE_INSN2(punpckhqdq, punpckhqdq, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x6E: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, effectiveOperandMode(), effectiveOperandType(), (effectiveOperandSize() == x86_insnsize_64 ? (SgAsmType*)SgAsmTypeQuadWord::createType() : SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType()))); return MAKE_INSN2(movd, movd, reg, modrm);
+          case mmNone: getModRegRM(rmMM, effectiveOperandMode(), effectiveOperandType(), (effectiveOperandSize() == x86_insnsize_64 ? (SgAsmType*)QWORDT : V2DWORDT)); return MAKE_INSN2(movd, movd, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, effectiveOperandMode(), effectiveOperandType(), (effectiveOperandSize() == x86_insnsize_64 ? SgAsmTypeVector::createType(2, SgAsmTypeQuadWord::createType()) : SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType()))); return MAKE_INSN2(movd, movd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, effectiveOperandMode(), effectiveOperandType(), (effectiveOperandSize() == x86_insnsize_64 ? V2QWORDT : V4DWORDT)); return MAKE_INSN2(movd, movd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x6F: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeQuadWord::createType()); return MAKE_INSN2(movq, movq, reg, modrm);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleQuadWord::createType()); return MAKE_INSN2(movdqu, movdqu, reg, modrm);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleQuadWord::createType()); return MAKE_INSN2(movdqa, movdqa, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, QWORDT); return MAKE_INSN2(movq, movq, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, rmXMM, DQWORDT); return MAKE_INSN2(movdqu, movdqu, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, DQWORDT); return MAKE_INSN2(movdqa, movdqa, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x70: {
         switch (mmPrefix()) {
-          case mmNone: {getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); SgAsmExpression* shufConstant = getImmByte(); return MAKE_INSN3(pshufw, pshufw, reg, modrm, shufConstant);}
-          case mmF3: {getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); SgAsmExpression* shufConstant = getImmByte(); return MAKE_INSN3(pshufhw, pshufhw, reg, modrm, shufConstant);}
-          case mm66: {getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType())); SgAsmExpression* shufConstant = getImmByte(); return MAKE_INSN3(pshufd, pshufd, reg, modrm, shufConstant);}
-          case mmF2: {getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); SgAsmExpression* shufConstant = getImmByte(); return MAKE_INSN3(pshuflw, pshuflw, reg, modrm, shufConstant);}
+          case mmNone: {getModRegRM(rmMM, rmMM, V4WORDT); SgAsmExpression* shufConstant = getImmByte(); return MAKE_INSN3(pshufw, pshufw, reg, modrm, shufConstant);}
+          case mmF3: {getModRegRM(rmXMM, rmXMM, V8WORDT); SgAsmExpression* shufConstant = getImmByte(); return MAKE_INSN3(pshufhw, pshufhw, reg, modrm, shufConstant);}
+          case mm66: {getModRegRM(rmXMM, rmXMM, V4DWORDT); SgAsmExpression* shufConstant = getImmByte(); return MAKE_INSN3(pshufd, pshufd, reg, modrm, shufConstant);}
+          case mmF2: {getModRegRM(rmXMM, rmXMM, V8WORDT); SgAsmExpression* shufConstant = getImmByte(); return MAKE_INSN3(pshuflw, pshuflw, reg, modrm, shufConstant);}
         }
       }
       case 0x71: { // Group 12
         switch (mmPrefix()) {
           case mmNone: {
-            getModRegRM(rmReturnNull, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType()));
+            getModRegRM(rmReturnNull, rmMM, V4WORDT);
             if (modeField != 3) throw BadInstruction();
             SgAsmExpression* shiftAmount = getImmByte();
             switch (regField) {
@@ -2029,7 +2044,7 @@
           }
           case mmF3: throw BadInstruction();
           case mm66: {
-            getModRegRM(rmReturnNull, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType()));
+            getModRegRM(rmReturnNull, rmXMM, V8WORDT);
             if (modeField != 3) throw BadInstruction();
             SgAsmExpression* shiftAmount = getImmByte();
             switch (regField) {
@@ -2050,7 +2065,7 @@
       case 0x72: { // Group 13
         switch (mmPrefix()) {
           case mmNone: {
-            getModRegRM(rmReturnNull, rmMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType()));
+            getModRegRM(rmReturnNull, rmMM, V2DWORDT);
             if (modeField != 3) throw BadInstruction();
             SgAsmExpression* shiftAmount = getImmByte();
             switch (regField) {
@@ -2067,7 +2082,7 @@
           }
           case mmF3: throw BadInstruction();
           case mm66: {
-            getModRegRM(rmReturnNull, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType()));
+            getModRegRM(rmReturnNull, rmXMM, V4DWORDT);
             if (modeField != 3) throw BadInstruction();
             SgAsmExpression* shiftAmount = getImmByte();
             switch (regField) {
@@ -2088,7 +2103,7 @@
       case 0x73: { // Group 14
         switch (mmPrefix()) {
           case mmNone: {
-            getModRegRM(rmReturnNull, rmMM, SgAsmTypeQuadWord::createType());
+            getModRegRM(rmReturnNull, rmMM, QWORDT);
             if (modeField != 3) throw BadInstruction();
             SgAsmExpression* shiftAmount = getImmByte();
             switch (regField) {
@@ -2105,18 +2120,18 @@
           }
           case mmF3: throw BadInstruction();
           case mm66: {
-            getModRegRM(rmReturnNull, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeQuadWord::createType()));
+            getModRegRM(rmReturnNull, rmXMM, V2QWORDT);
             if (modeField != 3) throw BadInstruction();
             SgAsmExpression* shiftAmount = getImmByte();
             switch (regField) {
               case 0: throw BadInstruction();
               case 1: throw BadInstruction();
               case 2: return MAKE_INSN2(psrlq, psrlq, modrm, shiftAmount);
-              case 3: isSgAsmx86RegisterReferenceExpression(modrm)->set_type(SgAsmTypeDoubleQuadWord::createType()); return MAKE_INSN2(psrldq, psrldq, modrm, shiftAmount);
+              case 3: isSgAsmx86RegisterReferenceExpression(modrm)->set_type(DQWORDT); return MAKE_INSN2(psrldq, psrldq, modrm, shiftAmount);
               case 4: throw BadInstruction();
               case 5: throw BadInstruction();
               case 6: return MAKE_INSN2(psllq, psllq, modrm, shiftAmount);
-              case 7: isSgAsmx86RegisterReferenceExpression(modrm)->set_type(SgAsmTypeDoubleQuadWord::createType()); return MAKE_INSN2(pslldq, pslldq, modrm, shiftAmount);
+              case 7: isSgAsmx86RegisterReferenceExpression(modrm)->set_type(DQWORDT); return MAKE_INSN2(pslldq, pslldq, modrm, shiftAmount);
               default: ROSE_ASSERT (false);
             }
           }
@@ -2125,25 +2140,25 @@
       }
       case 0x74: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(8, SgAsmTypeByte::createType())); return MAKE_INSN2(pcmpeqb, pcmpeqb, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V8BYTET); return MAKE_INSN2(pcmpeqb, pcmpeqb, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(16, SgAsmTypeByte::createType())); return MAKE_INSN2(pcmpeqb, pcmpeqb, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V16BYTET); return MAKE_INSN2(pcmpeqb, pcmpeqb, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x75: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(pcmpeqw, pcmpeqw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(pcmpeqw, pcmpeqw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(pcmpeqw, pcmpeqw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT); return MAKE_INSN2(pcmpeqw, pcmpeqw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x76: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(pcmpeqd, pcmpeqd, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V2DWORDT); return MAKE_INSN2(pcmpeqd, pcmpeqd, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(pcmpeqd, pcmpeqd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V4DWORDT); return MAKE_INSN2(pcmpeqd, pcmpeqd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
@@ -2160,7 +2175,7 @@
           case mmNone: ROSE_ASSERT (!"vmread not supported");
           case mmF3: throw BadInstruction();
           case mm66: { // Group 17
-            getModRegRM(rmReturnNull, rmXMM, SgAsmTypeDoubleQuadWord::createType());
+            getModRegRM(rmReturnNull, rmXMM, DQWORDT);
             SgAsmExpression* imm1 = getImmByte();
             SgAsmExpression* imm2 = getImmByte();
             switch (regField) {
@@ -2173,7 +2188,7 @@
             }
           }
           case mmF2: {
-            getModRegRM(rmXMM, rmXMM, SgAsmTypeQuadWord::createType(), SgAsmTypeDoubleQuadWord::createType());
+            getModRegRM(rmXMM, rmXMM, QWORDT, DQWORDT);
             SgAsmExpression* imm1 = getImmByte();
             SgAsmExpression* imm2 = getImmByte();
             if (modeField == 3)
@@ -2187,8 +2202,8 @@
         switch (mmPrefix()) {
           case mmNone: ROSE_ASSERT (!"vmwrite not supported");
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeQuadWord::createType(), SgAsmTypeDoubleQuadWord::createType()); if (modeField == 3) return MAKE_INSN2(extrq, extrq, reg, modrm); else throw BadInstruction();
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleQuadWord::createType()); if (modeField == 3) return MAKE_INSN2(insertq, insertq, reg, modrm); else throw BadInstruction();
+          case mm66: getModRegRM(rmXMM, rmXMM, QWORDT, DQWORDT); if (modeField == 3) return MAKE_INSN2(extrq, extrq, reg, modrm); else throw BadInstruction();
+          case mmF2: getModRegRM(rmXMM, rmXMM, DQWORDT); if (modeField == 3) return MAKE_INSN2(insertq, insertq, reg, modrm); else throw BadInstruction();
         }
       }
       case 0x7A: throw BadInstruction();
@@ -2197,66 +2212,66 @@
         switch (mmPrefix()) {
           case mmNone: throw BadInstruction();
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(haddpd, haddpd, reg, modrm);
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(haddps, haddps, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(haddpd, haddpd, reg, modrm);
+          case mmF2: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(haddps, haddps, reg, modrm);
         }
       }
       case 0x7D: {
         switch (mmPrefix()) {
           case mmNone: throw BadInstruction();
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(hsubpd, hsubpd, reg, modrm);
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(hsubps, hsubps, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(hsubpd, hsubpd, reg, modrm);
+          case mmF2: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(hsubps, hsubps, reg, modrm);
         }
       }
       case 0x7E: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, effectiveOperandMode(), effectiveOperandType(), (effectiveOperandSize() == x86_insnsize_64 ? (SgAsmType*)SgAsmTypeQuadWord::createType() : SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType()))); return MAKE_INSN2(movd, movd, modrm, reg);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeQuadWord::createType())); return MAKE_INSN2(movq, movq, reg, modrm);
-          case mm66: getModRegRM(rmXMM, effectiveOperandMode(), effectiveOperandType(), (effectiveOperandSize() == x86_insnsize_64 ? SgAsmTypeVector::createType(2, SgAsmTypeQuadWord::createType()) : SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType()))); return MAKE_INSN2(movd, movd, modrm, reg);
+          case mmNone: getModRegRM(rmMM, effectiveOperandMode(), effectiveOperandType(), (effectiveOperandSize() == x86_insnsize_64 ? (SgAsmType*)QWORDT : V2DWORDT)); return MAKE_INSN2(movd, movd, modrm, reg);
+          case mmF3: getModRegRM(rmXMM, rmXMM, V2QWORDT); return MAKE_INSN2(movq, movq, reg, modrm);
+          case mm66: getModRegRM(rmXMM, effectiveOperandMode(), effectiveOperandType(), (effectiveOperandSize() == x86_insnsize_64 ? V2QWORDT : V4DWORDT)); return MAKE_INSN2(movd, movd, modrm, reg);
           case mmF2: throw BadInstruction();
         }
       }
       case 0x7F: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeQuadWord::createType()); return MAKE_INSN2(movq, movq, modrm, reg);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleQuadWord::createType()); return MAKE_INSN2(movdqu, movdqu, modrm, reg);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleQuadWord::createType()); return MAKE_INSN2(movdqa, movdqa, modrm, reg);
+          case mmNone: getModRegRM(rmMM, rmMM, QWORDT); return MAKE_INSN2(movq, movq, modrm, reg);
+          case mmF3: getModRegRM(rmXMM, rmXMM, DQWORDT); return MAKE_INSN2(movdqu, movdqu, modrm, reg);
+          case mm66: getModRegRM(rmXMM, rmXMM, DQWORDT); return MAKE_INSN2(movdqa, movdqa, modrm, reg);
           case mmF2: throw BadInstruction();
         }
       }
-      case 0x80: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jo , jo, /* prediction, */ imm);}
-      case 0x81: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jno, jno, /* prediction, */ imm);}
-      case 0x82: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jb,  jb, /* prediction, */ imm);}
-      case 0x83: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jae, jae, /* prediction, */ imm);}
-      case 0x84: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(je,  je, /* prediction, */ imm);}
-      case 0x85: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jne, jne, /* prediction, */ imm);}
-      case 0x86: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jbe, jbe, /* prediction, */ imm);}
-      case 0x87: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(ja,  ja, /* prediction, */ imm);}
-      case 0x88: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(js , js, /* prediction, */ imm);}
-      case 0x89: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jns, jns, /* prediction, */ imm);}
-      case 0x8A: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jpe, jpe, /* prediction, */ imm);}
-      case 0x8B: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jpo, jpo, /* prediction, */ imm);}
-      case 0x8C: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jl,  jl, /* prediction, */ imm);}
-      case 0x8D: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jge, jge, /* prediction, */ imm);}
-      case 0x8E: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jle, jle, /* prediction, */ imm);}
-      case 0x8F: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jg,  jg, /* prediction, */ imm);}
-      case 0x90: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN1(seto,  seto, modrm);
-      case 0x91: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN1(setno, setno, modrm);
-      case 0x92: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN1(setb,  setb, modrm);
-      case 0x93: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN1(setae, setae, modrm);
-      case 0x94: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN1(sete,  sete, modrm);
-      case 0x95: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN1(setne, setne, modrm);
-      case 0x96: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN1(setbe, setbe, modrm);
-      case 0x97: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN1(seta,  seta, modrm);
-      case 0x98: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN1(sets,  sets, modrm);
-      case 0x99: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN1(setns, setns, modrm);
-      case 0x9A: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN1(setpe, setpe, modrm);
-      case 0x9B: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN1(setpo, setpo, modrm);
-      case 0x9C: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN1(setl,  setl, modrm);
-      case 0x9D: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN1(setge, setge, modrm);
-      case 0x9E: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN1(setle, setle, modrm);
-      case 0x9F: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN1(setg,  setg, modrm);
+      case 0x80: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jo , jo, imm);}
+      case 0x81: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jno, jno, imm);}
+      case 0x82: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jb,  jb, imm);}
+      case 0x83: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jae, jae, imm);}
+      case 0x84: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(je,  je, imm);}
+      case 0x85: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jne, jne, imm);}
+      case 0x86: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jbe, jbe, imm);}
+      case 0x87: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(ja,  ja, imm);}
+      case 0x88: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(js , js, imm);}
+      case 0x89: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jns, jns, imm);}
+      case 0x8A: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jpe, jpe, imm);}
+      case 0x8B: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jpo, jpo, imm);}
+      case 0x8C: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jl,  jl, imm);}
+      case 0x8D: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jge, jge, imm);}
+      case 0x8E: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jle, jle, imm);}
+      case 0x8F: {SgAsmExpression* imm = getImmJz(); branchPredictionEnabled = true; return MAKE_INSN1(jg,  jg, imm);}
+      case 0x90: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN1(seto,  seto, modrm);
+      case 0x91: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN1(setno, setno, modrm);
+      case 0x92: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN1(setb,  setb, modrm);
+      case 0x93: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN1(setae, setae, modrm);
+      case 0x94: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN1(sete,  sete, modrm);
+      case 0x95: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN1(setne, setne, modrm);
+      case 0x96: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN1(setbe, setbe, modrm);
+      case 0x97: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN1(seta,  seta, modrm);
+      case 0x98: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN1(sets,  sets, modrm);
+      case 0x99: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN1(setns, setns, modrm);
+      case 0x9A: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN1(setpe, setpe, modrm);
+      case 0x9B: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN1(setpo, setpo, modrm);
+      case 0x9C: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN1(setl,  setl, modrm);
+      case 0x9D: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN1(setge, setge, modrm);
+      case 0x9E: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN1(setle, setle, modrm);
+      case 0x9F: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN1(setg,  setg, modrm);
       case 0xA0: return MAKE_INSN1(push, push, makeRegister(4, rmSegment));
       case 0xA1: return MAKE_INSN1(pop, pop, makeRegister(4, rmSegment));
       case 0xA2: return MAKE_INSN0(cpuid, cpuid);
@@ -2273,14 +2288,14 @@
       case 0xAD: getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); return MAKE_INSN3(shrd, shrd, modrm, reg, makeRegister(1, rmLegacyByte));
       case 0xAE: return decodeGroup15();
       case 0xAF: getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); return MAKE_INSN2(imul, imul, reg, modrm);
-      case 0xB0: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN2(cmpxchg, cmpxchg, modrm, reg);
+      case 0xB0: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN2(cmpxchg, cmpxchg, modrm, reg);
       case 0xB1: getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); return MAKE_INSN2(cmpxchg, cmpxchg, modrm, reg);
       case 0xB2: getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); requireMemory(); return MAKE_INSN2(lss, lss, reg, modrm);
       case 0xB3: getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); return MAKE_INSN2(bts, bts, modrm, reg);
       case 0xB4: getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); requireMemory(); return MAKE_INSN2(lfs, lfs, reg, modrm);
       case 0xB5: getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); requireMemory(); return MAKE_INSN2(lgs, lgs, reg, modrm);
-      case 0xB6: getModRegRM(effectiveOperandMode(), rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN2(movzx, movzx, reg, modrm);
-      case 0xB7: getModRegRM(effectiveOperandMode(), rmWord, SgAsmTypeWord::createType()); return MAKE_INSN2(movzx, movzx, reg, modrm);
+      case 0xB6: getModRegRM(effectiveOperandMode(), rmLegacyByte, BYTET); return MAKE_INSN2(movzx, movzx, reg, modrm);
+      case 0xB7: getModRegRM(effectiveOperandMode(), rmWord, WORDT); return MAKE_INSN2(movzx, movzx, reg, modrm);
       case 0xB8: {
         getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType());
         switch (mmPrefix()) {
@@ -2294,16 +2309,16 @@
       case 0xBB: getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); return MAKE_INSN2(btc, btc, modrm, reg);
       case 0xBC: getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); return MAKE_INSN2(bsf, bsf, reg, modrm);
       case 0xBD: getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); if (repeatPrefix == rpRepe) return MAKE_INSN2(lzcnt, lzcnt, reg, modrm); else return MAKE_INSN2(bsr, bsr, reg, modrm);
-      case 0xBE: getModRegRM(effectiveOperandMode(), rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN2(movsx, movsx, reg, modrm);
-      case 0xBF: getModRegRM(effectiveOperandMode(), rmWord, SgAsmTypeWord::createType()); return MAKE_INSN2(movsx, movsx, reg, modrm);
-      case 0xC0: getModRegRM(rmLegacyByte, rmLegacyByte, SgAsmTypeByte::createType()); return MAKE_INSN2(xadd, xadd, modrm, reg);
+      case 0xBE: getModRegRM(effectiveOperandMode(), rmLegacyByte, BYTET); return MAKE_INSN2(movsx, movsx, reg, modrm);
+      case 0xBF: getModRegRM(effectiveOperandMode(), rmWord, WORDT); return MAKE_INSN2(movsx, movsx, reg, modrm);
+      case 0xC0: getModRegRM(rmLegacyByte, rmLegacyByte, BYTET); return MAKE_INSN2(xadd, xadd, modrm, reg);
       case 0xC1: getModRegRM(effectiveOperandMode(), effectiveOperandMode(), effectiveOperandType()); return MAKE_INSN2(xadd, xadd, modrm, reg);
       case 0xC2: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(cmpps, cmpps, reg, modrm);
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeSingleFloat::createType()); return MAKE_INSN2(cmpss, cmpss, reg, modrm);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(cmppd, cmppd, reg, modrm);
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleFloat::createType()); return MAKE_INSN2(cmpsd, cmpsd, reg, modrm);
+          case mmNone: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(cmpps, cmpps, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, rmXMM, FLOATT); return MAKE_INSN2(cmpss, cmpss, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(cmppd, cmppd, reg, modrm);
+          case mmF2: getModRegRM(rmXMM, rmXMM, DOUBLET); return MAKE_INSN2(cmpsd, cmpsd, reg, modrm);
         }
       }
       case 0xC3: {
@@ -2317,13 +2332,13 @@
       case 0xC4: {
         switch (mmPrefix()) {
           case mmNone: {
-            getModRegRM(rmMM, rmWord, SgAsmTypeWord::createType(), SgAsmTypeQuadWord::createType());
+            getModRegRM(rmMM, rmWord, WORDT, QWORDT);
             SgAsmExpression* imm = getImmByte();
             return MAKE_INSN3(pinsrw, pinsrw, reg, modrm, imm);
           }
           case mmF3: throw BadInstruction();
           case mm66: {
-            getModRegRM(rmXMM, rmWord, SgAsmTypeWord::createType(), SgAsmTypeDoubleQuadWord::createType());
+            getModRegRM(rmXMM, rmWord, WORDT, DQWORDT);
             SgAsmExpression* imm = getImmByte();
             return MAKE_INSN3(pinsrw, pinsrw, reg, modrm, imm);
           }
@@ -2333,13 +2348,13 @@
       case 0xC5: {
         switch (mmPrefix()) {
           case mmNone: {
-            getModRegRM(rmDWord, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType()), SgAsmTypeDoubleWord::createType());
+            getModRegRM(rmDWord, rmMM, V4WORDT, DWORDT);
             SgAsmExpression* imm = getImmByte();
             if (modeField == 3) return MAKE_INSN3(pextrw, pextrw, reg, modrm, imm); else throw BadInstruction();
           }
           case mmF3: throw BadInstruction();
           case mm66: {
-            getModRegRM(rmDWord, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType()), SgAsmTypeDoubleWord::createType());
+            getModRegRM(rmDWord, rmXMM, V8WORDT, DWORDT);
             SgAsmExpression* imm = getImmByte();
             if (modeField == 3) return MAKE_INSN3(pextrw, pextrw, reg, modrm, imm); else throw BadInstruction();
           }
@@ -2349,13 +2364,13 @@
       case 0xC6: {
         switch (mmPrefix()) {
           case mmNone: {
-            getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType()));
+            getModRegRM(rmXMM, rmXMM, V4FLOATT);
             SgAsmExpression* shufConstant = getImmByte();
             return MAKE_INSN3(shufps, shufps, reg, modrm, shufConstant);
           }
           case mmF3: throw BadInstruction();
           case mm66: {
-            getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType()));
+            getModRegRM(rmXMM, rmXMM, V2DOUBLET);
             SgAsmExpression* shufConstant = getImmByte();
             return MAKE_INSN3(shufpd, shufpd, reg, modrm, shufConstant);
           }
@@ -2368,15 +2383,15 @@
         switch (regField) {
           case 1: {
             if (effectiveOperandSize() == x86_insnsize_64) {
-              fillInModRM(rmReturnNull, SgAsmTypeDoubleQuadWord::createType());
+              fillInModRM(rmReturnNull, DQWORDT);
               return MAKE_INSN1(cmpxchg16b, cmpxchg16b, modrm);
             } else {
-              fillInModRM(rmReturnNull, SgAsmTypeQuadWord::createType());
+              fillInModRM(rmReturnNull, QWORDT);
               return MAKE_INSN1(cmpxchg8b, cmpxchg8b, modrm);
             }
           }
           case 6: {
-            fillInModRM(rmReturnNull, SgAsmTypeQuadWord::createType());
+            fillInModRM(rmReturnNull, QWORDT);
             switch (mmPrefix()) {
               case mmNone: return MAKE_INSN1(vmptrld, vmptrld, modrm);
               case mmF3: return MAKE_INSN1(vmxon, vmxon, modrm);
@@ -2385,7 +2400,7 @@
             }
           }
           case 7: {
-            fillInModRM(rmReturnNull, SgAsmTypeQuadWord::createType());
+            fillInModRM(rmReturnNull, QWORDT);
             return MAKE_INSN1(vmptrst, vmptrst, modrm);
           }
           default: throw BadInstruction();
@@ -2403,255 +2418,255 @@
         switch (mmPrefix()) {
           case mmNone: throw BadInstruction();
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(addsubpd, addsubpd, reg, modrm);
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeSingleFloat::createType())); return MAKE_INSN2(addsubps, addsubps, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET); return MAKE_INSN2(addsubpd, addsubpd, reg, modrm);
+          case mmF2: getModRegRM(rmXMM, rmXMM, V4FLOATT); return MAKE_INSN2(addsubps, addsubps, reg, modrm);
         }
       }
       case 0xD1: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(psrlw, psrlw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(psrlw, psrlw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(psrlw, psrlw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT); return MAKE_INSN2(psrlw, psrlw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xD2: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(psrld, psrld, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V2DWORDT); return MAKE_INSN2(psrld, psrld, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(psrld, psrld, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V4DWORDT); return MAKE_INSN2(psrld, psrld, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xD3: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeQuadWord::createType()); return MAKE_INSN2(psrlq, psrlq, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, QWORDT); return MAKE_INSN2(psrlq, psrlq, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeQuadWord::createType())); return MAKE_INSN2(psrlq, psrlq, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2QWORDT); return MAKE_INSN2(psrlq, psrlq, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xD4: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeQuadWord::createType()); return MAKE_INSN2(paddq, paddq, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, QWORDT); return MAKE_INSN2(paddq, paddq, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeQuadWord::createType())); return MAKE_INSN2(paddq, paddq, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2QWORDT); return MAKE_INSN2(paddq, paddq, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xD5: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(pmullw, pmullw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(pmullw, pmullw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(pmullw, pmullw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT); return MAKE_INSN2(pmullw, pmullw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xD6: {
         switch (mmPrefix()) {
           case mmNone: throw BadInstruction();
-          case mmF3: getModRegRM(rmMM, rmXMM, SgAsmTypeQuadWord::createType(), SgAsmTypeDoubleQuadWord::createType()); if (modeField == 3) return MAKE_INSN2(movq2dq, movq2dq, reg, modrm); else throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeQuadWord::createType()); return MAKE_INSN2(movq, movq, modrm, reg);
-          case mmF2: getModRegRM(rmXMM, rmMM, SgAsmTypeDoubleQuadWord::createType(), SgAsmTypeQuadWord::createType()); if (modeField == 3) return MAKE_INSN2(movdq2q, movdq2q, reg, modrm); else throw BadInstruction();
+          case mmF3: getModRegRM(rmMM, rmXMM, QWORDT, DQWORDT); if (modeField == 3) return MAKE_INSN2(movq2dq, movq2dq, reg, modrm); else throw BadInstruction();
+          case mm66: getModRegRM(rmXMM, rmXMM, QWORDT); return MAKE_INSN2(movq, movq, modrm, reg);
+          case mmF2: getModRegRM(rmXMM, rmMM, DQWORDT, QWORDT); if (modeField == 3) return MAKE_INSN2(movdq2q, movdq2q, reg, modrm); else throw BadInstruction();
         }
       }
       case 0xD7: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmDWord, rmMM, SgAsmTypeVector::createType(8, SgAsmTypeByte::createType()), SgAsmTypeDoubleWord::createType()); if (modeField == 3) return MAKE_INSN2(pmovmskb, pmovmskb, reg, modrm); else throw BadInstruction();
+          case mmNone: getModRegRM(rmDWord, rmMM, V8BYTET, DWORDT); if (modeField == 3) return MAKE_INSN2(pmovmskb, pmovmskb, reg, modrm); else throw BadInstruction();
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmDWord, rmXMM, SgAsmTypeVector::createType(16, SgAsmTypeByte::createType()), SgAsmTypeDoubleWord::createType()); if (modeField == 3) return MAKE_INSN2(pmovmskb, pmovmskb, reg, modrm); else throw BadInstruction();
+          case mm66: getModRegRM(rmDWord, rmXMM, V16BYTET, DWORDT); if (modeField == 3) return MAKE_INSN2(pmovmskb, pmovmskb, reg, modrm); else throw BadInstruction();
           case mmF2: throw BadInstruction();
         }
       }
       case 0xD8: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(8, SgAsmTypeByte::createType())); return MAKE_INSN2(psubusb, psubusb, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V8BYTET); return MAKE_INSN2(psubusb, psubusb, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(16, SgAsmTypeByte::createType())); return MAKE_INSN2(psubusb, psubusb, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V16BYTET); return MAKE_INSN2(psubusb, psubusb, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xD9: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(psubusw, psubusw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(psubusw, psubusw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(psubusw, psubusw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT); return MAKE_INSN2(psubusw, psubusw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xDA: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(8, SgAsmTypeByte::createType())); return MAKE_INSN2(pminub, pminub, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V8BYTET); return MAKE_INSN2(pminub, pminub, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(16, SgAsmTypeByte::createType())); return MAKE_INSN2(pminub, pminub, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V16BYTET); return MAKE_INSN2(pminub, pminub, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xDB: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeQuadWord::createType()); return MAKE_INSN2(pand, pand, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, QWORDT); return MAKE_INSN2(pand, pand, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleQuadWord::createType()); return MAKE_INSN2(pand, pand, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, DQWORDT); return MAKE_INSN2(pand, pand, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xDC: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(8, SgAsmTypeByte::createType())); return MAKE_INSN2(paddusb, paddusb, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V8BYTET); return MAKE_INSN2(paddusb, paddusb, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(16, SgAsmTypeByte::createType())); return MAKE_INSN2(paddusb, paddusb, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V16BYTET); return MAKE_INSN2(paddusb, paddusb, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xDD: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(paddusw, paddusw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(paddusw, paddusw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(paddusw, paddusw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT); return MAKE_INSN2(paddusw, paddusw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xDE: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(8, SgAsmTypeByte::createType())); return MAKE_INSN2(pmaxub, pmaxub, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V8BYTET); return MAKE_INSN2(pmaxub, pmaxub, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(16, SgAsmTypeByte::createType())); return MAKE_INSN2(pmaxub, pmaxub, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V16BYTET); return MAKE_INSN2(pmaxub, pmaxub, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xDF: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeQuadWord::createType()); return MAKE_INSN2(pandn, pandn, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, QWORDT); return MAKE_INSN2(pandn, pandn, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleQuadWord::createType()); return MAKE_INSN2(pandn, pandn, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, DQWORDT); return MAKE_INSN2(pandn, pandn, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xE0: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(8, SgAsmTypeByte::createType())); return MAKE_INSN2(pavgb, pavgb, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V8BYTET); return MAKE_INSN2(pavgb, pavgb, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(16, SgAsmTypeByte::createType())); return MAKE_INSN2(pavgb, pavgb, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V16BYTET); return MAKE_INSN2(pavgb, pavgb, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xE1: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(psraw, psraw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(psraw, psraw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(psraw, psraw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT); return MAKE_INSN2(psraw, psraw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xE2: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(psrad, psrad, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V2DWORDT); return MAKE_INSN2(psrad, psrad, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(psrad, psrad, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V4DWORDT); return MAKE_INSN2(psrad, psrad, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xE3: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(pavgw, pavgw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(pavgw, pavgw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(pavgw, pavgw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT); return MAKE_INSN2(pavgw, pavgw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xE4: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(pmulhuw, pmulhuw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(pmulhuw, pmulhuw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(pmulhuw, pmulhuw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT); return MAKE_INSN2(pmulhuw, pmulhuw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xE5: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(pmulhw, pmulhw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(pmulhw, pmulhw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(pmulhw, pmulhw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT); return MAKE_INSN2(pmulhw, pmulhw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xE6: {
         switch (mmPrefix()) {
           case mmNone: throw BadInstruction();
-          case mmF3: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeQuadWord::createType()), SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType())); return MAKE_INSN2(cvtdq2pd, cvtdq2pd, reg, modrm);
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType()), SgAsmTypeVector::createType(2, SgAsmTypeQuadWord::createType())); return MAKE_INSN2(cvttpd2dq, cvttpd2dq, reg, modrm);
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleFloat::createType()), SgAsmTypeVector::createType(2, SgAsmTypeQuadWord::createType())); return MAKE_INSN2(cvtpd2dq, cvtpd2dq, reg, modrm);
+          case mmF3: getModRegRM(rmXMM, rmXMM, V2QWORDT, V2DOUBLET); return MAKE_INSN2(cvtdq2pd, cvtdq2pd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2DOUBLET, V2QWORDT); return MAKE_INSN2(cvttpd2dq, cvttpd2dq, reg, modrm);
+          case mmF2: getModRegRM(rmXMM, rmXMM, V2DOUBLET, V2QWORDT); return MAKE_INSN2(cvtpd2dq, cvtpd2dq, reg, modrm);
         }
       }
       case 0xE7: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeQuadWord::createType()); requireMemory(); return MAKE_INSN2(movntq, movntq, modrm, reg);
+          case mmNone: getModRegRM(rmMM, rmMM, QWORDT); requireMemory(); return MAKE_INSN2(movntq, movntq, modrm, reg);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleQuadWord::createType()); requireMemory(); return MAKE_INSN2(movntdq, movntdq, modrm, reg);
+          case mm66: getModRegRM(rmXMM, rmXMM, DQWORDT); requireMemory(); return MAKE_INSN2(movntdq, movntdq, modrm, reg);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xE8: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(8, SgAsmTypeByte::createType())); return MAKE_INSN2(psubsb, psubsb, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V8BYTET); return MAKE_INSN2(psubsb, psubsb, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(16, SgAsmTypeByte::createType())); return MAKE_INSN2(psubsb, psubsb, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V16BYTET); return MAKE_INSN2(psubsb, psubsb, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xE9: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(psubsw, psubsw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(psubsw, psubsw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(psubsw, psubsw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT); return MAKE_INSN2(psubsw, psubsw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xEA: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(pminsw, pminsw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(pminsw, pminsw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(pminsw, pminsw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT); return MAKE_INSN2(pminsw, pminsw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xEB: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeQuadWord::createType()); return MAKE_INSN2(por, por, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, QWORDT); return MAKE_INSN2(por, por, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleQuadWord::createType()); return MAKE_INSN2(por, por, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, DQWORDT); return MAKE_INSN2(por, por, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xEC: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(8, SgAsmTypeByte::createType())); return MAKE_INSN2(paddsb, paddsb, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V8BYTET); return MAKE_INSN2(paddsb, paddsb, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(16, SgAsmTypeByte::createType())); return MAKE_INSN2(paddsb, paddsb, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V16BYTET); return MAKE_INSN2(paddsb, paddsb, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xED: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(paddsw, paddsw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(paddsw, paddsw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(paddsw, paddsw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT); return MAKE_INSN2(paddsw, paddsw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xEE: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(pmaxsw, pmaxsw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(pmaxsw, pmaxsw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(pmaxsw, pmaxsw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT); return MAKE_INSN2(pmaxsw, pmaxsw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xEF: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeQuadWord::createType()); return MAKE_INSN2(pxor, pxor, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, QWORDT); return MAKE_INSN2(pxor, pxor, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleQuadWord::createType()); return MAKE_INSN2(pxor, pxor, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, DQWORDT); return MAKE_INSN2(pxor, pxor, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
@@ -2660,118 +2675,118 @@
           case mmNone: throw BadInstruction();
           case mmF3: throw BadInstruction();
           case mm66: throw BadInstruction();
-          case mmF2: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleQuadWord::createType()); requireMemory(); return MAKE_INSN2(lddqu, lddqu, reg, modrm);
+          case mmF2: getModRegRM(rmXMM, rmXMM, DQWORDT); requireMemory(); return MAKE_INSN2(lddqu, lddqu, reg, modrm);
         }
       }
       case 0xF1: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(psllw, psllw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(psllw, psllw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(psllw, psllw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT); return MAKE_INSN2(psllw, psllw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xF2: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(pslld, pslld, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V2DWORDT); return MAKE_INSN2(pslld, pslld, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(pslld, pslld, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V4DWORDT); return MAKE_INSN2(pslld, pslld, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xF3: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeQuadWord::createType()); return MAKE_INSN2(psllq, psllq, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, QWORDT); return MAKE_INSN2(psllq, psllq, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeQuadWord::createType())); return MAKE_INSN2(psllq, psllq, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2QWORDT); return MAKE_INSN2(psllq, psllq, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xF4: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType()), SgAsmTypeQuadWord::createType()); return MAKE_INSN2(pmuludq, pmuludq, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V2DWORDT, QWORDT); return MAKE_INSN2(pmuludq, pmuludq, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType()), SgAsmTypeVector::createType(2, SgAsmTypeQuadWord::createType())); return MAKE_INSN2(pmuludq, pmuludq, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V4DWORDT, V2QWORDT); return MAKE_INSN2(pmuludq, pmuludq, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xF5: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType()), SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(pmaddwd, pmaddwd, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT, V2DWORDT); return MAKE_INSN2(pmaddwd, pmaddwd, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType()), SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(pmaddwd, pmaddwd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT, V4DWORDT); return MAKE_INSN2(pmaddwd, pmaddwd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xF6: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(8, SgAsmTypeByte::createType()), SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(psadbw, psadbw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V8BYTET, V4WORDT); return MAKE_INSN2(psadbw, psadbw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(16, SgAsmTypeByte::createType()), SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(psadbw, psadbw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V16BYTET, V8WORDT); return MAKE_INSN2(psadbw, psadbw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xF7: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeQuadWord::createType()); if (modeField == 3) return MAKE_INSN2(movntq, movntq, reg, modrm); else throw BadInstruction();
+          case mmNone: getModRegRM(rmMM, rmMM, QWORDT); if (modeField == 3) return MAKE_INSN2(movntq, movntq, reg, modrm); else throw BadInstruction();
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeDoubleQuadWord::createType()); if (modeField == 3) return MAKE_INSN2(movntdq, movntdq, reg, modrm); else throw BadInstruction();
+          case mm66: getModRegRM(rmXMM, rmXMM, DQWORDT); if (modeField == 3) return MAKE_INSN2(movntdq, movntdq, reg, modrm); else throw BadInstruction();
           case mmF2: throw BadInstruction();
         }
       }
       case 0xF8: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(8, SgAsmTypeByte::createType())); return MAKE_INSN2(psubb, psubb, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V8BYTET); return MAKE_INSN2(psubb, psubb, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(16, SgAsmTypeByte::createType())); return MAKE_INSN2(psubb, psubb, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V16BYTET); return MAKE_INSN2(psubb, psubb, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xF9: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(psubw, psubw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(psubw, psubw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(psubw, psubw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT); return MAKE_INSN2(psubw, psubw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xFA: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(psubd, psubd, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V2DWORDT); return MAKE_INSN2(psubd, psubd, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(psubd, psubd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V4DWORDT); return MAKE_INSN2(psubd, psubd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xFB: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeQuadWord::createType()); return MAKE_INSN2(psubq, psubq, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, QWORDT); return MAKE_INSN2(psubq, psubq, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(2, SgAsmTypeQuadWord::createType())); return MAKE_INSN2(psubq, psubq, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V2QWORDT); return MAKE_INSN2(psubq, psubq, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xFC: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(8, SgAsmTypeByte::createType())); return MAKE_INSN2(paddb, paddb, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V8BYTET); return MAKE_INSN2(paddb, paddb, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(16, SgAsmTypeByte::createType())); return MAKE_INSN2(paddb, paddb, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V16BYTET); return MAKE_INSN2(paddb, paddb, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xFD: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(4, SgAsmTypeWord::createType())); return MAKE_INSN2(paddw, paddw, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V4WORDT); return MAKE_INSN2(paddw, paddw, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(8, SgAsmTypeWord::createType())); return MAKE_INSN2(paddw, paddw, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V8WORDT); return MAKE_INSN2(paddw, paddw, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
       case 0xFE: {
         switch (mmPrefix()) {
-          case mmNone: getModRegRM(rmMM, rmMM, SgAsmTypeVector::createType(2, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(paddd, paddd, reg, modrm);
+          case mmNone: getModRegRM(rmMM, rmMM, V2DWORDT); return MAKE_INSN2(paddd, paddd, reg, modrm);
           case mmF3: throw BadInstruction();
-          case mm66: getModRegRM(rmXMM, rmXMM, SgAsmTypeVector::createType(4, SgAsmTypeDoubleWord::createType())); return MAKE_INSN2(paddd, paddd, reg, modrm);
+          case mm66: getModRegRM(rmXMM, rmXMM, V4DWORDT); return MAKE_INSN2(paddd, paddd, reg, modrm);
           case mmF2: throw BadInstruction();
         }
       }
@@ -2876,7 +2891,7 @@
             default: throw BadInstruction();
           }
         } else {
-          fillInModRM(rmReturnNull, SgAsmTypeByte::createType() /* pseudo-descriptor */ );
+          fillInModRM(rmReturnNull, BYTET /* pseudo-descriptor */ );
           return MAKE_INSN1(sgdt, sgdt, modrm);
         }
       }
@@ -2888,7 +2903,7 @@
             default: throw BadInstruction();
           }
         } else {
-          fillInModRM(rmReturnNull, SgAsmTypeByte::createType() /* pseudo-descriptor */ );
+          fillInModRM(rmReturnNull, BYTET /* pseudo-descriptor */ );
           return MAKE_INSN1(sidt, sidt, modrm);
         }
       }
@@ -2900,7 +2915,7 @@
             default: throw BadInstruction();
           }
         } else {
-          fillInModRM(rmReturnNull, SgAsmTypeByte::createType() /* pseudo-descriptor */ );
+          fillInModRM(rmReturnNull, BYTET /* pseudo-descriptor */ );
           return MAKE_INSN1(lgdt, lgdt, modrm);
         }
       }
@@ -2918,17 +2933,17 @@
             default: ROSE_ASSERT (false);
           }
         } else {
-          fillInModRM(rmReturnNull, SgAsmTypeByte::createType() /* pseudo-descriptor */ );
+          fillInModRM(rmReturnNull, BYTET /* pseudo-descriptor */ );
           return MAKE_INSN1(lidt, lidt, modrm);
         }
       }
       case 4: {
-        fillInModRM(effectiveOperandMode(), SgAsmTypeWord::createType());
+        fillInModRM(effectiveOperandMode(), WORDT);
         return MAKE_INSN1(smsw, smsw, modrm);
       }
       case 5: throw BadInstruction();
       case 6: {
-        fillInModRM(rmWord, SgAsmTypeWord::createType());
+        fillInModRM(rmWord, WORDT);
         return MAKE_INSN1(lmsw, lmsw, modrm);
       }
       case 7: {
@@ -2939,7 +2954,7 @@
             default: throw BadInstruction();
           }
         } else {
-          fillInModRM(rmReturnNull, SgAsmTypeByte::createType());
+          fillInModRM(rmReturnNull, BYTET);
           return MAKE_INSN1(invlpg, invlpg, modrm);
         }
       }
@@ -2971,11 +2986,11 @@
   SgAsmx86Instruction* SingleInstructionDisassembler::decodeGroup15() {
     getModRegRM(rmReturnNull, rmReturnNull, NULL);
     switch (regField) {
-      case 0: requireMemory(); fillInModRM(rmReturnNull, SgAsmTypeByte::createType()); return MAKE_INSN1(fxsave, fxsave, modrm);
-      case 1: requireMemory(); fillInModRM(rmReturnNull, SgAsmTypeByte::createType()); return MAKE_INSN1(fxrstor, fxrstor, modrm);
-      case 2: requireMemory(); fillInModRM(rmReturnNull, SgAsmTypeDoubleWord::createType()); return MAKE_INSN1(ldmxcsr, ldmxcsr, modrm);
-      case 3: requireMemory(); fillInModRM(rmReturnNull, SgAsmTypeDoubleWord::createType()); return MAKE_INSN1(stmxcsr, stmxcsr, modrm);
-      case 4: requireMemory(); fillInModRM(rmReturnNull, SgAsmTypeByte::createType()); return MAKE_INSN1(xsave, xsave, modrm);
+      case 0: requireMemory(); fillInModRM(rmReturnNull, BYTET); return MAKE_INSN1(fxsave, fxsave, modrm);
+      case 1: requireMemory(); fillInModRM(rmReturnNull, BYTET); return MAKE_INSN1(fxrstor, fxrstor, modrm);
+      case 2: requireMemory(); fillInModRM(rmReturnNull, DWORDT); return MAKE_INSN1(ldmxcsr, ldmxcsr, modrm);
+      case 3: requireMemory(); fillInModRM(rmReturnNull, DWORDT); return MAKE_INSN1(stmxcsr, stmxcsr, modrm);
+      case 4: requireMemory(); fillInModRM(rmReturnNull, BYTET); return MAKE_INSN1(xsave, xsave, modrm);
       case 5: if (modeField == 3) return MAKE_INSN0(lfence, lfence); else return MAKE_INSN1(xrstor, xrstor, modrm);
       case 6: if (modeField == 3) return MAKE_INSN0(mfence, mfence); else throw BadInstruction();
       case 7: if (modeField == 3) return MAKE_INSN0(sfence, sfence); else return MAKE_INSN1(clflush, clflush, modrm);
@@ -2995,7 +3010,7 @@
   }
 
   SgAsmx86Instruction* SingleInstructionDisassembler::decodeGroupP() {
-    getModRegRM(rmReturnNull, rmLegacyByte, SgAsmTypeByte::createType());
+    getModRegRM(rmReturnNull, rmLegacyByte, BYTET);
     requireMemory();
     switch (regField) {
       case 0: return MAKE_INSN1(prefetch, prefetch, modrm);
@@ -3005,29 +3020,6 @@
     }
   }
 
-  static bool is_mov_edi_edi(SgAsmStatement* insnx) {
-    SgAsmx86Instruction* insn = isSgAsmx86Instruction(insnx);
-    if (!insn) return false;
-    if (insn->get_kind() != x86_mov) return false;
-    const SgAsmExpressionPtrList& operands = insn->get_operandList()->get_operands();
-    if (operands.size() != 2) return false;
-    SgAsmx86RegisterReferenceExpression* rr0 = isSgAsmx86RegisterReferenceExpression(operands[0]);
-    if (!rr0) return false;
-    SgAsmx86RegisterReferenceExpression* rr1 = isSgAsmx86RegisterReferenceExpression(operands[1]);
-    if (!rr1) return false;
-    if (rr0->get_register_class() != x86_regclass_gpr ||
-        rr0->get_register_number() != x86_gpr_di ||
-        (rr0->get_position_in_register() != x86_regpos_all &&
-         rr0->get_position_in_register() != x86_regpos_dword))
-      return false;
-    if (rr1->get_register_class() != x86_regclass_gpr ||
-        rr1->get_register_number() != x86_gpr_di ||
-        (rr1->get_position_in_register() != x86_regpos_all &&
-         rr1->get_position_in_register() != x86_regpos_dword))
-      return false;
-    return true;
-  }
-
   static bool is_push_ebp(SgAsmStatement* insnx, bool reg64) {
     SgAsmx86Instruction* insn = isSgAsmx86Instruction(insnx);
     if (!insn) return false;

Modified: branches/testonly/src/frontend/ExecFormats/ROSE_ExecDOS.C
===================================================================
--- branches/testonly/src/frontend/ExecFormats/ROSE_ExecDOS.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/ExecFormats/ROSE_ExecDOS.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -69,7 +69,7 @@
 
 /* Encode the DOS file header into disk format */
 void *
-SgAsmDOSFileHeader::encode(DOSFileHeader_disk *disk)
+SgAsmDOSFileHeader::encode(DOSFileHeader_disk *disk) const
 {
     for (size_t i=0; i<NELMTS(disk->e_magic); i++)
         disk->e_magic[i] = get_magic()[i];
@@ -93,9 +93,8 @@
 
 /* Write the DOS file header back to disk */
 void
-SgAsmDOSFileHeader::unparse(FILE *f)
+SgAsmDOSFileHeader::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
     DOSFileHeader_disk disk;
     encode(&disk);
     write(f, 0, sizeof(disk), &disk);

Modified: branches/testonly/src/frontend/ExecFormats/ROSE_ExecELF.C
===================================================================
--- branches/testonly/src/frontend/ExecFormats/ROSE_ExecELF.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/ExecFormats/ROSE_ExecELF.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -69,6 +69,7 @@
     }
     ROSE_ASSERT(p_exec_format != NULL);
     p_exec_format->set_sex(sex);
+    p_e_ident_data_encoding = disk32.e_ident_data_encoding; /*save original value*/
 
     /* Decode header to native format */
     addr_t entry_rva;
@@ -225,11 +226,8 @@
         break;
       default:
         /*FIXME: There's a whole lot more. See Dan's Elf reader. */
-
-     // DQ (10/12/2008): Need more information to address PowerPC support.
-        printf ("Warning: p_e_machine = %lu = 0x%lx \n",p_e_machine,p_e_machine);
-
-
+        // DQ (10/12/2008): Need more information to address PowerPC support.
+        fprintf(stderr, "Warning: SgAsmElfFileHeader::ctor::p_e_machine = 0x%lx (%lu)\n", p_e_machine, p_e_machine);
         set_isa(ISA_OTHER);
         break;
     }
@@ -257,24 +255,37 @@
     return 4*1024;
 }
 
-/* Override ROSETTA version of accessors so the set_* functions check that we're still parsing. It should not be possible to
- * modify these values after parsing. */
-void
-SgAsmElfFileHeader::set_e_shoff(addr_t addr)
+/* Get the list of sections defined in the ELF Section Table */
+SgAsmGenericSectionPtrList
+SgAsmElfFileHeader::get_sectab_sections()
 {
-    ROSE_ASSERT(!get_congealed()); /*must be still parsing*/
-    p_e_shoff = addr;
+    SgAsmGenericSectionPtrList retval;
+    SgAsmGenericSectionPtrList sections = get_sections()->get_sections();
+    for (size_t i=0; i<sections.size(); i++) {
+        SgAsmElfSection *elfsec = dynamic_cast<SgAsmElfSection*>(sections[i]);
+        if (elfsec && elfsec->get_section_entry()!=NULL)
+            retval.push_back(elfsec);
+    }
+    return retval;
 }
-void
-SgAsmElfFileHeader::set_e_phoff(addr_t addr)
+
+/* Get the list of sections defined in the ELF Segment Table */
+SgAsmGenericSectionPtrList
+SgAsmElfFileHeader::get_segtab_sections()
 {
-    ROSE_ASSERT(!get_congealed()); /*must be still parsing*/
-    p_e_phoff = addr;
+    SgAsmGenericSectionPtrList retval;
+    SgAsmGenericSectionPtrList sections = get_sections()->get_sections();
+    for (size_t i=0; i<sections.size(); i++) {
+        SgAsmElfSection *elfsec = dynamic_cast<SgAsmElfSection*>(sections[i]);
+        if (elfsec && elfsec->get_segment_entry()!=NULL)
+            retval.push_back(elfsec);
+    }
+    return retval;
 }
 
 /* Encode Elf header disk structure */
 void *
-SgAsmElfFileHeader::encode(ByteOrder sex, Elf32FileHeader_disk *disk)
+SgAsmElfFileHeader::encode(ByteOrder sex, Elf32FileHeader_disk *disk) const
 {
     ROSE_ASSERT(p_magic.size() == NELMTS(disk->e_ident_magic));
     for (size_t i=0; i<NELMTS(disk->e_ident_magic); i++)
@@ -294,8 +305,19 @@
     }
     host_to_disk(sex, ident_file_class, &(disk->e_ident_file_class));
 
-    unsigned data_encoding = ORDER_LSB==get_sex() ? 1 : 2;
+    /* Byte order. According to the spec, valid values are 1 (little-endian) and 2 (big-endian). However, we've seen cases
+     * where a value of zero is used to indicate "native" order (loader assumes words are in the order of the machine on which
+     * the loader is running, and the ROSE ELF parser determines the order by looking at other fields in the header). Any
+     * original value other than 1 or 2 will be written to the new output; otherwise we choose 1 or 2 based on the currently
+     * defined byte order. */
+    unsigned data_encoding;
+    if (p_e_ident_data_encoding==1 || p_e_ident_data_encoding==2) {
+        data_encoding = ORDER_LSB==get_sex() ? 1 : 2;
+    } else {
+        data_encoding = p_e_ident_data_encoding;
+    }
     host_to_disk(sex, data_encoding, &(disk->e_ident_data_encoding));
+
     host_to_disk(sex, p_e_ident_file_version,  &(disk->e_ident_file_version));
     ROSE_ASSERT(p_e_ident_padding.size() == NELMTS(disk->e_ident_padding));
     for (size_t i=0; i<NELMTS(disk->e_ident_padding); i++)
@@ -326,7 +348,7 @@
     return disk;
 }
 void *
-SgAsmElfFileHeader::encode(ByteOrder sex, Elf64FileHeader_disk *disk)
+SgAsmElfFileHeader::encode(ByteOrder sex, Elf64FileHeader_disk *disk) const
 {
     ROSE_ASSERT(p_magic.size() == NELMTS(disk->e_ident_magic));
     for (size_t i=0; i < NELMTS(disk->e_ident_magic); i++)
@@ -369,26 +391,32 @@
     return disk;
 }
 
-/* Change size of ELF header based on word size */
+/* Update prior to parsing */
 bool
 SgAsmElfFileHeader::reallocate()
 {
+
+    /* Reallocate superclass. This also calls reallocate() for all the sections associated with this ELF File Header. */
     bool reallocated = SgAsmGenericHeader::reallocate();
 
-    addr_t newsize;
+    /* Resize header based on current word size */
+    addr_t need;
     if (4==get_word_size()) {
-        newsize = sizeof(Elf32FileHeader_disk);
+        need = sizeof(Elf32FileHeader_disk);
     } else if (8==get_word_size()) {
-        newsize = sizeof(Elf64FileHeader_disk);
+        need = sizeof(Elf64FileHeader_disk);
     } else {
         throw FormatError("unsupported ELF word size");
     }
-
-    if (newsize > get_size()) {
-        ROSE_ASSERT(!"increasing ELF header size not supported yet"); /*FIXME*/
+    if (need < get_size()) {
+        if (is_mapped()) {
+            ROSE_ASSERT(get_mapped_size()==get_size());
+            set_mapped_size(need);
+        }
+        set_size(need);
         reallocated = true;
-    } else if (newsize < get_size()) {
-        set_size(newsize);
+    } else if (need > get_size()) {
+        get_file()->shift_extend(this, 0, need-get_size(), SgAsmGenericFile::ADDRSP_ALL, SgAsmGenericFile::ELASTIC_HOLE);
         reallocated = true;
     }
 
@@ -397,11 +425,8 @@
 
 /* Write ELF contents back to a file. */
 void
-SgAsmElfFileHeader::unparse(FILE *f)
+SgAsmElfFileHeader::unparse(std::ostream &f) const
 {
-    /* Allow sections to reallocate themselves until things settle */
-    while (reallocate()) /*void*/;
-
     /* Write unreferenced areas back to the file before anything else. */
     unparse_holes(f);
 
@@ -410,14 +435,12 @@
     if (p_segment_table) {
         ROSE_ASSERT(p_segment_table->get_header()==this);
         p_segment_table->unparse(f);
-        p_e_phoff = p_segment_table->get_offset();
     }
 
     /* Write the ELF section table and, indirectly, the sections themselves. */
     if (p_section_table) {
         ROSE_ASSERT(p_section_table->get_header()==this);
         p_section_table->unparse(f);
-        p_e_shoff = p_section_table->get_offset();
     }
     
     /* Encode and write the ELF file header */
@@ -435,6 +458,14 @@
         ROSE_ASSERT(!"unsupported word size");
     }
     write(f, p_offset, struct_size, disk);
+
+    /* Extend the file to the full size */
+    f.seekp(0, std::ios::end);
+    if (f.tellp()<(off_t)get_file()->get_current_size()) {
+        f.seekp(get_file()->get_current_size()-1);
+        const char zero = '\0';
+        f.write(&zero, 1);
+    }
 }
 
 /* Print some debugging info */
@@ -476,6 +507,14 @@
 // Sections
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
+/* Constructor for sections that are in neither the ELF Section Table nor the ELF Segment Table yet (but eventually will be) */
+void
+SgAsmElfSection::ctor()
+{
+    set_synthesized(false);
+    set_purpose(SP_UNSPECIFIED);
+}
+
 /* Constructor for sections defined in the ELF Section Table */
 void
 SgAsmElfSection::ctor(SgAsmElfSectionTableEntry *shdr)
@@ -540,6 +579,13 @@
     set_mapped_xperm(shdr->get_flags() & SgAsmElfSegmentTableEntry::PF_XPERM ? true : false);
 }
 
+/* Just a convenience function so we don't need to constantly cast the return value from get_header() */
+SgAsmElfFileHeader*
+SgAsmElfSection::get_elf_header() const
+{
+    return dynamic_cast<SgAsmElfFileHeader*>(get_header());
+}
+
 /* Returns info about the size of the entries based on information already available. Any or all arguments may be null
  * pointers if the caller is not interested in the value. Return values are:
  *
@@ -561,7 +607,7 @@
 rose_addr_t
 SgAsmElfSection::calculate_sizes(size_t r32size, size_t r64size,       /*size of required parts*/
                                  const std::vector<size_t> &optsizes,  /*size of optional parts and number of parts parsed*/
-                                 size_t *entsize, size_t *required, size_t *optional, size_t *entcount)
+                                 size_t *entsize, size_t *required, size_t *optional, size_t *entcount) const
 {
     size_t struct_size = 0;
     size_t extra_size = 0;
@@ -626,31 +672,41 @@
  * The return size is entsize*entcount, which, if this section is a table (nonzero sh_entsize), could be smaller than the
  * total size of the section. */
 rose_addr_t
-SgAsmElfSection::calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount)
+SgAsmElfSection::calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount) const
 {
     return calculate_sizes(0, 0, std::vector<size_t>(), entsize, required, optional, entcount);
 }
 
-/* Resize the section based on ELF word size. This is a no-op unless the section was defined in the ELF Section Table. */
+/* Called prior to unparse to make things consistent. */
 bool
 SgAsmElfSection::reallocate()
 {
-    if (get_section_entry()==NULL)
-        return false;
+    bool reallocated = false;
+    SgAsmElfSectionTableEntry *sechdr = get_section_entry();
+    SgAsmElfSegmentTableEntry *seghdr = get_segment_entry();
 
-    bool reallocated = false;
-    addr_t need = calculate_sizes(NULL, NULL, NULL, NULL);
-    if (need < get_size()) {
-        if (is_mapped()) {
-            ROSE_ASSERT(get_mapped_size()==get_size());
-            set_mapped_size(need);
+    /* Change section size if this section was defined in the ELF Section Table */
+    if (sechdr!=NULL) {
+        addr_t need = calculate_sizes(NULL, NULL, NULL, NULL);
+        if (need < get_size()) {
+            if (is_mapped()) {
+                ROSE_ASSERT(get_mapped_size()==get_size());
+                set_mapped_size(need);
+            }
+            set_size(need);
+            reallocated = true;
+        } else if (need > get_size()) {
+            get_file()->shift_extend(this, 0, need-get_size(), SgAsmGenericFile::ADDRSP_ALL, SgAsmGenericFile::ELASTIC_HOLE);
+            reallocated = true;
         }
-        set_size(need);
-        reallocated = true;
+    }
 
-    } else if (need > get_size()) {
-        ROSE_ASSERT(!"can't expand word size yet"); /*FIXME*/
-    }
+    /* Update entry in the ELF Section Table and/or ELF Segment Table */
+    if (sechdr)
+        sechdr->update_from_section(this);
+    if (seghdr)
+        seghdr->update_from_section(this);
+    
     return reallocated;
 }
 
@@ -704,14 +760,16 @@
 bool
 SgAsmElfStringSection::reallocate()
 {
-    return get_strtab()->reallocate(false);
+    bool reallocated = SgAsmElfSection::reallocate();
+    if (get_strtab()->reallocate(false))
+        reallocated = true;
+    return reallocated;
 }
 
 /* Unparse an ElfStringSection by unparsing the ElfStrtab */
 void
-SgAsmElfStringSection::unparse(FILE *f)
+SgAsmElfStringSection::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
     get_strtab()->unparse(f);
     unparse_holes(f);
 }
@@ -872,10 +930,9 @@
 
 /* Write string table back to disk. Free space is zeroed out; holes are left as they are. */
 void
-SgAsmElfStrtab::unparse(FILE *f)
+SgAsmElfStrtab::unparse(std::ostream &f) const
 {
     SgAsmGenericSection *container = get_container();
-    ROSE_ASSERT(0==reallocate(false)); /*should have been called well before any unparsing started*/
     
     /* Write strings with NUL termination. Shared strings will be written more than once, but that's OK. */
     for (size_t i=0; i<p_storage_list.size(); i++) {
@@ -900,7 +957,7 @@
 SgAsmElfSectionTableEntry::ctor(ByteOrder sex, const Elf32SectionTableEntry_disk *disk) 
 {
     p_sh_name      = disk_to_host(sex, disk->sh_name);
-    p_sh_type      = disk_to_host(sex, disk->sh_type);
+    p_sh_type      = (SectionType)disk_to_host(sex, disk->sh_type);
     p_sh_flags     = disk_to_host(sex, disk->sh_flags);
     p_sh_addr      = disk_to_host(sex, disk->sh_addr);
     p_sh_offset    = disk_to_host(sex, disk->sh_offset);
@@ -916,7 +973,7 @@
 SgAsmElfSectionTableEntry::ctor(ByteOrder sex, const Elf64SectionTableEntry_disk *disk) 
 {
     p_sh_name      = disk_to_host(sex, disk->sh_name);
-    p_sh_type      = disk_to_host(sex, disk->sh_type);
+    p_sh_type      = (SectionType)disk_to_host(sex, disk->sh_type);
     p_sh_flags     = disk_to_host(sex, disk->sh_flags);
     p_sh_addr      = disk_to_host(sex, disk->sh_addr);
     p_sh_offset    = disk_to_host(sex, disk->sh_offset);
@@ -929,7 +986,7 @@
 
 /* Encode a section table entry into the disk structure */
 void *
-SgAsmElfSectionTableEntry::encode(ByteOrder sex, Elf32SectionTableEntry_disk *disk)
+SgAsmElfSectionTableEntry::encode(ByteOrder sex, Elf32SectionTableEntry_disk *disk) const
 {
     host_to_disk(sex, p_sh_name,      &(disk->sh_name));
     host_to_disk(sex, p_sh_type,      &(disk->sh_type));
@@ -945,7 +1002,7 @@
     return disk;
 }
 void *
-SgAsmElfSectionTableEntry::encode(ByteOrder sex, Elf64SectionTableEntry_disk *disk)
+SgAsmElfSectionTableEntry::encode(ByteOrder sex, Elf64SectionTableEntry_disk *disk) const
 {
     host_to_disk(sex, p_sh_name,      &(disk->sh_name));
     host_to_disk(sex, p_sh_type,      &(disk->sh_type));
@@ -979,7 +1036,7 @@
 
     /* Change the section size to include all the entries */
     ROSE_ASSERT(0==get_size());
-    extend(nentries * ent_size);
+    extend_up_to(nentries * ent_size);
 
     /* Read all the section headers. */
     std::vector<SgAsmElfSectionTableEntry*> entries;
@@ -987,13 +1044,13 @@
     for (size_t i=0; i<nentries; i++, offset+=ent_size) {
         SgAsmElfSectionTableEntry *shdr = NULL;
         if (4 == fhdr->get_word_size()) {
-            const SgAsmElfSectionTableEntry::Elf32SectionTableEntry_disk *disk =
-                (const SgAsmElfSectionTableEntry::Elf32SectionTableEntry_disk*)content(offset, ent_size);
-            shdr = new SgAsmElfSectionTableEntry(sex, disk);
+            SgAsmElfSectionTableEntry::Elf32SectionTableEntry_disk disk;
+            content(offset, ent_size, &disk);
+            shdr = new SgAsmElfSectionTableEntry(sex, &disk);
         } else {
-            const SgAsmElfSectionTableEntry::Elf64SectionTableEntry_disk *disk =
-                (const SgAsmElfSectionTableEntry::Elf64SectionTableEntry_disk*)content(offset, ent_size);
-            shdr = new SgAsmElfSectionTableEntry(sex, disk);
+            SgAsmElfSectionTableEntry::Elf64SectionTableEntry_disk disk;
+            content(offset, ent_size, &disk);
+            shdr = new SgAsmElfSectionTableEntry(sex, &disk);
         }
         if (opt_size>0)
             shdr->get_extra() = content_ucl(offset+struct_size, opt_size);
@@ -1066,10 +1123,46 @@
     }
 }
 
+/* Attaches a previously unattached ELF Section to the section table. */
+void
+SgAsmElfSectionTable::add_section(SgAsmElfSection *section)
+{
+    ROSE_ASSERT(section!=NULL);
+    ROSE_ASSERT(section->get_file()==get_file());
+    ROSE_ASSERT(section->get_header()==get_header());
+    ROSE_ASSERT(section->get_section_entry()==NULL);            /* must not be in the section table yet */
+    
+    SgAsmElfFileHeader *fhdr = dynamic_cast<SgAsmElfFileHeader*>(get_header());
+    ROSE_ASSERT(fhdr!=NULL);
+
+    /* Create a new section table entry. It is constructed as all zero but will be filled in during reallocate() */
+    SgAsmElfSectionTableEntry *shdr = new SgAsmElfSectionTableEntry;
+    section->set_section_entry(shdr);
+
+    /* Assign an ID if there isn't one yet */
+    if (section->get_id()<0) {
+        int id = fhdr->get_e_shnum();
+        fhdr->set_e_shnum(id+1);
+        section->set_id(id);
+    }
+    
+    /* Make sure the name is in the correct string table */
+    SgAsmElfStringSection *strsec = dynamic_cast<SgAsmElfStringSection*>(fhdr->get_section_by_id(fhdr->get_e_shstrndx()));
+    ROSE_ASSERT(strsec!=NULL);
+    std::string name;
+    if (section->get_name()) {
+        name = section->get_name()->get_string();
+        section->get_name()->set_string(""); /*frees old string if stored*/
+    }
+    SgAsmStoredString *stored_name = new SgAsmStoredString(strsec->get_strtab(), 0);
+    stored_name->set_string(name);
+    section->set_name(stored_name);
+}
+
 /* Returns info about the size of the entries based on information already available. Any or all arguments may be null
  * pointers if the caller is not interested in the value. */
 rose_addr_t
-SgAsmElfSectionTable::calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount)
+SgAsmElfSectionTable::calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount) const
 {
     SgAsmElfFileHeader *fhdr = dynamic_cast<SgAsmElfFileHeader*>(get_header());
     ROSE_ASSERT(fhdr!=NULL);
@@ -1159,6 +1252,34 @@
     }
 }
 
+/* Change symbol to string */
+const char *
+SgAsmElfSectionTableEntry::to_string(SectionType t)
+{
+    switch (t) {
+      case SHT_NULL:     return "SHT_NULL";
+      case SHT_PROGBITS: return "SHT_PROGBITS";
+      case SHT_SYMTAB:   return "SHT_SYMTAB";
+      case SHT_STRTAB:   return "SHT_STRTAB";
+      case SHT_RELA:     return "SHT_RELA";
+      case SHT_HASH:     return "SHT_HASH";
+      case SHT_DYNAMIC:  return "SHT_DYNAMIC";
+      case SHT_NOTE:     return "SHT_NOTE";
+      case SHT_NOBITS:   return "SHT_NOBITS";
+      case SHT_REL:      return "SHT_REL";
+      case SHT_SHLIB:    return "SHT_SHLIB";
+      case SHT_DYNSYM:   return "SHT_DYNSYM";
+      default:
+        if (t>=SHT_LOPROC && t<=SHT_HIPROC) {
+            return "processor-specific";
+        } else if (t>=SHT_LOUSER && t<=SHT_HIUSER) {
+            return "application-specific";
+        } else {
+            return "unknown";
+        }
+    }
+}
+
 /* Print some debugging info */
 void
 SgAsmElfSectionTableEntry::dump(FILE *f, const char *prefix, ssize_t idx)
@@ -1172,7 +1293,8 @@
     const int w = std::max(1, DUMP_FIELD_WIDTH-(int)strlen(p));
     
     fprintf(f, "%s%-*s = %u bytes into strtab\n",                      p, w, "sh_name",        p_sh_name);
-    fprintf(f, "%s%-*s = %lu\n",                                       p, w, "sh_type",        p_sh_type);
+    fprintf(f, "%s%-*s = 0x%x (%d) %s\n",                              p, w, "sh_type", 
+            p_sh_type, p_sh_type, to_string(p_sh_type));
     fprintf(f, "%s%-*s = %lu\n",                                       p, w, "sh_link",        p_sh_link);
     fprintf(f, "%s%-*s = %lu\n",                                       p, w, "sh_info",        p_sh_info);
     fprintf(f, "%s%-*s = 0x%08"PRIx64"\n",                             p, w, "sh_flags",       p_sh_flags);
@@ -1187,12 +1309,15 @@
     }
 }
 
-/* Resize the section table based on ELF word size */
+/* Pre-unparsing updates */
 bool
 SgAsmElfSectionTable::reallocate()
 {
     bool reallocated = false;
-    addr_t need = calculate_sizes(NULL, NULL, NULL, NULL);
+
+    /* Resize based on word size from ELF File Header */
+    size_t opt_size, nentries;
+    addr_t need = calculate_sizes(NULL, NULL, &opt_size, &nentries);
     if (need < get_size()) {
         if (is_mapped()) {
             ROSE_ASSERT(get_mapped_size()==get_size());
@@ -1202,63 +1327,68 @@
         reallocated = true;
         
     } else if (need > get_size()) {
-        ROSE_ASSERT(!"can't expand word size yet"); /*FIXME*/
+        get_file()->shift_extend(this, 0, need-get_size(), SgAsmGenericFile::ADDRSP_ALL, SgAsmGenericFile::ELASTIC_HOLE);
+        reallocated = true;
     }
+
+    /* Update data members in the ELF File Header. No need to return true for these changes. */
+    SgAsmElfFileHeader *fhdr = dynamic_cast<SgAsmElfFileHeader*>(get_header());
+    fhdr->set_e_shoff(get_offset());
+    fhdr->set_shextrasz(opt_size);
+    fhdr->set_e_shnum(nentries);
+
     return reallocated;
 }
 
 /* Write the section table section back to disk */
 void
-SgAsmElfSectionTable::unparse(FILE *f)
+SgAsmElfSectionTable::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
-
     SgAsmElfFileHeader *fhdr = dynamic_cast<SgAsmElfFileHeader*>(get_header());
     ROSE_ASSERT(fhdr!=NULL);
     ByteOrder sex = fhdr->get_sex();
-    SgAsmGenericSectionPtrList sections = fhdr->get_sections()->get_sections();
+    SgAsmGenericSectionPtrList sections = fhdr->get_sectab_sections();
 
     /* Write the sections first */
-    for (size_t i=0; i<sections.size(); i++) {
-        if (sections[i]->get_id() >= 0) {
-            sections[i]->unparse(f);
-        }
-    }
+    for (size_t i=0; i<sections.size(); i++)
+        sections[i]->unparse(f);
 
-    /* Calculate sizes and update the ELF File Header */
+    /* Calculate sizes. The ELF File Header should have been updated in reallocate() prior to unparsing. */
     size_t ent_size, struct_size, opt_size, nentries;
     calculate_sizes(&ent_size, &struct_size, &opt_size, &nentries);
-    fhdr->set_shextrasz(opt_size);
-    fhdr->set_e_shnum(nentries);
+    ROSE_ASSERT(fhdr->get_e_shoff()==get_offset());
+    ROSE_ASSERT(fhdr->get_shextrasz()==opt_size);
+    ROSE_ASSERT(fhdr->get_e_shnum()==nentries);
     
     /* Write the section table entries */
     for (size_t i=0; i<sections.size(); ++i) {
         SgAsmElfSection *section = dynamic_cast<SgAsmElfSection*>(sections[i]);
-        SgAsmElfSectionTableEntry *shdr = section ? section->get_section_entry() : NULL;
-        if (shdr) {
-            shdr->update_from_section(section);
-            int id = section->get_id();
-            ROSE_ASSERT(id>=0 && (size_t)id<nentries);
+        ROSE_ASSERT(section!=NULL);
+        SgAsmElfSectionTableEntry *shdr = section->get_section_entry();
+        ROSE_ASSERT(shdr!=NULL);
+        ROSE_ASSERT(shdr->get_sh_offset()==section->get_offset()); /*section table entry should have been updated in reallocate()*/
 
-            SgAsmElfSectionTableEntry::Elf32SectionTableEntry_disk disk32;
-            SgAsmElfSectionTableEntry::Elf64SectionTableEntry_disk disk64;
-            void *disk  = NULL;
+        int id = section->get_id();
+        ROSE_ASSERT(id>=0 && (size_t)id<nentries);
 
-            if (4==fhdr->get_word_size()) {
-                disk = shdr->encode(sex, &disk32);
-            } else if (8==fhdr->get_word_size()) {
-                disk = shdr->encode(sex, &disk64);
-            } else {
-                ROSE_ASSERT(!"invalid word size");
-            }
+        SgAsmElfSectionTableEntry::Elf32SectionTableEntry_disk disk32;
+        SgAsmElfSectionTableEntry::Elf64SectionTableEntry_disk disk64;
+        void *disk  = NULL;
 
-            /* The disk struct */
-            addr_t spos = write(f, id*ent_size, struct_size, disk);
-            if (shdr->get_extra().size() > 0) {
-                ROSE_ASSERT(shdr->get_extra().size()<=opt_size);
-                write(f, spos, shdr->get_extra());
-            }
+        if (4==fhdr->get_word_size()) {
+            disk = shdr->encode(sex, &disk32);
+        } else if (8==fhdr->get_word_size()) {
+            disk = shdr->encode(sex, &disk64);
+        } else {
+            ROSE_ASSERT(!"invalid word size");
         }
+
+        /* The disk struct */
+        addr_t spos = write(f, id*ent_size, struct_size, disk);
+        if (shdr->get_extra().size() > 0) {
+            ROSE_ASSERT(shdr->get_extra().size()<=opt_size);
+            write(f, spos, shdr->get_extra());
+        }
     }
 
     unparse_holes(f);
@@ -1316,7 +1446,7 @@
 
 /* Converts segment table entry back into disk structure */
 void *
-SgAsmElfSegmentTableEntry::encode(ByteOrder sex, Elf32SegmentTableEntry_disk *disk)
+SgAsmElfSegmentTableEntry::encode(ByteOrder sex, Elf32SegmentTableEntry_disk *disk) const
 {
     host_to_disk(sex, p_type, &(disk->p_type));
     host_to_disk(sex, p_offset, &(disk->p_offset));
@@ -1329,7 +1459,7 @@
     return disk;
 }
 void *
-SgAsmElfSegmentTableEntry::encode(ByteOrder sex, Elf64SegmentTableEntry_disk *disk)
+SgAsmElfSegmentTableEntry::encode(ByteOrder sex, Elf64SegmentTableEntry_disk *disk) const
 {
     host_to_disk(sex, p_type, &(disk->p_type));
     host_to_disk(sex, p_offset, &(disk->p_offset));
@@ -1408,21 +1538,38 @@
     std::string s;
 
     switch (kind) {
-      case SgAsmElfSegmentTableEntry::PT_NULL:    s = "PT_NULL";    break;
-      case SgAsmElfSegmentTableEntry::PT_LOAD:    s = "PT_LOAD";    break;
-      case SgAsmElfSegmentTableEntry::PT_DYNAMIC: s = "PT_DYNAMIC"; break;
-      case SgAsmElfSegmentTableEntry::PT_INTERP:  s = "PT_INTERP";  break;
-      case SgAsmElfSegmentTableEntry::PT_NOTE:    s = "PT_NOTE";    break;
-      case SgAsmElfSegmentTableEntry::PT_SHLIB:   s = "PT_SHLIB";   break;
-      case SgAsmElfSegmentTableEntry::PT_PHDR:    s = "PT_PHDR";    break;
-      case SgAsmElfSegmentTableEntry::PT_LOPROC:  s = "PT_LOPROC";  break;
-      case SgAsmElfSegmentTableEntry::PT_HIPROC:  s = "PT_HIPROC";  break;
+      case SgAsmElfSegmentTableEntry::PT_NULL:    s = "PT_NULL";    break; // 0
+      case SgAsmElfSegmentTableEntry::PT_LOAD:    s = "PT_LOAD";    break; // 1
+      case SgAsmElfSegmentTableEntry::PT_DYNAMIC: s = "PT_DYNAMIC"; break; // 2
+      case SgAsmElfSegmentTableEntry::PT_INTERP:  s = "PT_INTERP";  break; // 3
+      case SgAsmElfSegmentTableEntry::PT_NOTE:    s = "PT_NOTE";    break; // 4
+      case SgAsmElfSegmentTableEntry::PT_SHLIB:   s = "PT_SHLIB";   break; // 5
+      case SgAsmElfSegmentTableEntry::PT_PHDR:    s = "PT_PHDR";    break; // 6
 
+   // DQ (10/31/2008): Added mising enum values to prevent run-time warnings
+   /* OS- and Processor-specific ranges */
+      case SgAsmElfSegmentTableEntry::PT_LOOS: s = "PT_LOOS";  break; // 0x60000000, Values reserved for OS-specific semantics
+      case SgAsmElfSegmentTableEntry::PT_HIOS: s = "PT_HIOS";  break; // 0x6fffffff,
+
+   /* Values reserved for processor-specific semantics */
+      case SgAsmElfSegmentTableEntry::PT_LOPROC: s = "PT_LOPROC";  break;
+      case SgAsmElfSegmentTableEntry::PT_HIPROC: s = "PT_HIPROC";  break;
+
+	 /* OS-specific values for GNU/Linux */
+      case SgAsmElfSegmentTableEntry::PT_GNU_EH_FRAME: s = "PT_GNU_EH_FRAME"; break; // 0x6474e550, /* GCC .eh_frame_hdr segment */
+      case SgAsmElfSegmentTableEntry::PT_GNU_STACK:    s = "PT_GNU_STACK";    break; // 0x6474e551, /* Indicates stack executability */
+      case SgAsmElfSegmentTableEntry::PT_GNU_RELRO:    s = "PT_GNU_RELRO";    break; // 0x6474e552, /* Read-only after relocation */
+      case SgAsmElfSegmentTableEntry::PT_PAX_FLAGS:    s = "PT_PAX_FLAGS";    break; // 0x65041580, /* Indicates PaX flag markings */
+
+	  /* OS-specific values for Sun */
+      case SgAsmElfSegmentTableEntry::PT_SUNWBSS:      s = "PT_SUNWBSS";   break; // 0x6ffffffa, /* Sun Specific segment */
+      case SgAsmElfSegmentTableEntry::PT_SUNWSTACK:    s = "PT_SUNWSTACK"; break; // 0x6ffffffb  /* Stack segment */
+
       default:
       {
           s = "error";
 
-          // DQ (8/29/2008): This case is exercised frequently, I think it warrants only a warning, instead of an error.
+       // DQ (8/29/2008): This case is exercised frequently, I think it warrants only a warning, instead of an error.
           printf ("Warning: default reached for SgAsmElfSegmentTableEntry::stringifyType = 0x%x \n",kind);
       }
     }
@@ -1516,7 +1663,7 @@
 /* Returns info about the size of the entries based on information already available. Any or all arguments may be null
  * pointers if the caller is not interested in the value. */
 rose_addr_t
-SgAsmElfSegmentTable::calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount)
+SgAsmElfSegmentTable::calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount) const
 {
     SgAsmElfFileHeader *fhdr = dynamic_cast<SgAsmElfFileHeader*>(get_header());
     ROSE_ASSERT(fhdr!=NULL);
@@ -1567,12 +1714,15 @@
     return entry_size * nentries;
 }
 
-/* Resize the segment table based on ELF word size */
+/* Pre-unparsing updates */
 bool
 SgAsmElfSegmentTable::reallocate()
 {
     bool reallocated = false;
-    addr_t need = calculate_sizes(NULL, NULL, NULL, NULL);
+
+    /* Resize based on word size from ELF File Header */
+    size_t opt_size, nentries;
+    addr_t need = calculate_sizes(NULL, NULL, &opt_size, &nentries);
     if (need < get_size()) {
         if (is_mapped()) {
             ROSE_ASSERT(get_mapped_size()==get_size());
@@ -1580,64 +1730,67 @@
         }
         set_size(need);
         reallocated = true;
-
     } else if (need > get_size()) {
-        ROSE_ASSERT(!"can't expand word size yet"); /*FIXME*/
+        get_file()->shift_extend(this, 0, need-get_size(), SgAsmGenericFile::ADDRSP_ALL, SgAsmGenericFile::ELASTIC_HOLE);
+        reallocated = true;
     }
+
+    /* Update data members in the ELF File Header. No need to return true for these changes. */
+    SgAsmElfFileHeader *fhdr = dynamic_cast<SgAsmElfFileHeader*>(get_header());
+    fhdr->set_e_phoff(get_offset());
+    fhdr->set_phextrasz(opt_size);
+    fhdr->set_e_phnum(nentries);
+
     return reallocated;
 }
 
 /* Write the segment table to disk. */
 void
-SgAsmElfSegmentTable::unparse(FILE *f)
+SgAsmElfSegmentTable::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
-
     SgAsmElfFileHeader *fhdr = dynamic_cast<SgAsmElfFileHeader*>(get_header());
     ROSE_ASSERT(fhdr!=NULL);
     ByteOrder sex = fhdr->get_sex();
-    SgAsmGenericSectionPtrList sections = fhdr->get_sections()->get_sections();
+    SgAsmGenericSectionPtrList sections = fhdr->get_segtab_sections();
 
     /* Write the segments first */
-    for (size_t i=0; i<sections.size(); i++) {
-        SgAsmElfSection *section = dynamic_cast<SgAsmElfSection*>(sections[i]);
-        if (section && section->get_segment_entry()) {
-            section->unparse(f);
-        }
-    }
+    for (size_t i=0; i<sections.size(); i++)
+        sections[i]->unparse(f);
 
     /* Calculate sizes and update the ELF File Header */
     size_t ent_size, struct_size, opt_size, nentries;
     calculate_sizes(&ent_size, &struct_size, &opt_size, &nentries);
-    fhdr->set_phextrasz(opt_size);
-    fhdr->set_e_phnum(nentries);
+    ROSE_ASSERT(fhdr->get_e_phoff()==get_offset());
+    ROSE_ASSERT(fhdr->get_phextrasz()==opt_size);
+    ROSE_ASSERT(fhdr->get_e_phnum()==nentries);
     
     /* Write the segment table entries */
     for (size_t i=0; i < sections.size(); ++i) {
         SgAsmElfSection *section = dynamic_cast<SgAsmElfSection*>(sections[i]);
-        SgAsmElfSegmentTableEntry *shdr = section ? section->get_segment_entry() : NULL;
-        if (shdr) {
-            shdr->update_from_section(section);
-            int id = shdr->get_index();
-            ROSE_ASSERT(id>=0 && (size_t)id<nentries);
+        ROSE_ASSERT(section!=NULL);
+        SgAsmElfSegmentTableEntry *shdr = section->get_segment_entry();
+        ROSE_ASSERT(shdr!=NULL);
+        ROSE_ASSERT(shdr->get_offset()==section->get_offset()); /*segment table entry should have been updated in reallocate()*/
+
+        int id = shdr->get_index();
+        ROSE_ASSERT(id>=0 && (size_t)id<nentries);
             
-            SgAsmElfSegmentTableEntry::Elf32SegmentTableEntry_disk disk32;
-            SgAsmElfSegmentTableEntry::Elf64SegmentTableEntry_disk disk64;
-            void *disk = NULL;
+        SgAsmElfSegmentTableEntry::Elf32SegmentTableEntry_disk disk32;
+        SgAsmElfSegmentTableEntry::Elf64SegmentTableEntry_disk disk64;
+        void *disk = NULL;
         
-            if (4==fhdr->get_word_size()) {
-                disk = shdr->encode(sex, &disk32);
-            } else if (8==fhdr->get_word_size()) {
-                disk = shdr->encode(sex, &disk64);
-            } else {
-                ROSE_ASSERT(!"invalid word size");
-            }
+        if (4==fhdr->get_word_size()) {
+            disk = shdr->encode(sex, &disk32);
+        } else if (8==fhdr->get_word_size()) {
+            disk = shdr->encode(sex, &disk64);
+        } else {
+            ROSE_ASSERT(!"invalid word size");
+        }
         
-            /* The disk struct */
-            addr_t spos = write(f, id*ent_size, struct_size, disk);
-            if (shdr->get_extra().size() > 0)
-                write(f, spos, shdr->get_extra());
-        }
+        /* The disk struct */
+        addr_t spos = write(f, id*ent_size, struct_size, disk);
+        if (shdr->get_extra().size() > 0)
+            write(f, spos, shdr->get_extra());
     }
 
     unparse_holes(f);
@@ -1686,7 +1839,7 @@
 
 /* Encode a native entry back into disk format */
 void *
-SgAsmElfRelaEntry::encode(ByteOrder sex, Elf32RelaEntry_disk *disk)
+SgAsmElfRelaEntry::encode(ByteOrder sex, Elf32RelaEntry_disk *disk) const
 {
     host_to_disk(sex, p_r_offset, &(disk->r_offset));
     host_to_disk(sex, p_r_addend, &(disk->r_addend));
@@ -1695,7 +1848,7 @@
     return disk;
 }
 void *
-SgAsmElfRelaEntry::encode(ByteOrder sex, Elf64RelaEntry_disk *disk)
+SgAsmElfRelaEntry::encode(ByteOrder sex, Elf64RelaEntry_disk *disk) const
 {
     host_to_disk(sex, p_r_offset, &(disk->r_offset));
     host_to_disk(sex, p_r_addend, &(disk->r_addend));
@@ -1769,7 +1922,7 @@
 
 /* Return sizes for various parts of the table. See doc for SgAsmElfSection::calculate_sizes. */
 rose_addr_t
-SgAsmElfRelaSection::calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount)
+SgAsmElfRelaSection::calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount) const
 {
     std::vector<size_t> extra_sizes;
     for (size_t i=0; i<p_entries->get_entries().size(); i++)
@@ -1780,10 +1933,8 @@
 
 /* Write section back to disk */
 void
-SgAsmElfRelaSection::unparse(FILE *f)
+SgAsmElfRelaSection::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
-
     SgAsmElfFileHeader *fhdr = get_elf_header();
     ROSE_ASSERT(fhdr);
     ByteOrder sex = fhdr->get_sex();
@@ -1867,14 +2018,14 @@
 
 /* Encode a native entry back into disk format */
 void *
-SgAsmElfDynamicEntry::encode(ByteOrder sex, Elf32DynamicEntry_disk *disk)
+SgAsmElfDynamicEntry::encode(ByteOrder sex, Elf32DynamicEntry_disk *disk) const
 {
     host_to_disk(sex, p_d_tag, &(disk->d_tag));
     host_to_disk(sex, p_d_val.get_rva(), &(disk->d_val));
     return disk;
 }
 void *
-SgAsmElfDynamicEntry::encode(ByteOrder sex, Elf64DynamicEntry_disk *disk)
+SgAsmElfDynamicEntry::encode(ByteOrder sex, Elf64DynamicEntry_disk *disk) const
 {
     host_to_disk(sex, p_d_tag, &(disk->d_tag));
     host_to_disk(sex, p_d_val.get_rva(), &(disk->d_val));
@@ -1976,7 +2127,7 @@
     strcpy(label, stringify_tag(p_d_tag));
     for (char *s=label; *s; s++) *s = tolower(*s);
 
-    fprintf(f, "%s%-*s = 0x%08"PRIx64" (%"PRIu64")\n", p, w, label, p_d_val.get_rva(), p_d_val.get_rva());
+    fprintf(f, "%s%-*s = %s\n", p, w, label, p_d_val.to_string().c_str());
     if (p_extra.size()>0) {
         fprintf(f, "%s%-*s = %zu bytes\n", p, w, "extra", p_extra.size());
         hexdump(f, 0, std::string(p)+"extra at ", p_extra);
@@ -2017,7 +2168,7 @@
 
 /* Return sizes for various parts of the table. See doc for SgAsmElfSection::calculate_sizes. */
 rose_addr_t
-SgAsmElfDynamicSection::calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount)
+SgAsmElfDynamicSection::calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount) const
 {
     std::vector<size_t> extra_sizes;
     for (size_t i=0; i<p_entries->get_entries().size(); i++)
@@ -2110,10 +2261,8 @@
 
 /* Write the dynamic section back to disk */
 void
-SgAsmElfDynamicSection::unparse(FILE *f)
+SgAsmElfDynamicSection::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
-
     SgAsmElfFileHeader *fhdr = get_elf_header();
     ROSE_ASSERT(fhdr);
     ByteOrder sex = fhdr->get_sex();
@@ -2230,6 +2379,8 @@
       case STT_FUNC:    p_type = SYM_FUNC;    break;
       case STT_SECTION: p_type = SYM_SECTION; break;
       case STT_FILE:    p_type = SYM_FILE;    break;
+      case STT_COMMON:  p_type = SYM_COMMON;  break;
+      case STT_TLS:     p_type = SYM_TLS;     break;
       default:
         fprintf(stderr, "ROBB: unknown elf symbol type: %u\n", get_elf_type());
         ROSE_ASSERT(0);
@@ -2246,9 +2397,9 @@
     }
 }
 
-/* Encode a symbol into disk format */
-void *
-SgAsmElfSymbol::encode(ByteOrder sex, Elf32SymbolEntry_disk *disk, SgAsmGenericStrtab *strtab)
+/* Called before unparsing. Updates the symbol table entry to a consistent state. */
+void
+SgAsmElfSymbol::reallocate(SgAsmGenericStrtab *strtab)
 {
     SgAsmStoredString *s = dynamic_cast<SgAsmStoredString*>(get_name());
     if (s && s->get_strtab()==strtab) {
@@ -2256,7 +2407,12 @@
     } else {
         p_st_name = 0;
     }
+}
 
+/* Encode a symbol into disk format */
+void *
+SgAsmElfSymbol::encode(ByteOrder sex, Elf32SymbolEntry_disk *disk, SgAsmGenericStrtab *strtab) const
+{
     host_to_disk(sex, p_st_name,     &(disk->st_name));
     host_to_disk(sex, p_st_info,     &(disk->st_info));
     host_to_disk(sex, p_st_res1,     &(disk->st_res1));
@@ -2266,15 +2422,8 @@
     return disk;
 }
 void *
-SgAsmElfSymbol::encode(ByteOrder sex, Elf64SymbolEntry_disk *disk, SgAsmGenericStrtab *strtab)
+SgAsmElfSymbol::encode(ByteOrder sex, Elf64SymbolEntry_disk *disk, SgAsmGenericStrtab *strtab) const
 {
-    SgAsmStoredString *s = dynamic_cast<SgAsmStoredString*>(get_name());
-    if (s && s->get_strtab()==strtab) {
-        p_st_name = get_name()->get_offset();
-    } else {
-        p_st_name = 0;
-    }
-
     host_to_disk(sex, p_st_name,     &(disk->st_name));
     host_to_disk(sex, p_st_info,     &(disk->st_info));
     host_to_disk(sex, p_st_res1,     &(disk->st_res1));
@@ -2355,7 +2504,7 @@
     size_t entry_size, struct_size, extra_size, nentries;
     calculate_sizes(&entry_size, &struct_size, &extra_size, &nentries);
     ROSE_ASSERT(entry_size==shdr->get_sh_entsize());
-    
+
     /* Parse each entry; some fields can't be initialized until set_linked_section() is called. */
     for (size_t i=0; i<nentries; i++) {
         SgAsmElfSymbol *entry=0;
@@ -2379,7 +2528,7 @@
 
 /* Return sizes for various parts of the table. See doc for SgAsmElfSection::calculate_sizes. */
 rose_addr_t
-SgAsmElfSymbolSection::calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount)
+SgAsmElfSymbolSection::calculate_sizes(size_t *entsize, size_t *required, size_t *optional, size_t *entcount) const
 {
     std::vector<size_t> extra_sizes;
     for (size_t i=0; i<p_symbols->get_symbols().size(); i++)
@@ -2431,12 +2580,24 @@
     }
 }
 
+/* Called prior to unparsing. Updates symbol entries with name offsets */
+bool
+SgAsmElfSymbolSection::reallocate()
+{
+    bool reallocated = SgAsmElfSection::reallocate();
+    SgAsmElfStringSection *strsec = dynamic_cast<SgAsmElfStringSection*>(get_linked_section());
+    SgAsmGenericStrtab *strtab = strsec ? strsec->get_strtab() : NULL;
+    for (size_t i=0; i<p_symbols->get_symbols().size(); i++) {
+        SgAsmElfSymbol *entry = p_symbols->get_symbols()[i];
+        entry->reallocate(strtab);
+    }
+    return reallocated;
+}
+
 /* Write symbol table sections back to disk */
 void
-SgAsmElfSymbolSection::unparse(FILE *f)
+SgAsmElfSymbolSection::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
-
     SgAsmElfFileHeader *fhdr = get_elf_header();
     ROSE_ASSERT(fhdr);
     ByteOrder sex = fhdr->get_sex();
@@ -2541,10 +2702,7 @@
 
     /* Associate the entry point with a particular section. */
     ROSE_ASSERT(fhdr->get_entry_rvas().size()==1);
-    addr_t entry_va = fhdr->get_entry_rvas()[0].get_rva() + fhdr->get_base_va();
-    SgAsmGenericSection *secbind = fhdr->get_best_section_by_va(entry_va);
-    fhdr->get_entry_rvas()[0].set_section(secbind);
-    ROSE_ASSERT(fhdr->get_entry_rvas()[0].get_section()==secbind);
+    fhdr->get_entry_rvas()[0].bind(fhdr);
 
     /* Use symbols from either ".symtab" or ".dynsym" */
     SgAsmElfSymbolSection *symtab = dynamic_cast<SgAsmElfSymbolSection*>(ef->get_section_by_name(".symtab"));

Modified: branches/testonly/src/frontend/ExecFormats/ROSE_ExecGeneric.C
===================================================================
--- branches/testonly/src/frontend/ExecFormats/ROSE_ExecGeneric.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/ExecFormats/ROSE_ExecGeneric.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -20,8 +20,16 @@
 // A rose_rva_t is optionally tied to an SgAsmGenericSection so that if the mapped address of the section is modified then
 // the RVA stored in the rose_rva_t object is also adjusted.  The section-relative offset is always treated as an unsigned
 // quantity, but negative offsets can be accommodated via integer overflow.
+//
+// Be careful about adjusting the RVA (the address or section) using ROSETTA's accessors.
+//     symbol.p_address.set_section(section);          // this works
+//     symbol.get_address().set_section(section);      // using ROSETTA accessor modifies a temporary copy of the RVA
+// But if ROSETTA returns a vector then we can modify the RVA:
+//     symbol.p_addresses[0].set_section(section);     // this works
+//     symbol.get_addresses()[0].set_section(section); // so does this.
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
+
 rose_addr_t
 rose_rva_t::get_rva() const 
 {
@@ -30,12 +38,13 @@
     return rva;
 }
 
-void
+rose_rva_t&
 rose_rva_t::set_rva(rose_addr_t rva)
 {
     addr = rva;
     if (section)
         addr -= section->get_mapped_rva();
+    return *this;
 }
 
 SgAsmGenericSection *
@@ -44,7 +53,7 @@
     return section;
 }
 
-void
+rose_rva_t&
 rose_rva_t::set_section(SgAsmGenericSection *new_section)
 {
     if (section) {
@@ -55,12 +64,54 @@
         addr -= new_section->get_mapped_rva();
     }
     section = new_section;
+    return *this;
 }
 
+/* Set the section to the section that best (most specifically) describes the virtual address */
+rose_rva_t&
+rose_rva_t::bind(SgAsmGenericHeader *fhdr)
+{
+    rose_addr_t va = get_rva() + fhdr->get_base_va();
+    SgAsmGenericSection *secbind = fhdr->get_best_section_by_va(va);
+    return set_section(secbind);
+}
+
+/* Return address relative to currently bound section */
+rose_addr_t
+rose_rva_t::get_rel() const
+{
+    return addr;
+}
+
+/* Return address relative to specified section */
+rose_addr_t
+rose_rva_t::get_rel(SgAsmGenericSection *s)
+{
+    ROSE_ASSERT(s!=NULL);
+    ROSE_ASSERT(s->is_mapped());
+    ROSE_ASSERT(get_rva() >= s->get_mapped_rva());
+    return get_rva() - s->get_mapped_rva();
+}
+
+/* Convert to a string representation */
+std::string
+rose_rva_t::to_string() const
+{
+    char s[1024];
+    sprintf(s, "0x%08"PRIx64" (%"PRIu64")", get_rva(), get_rva());
+    std::string ss = s;
+
+    if (get_section()) {
+        sprintf(s, " + 0x%08"PRIx64" (%"PRIu64")", get_rel(), get_rel());
+        ss += " <" + get_section()->get_name()->get_string() + s + ">";
+    }
+    return ss;
+}
+
 std::ostream &
 operator<<(std::ostream &os, const rose_rva_t &rva)
 {
-    os << rva.get_rva();
+    os << rva.to_string();
     return os;
 }
 
@@ -89,6 +140,27 @@
     return get_string().c_str();
 }
 
+std::string
+SgAsmGenericString::get_string() const
+{
+    ROSE_ASSERT(!"should have been pure virtual if ROSETTA supported that.");
+    abort();
+}
+
+void
+SgAsmGenericString::set_string(const std::string &s)
+{
+    ROSE_ASSERT(!"should have been pure virtual if ROSETTA supported that.");
+    abort();
+}
+
+void
+SgAsmGenericString::dump(FILE*, const char *prefix, ssize_t idx)
+{
+    ROSE_ASSERT(!"should have been pure virtual if ROSETTA supported that.");
+    abort();
+}
+
 /* Constructor */
 void
 SgAsmBasicString::ctor()
@@ -100,6 +172,18 @@
 #endif
 }
 
+/* Override ROSETTA because generated code doesn't match virtual signature in base class */
+std::string
+SgAsmBasicString::get_string() const
+{
+    return p_string;
+}
+void
+SgAsmBasicString::set_string(const std::string &s)
+{
+    p_string = s;
+}
+
 /* Print some debugging info */
 void
 SgAsmBasicString::dump(FILE *f, const char *prefix, ssize_t idx)
@@ -399,7 +483,7 @@
         ROSE_ASSERT(!recursive);
         recursive = reallocated = true;
         try {
-            container->get_file()->shift_extend(container, 0, extend_size, true, true);
+            container->get_file()->shift_extend(container, 0, extend_size);
             reallocate(false);
             recursive = false;
         } catch (...) {
@@ -419,6 +503,11 @@
 
 /* Returns a reference to the free list. Don't use ROSETTA-generated version because callers need to be able to modify the
  * free list. */
+const ExtentMap&
+SgAsmGenericStrtab::get_freelist() const
+{
+    return p_freelist;
+}
 ExtentMap&
 SgAsmGenericStrtab::get_freelist()
 {
@@ -462,7 +551,7 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// ExecFormat
+// SgAsmGenericFormat
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 /* Print some debugging info */
@@ -472,9 +561,9 @@
     char p[4096], sbuf[256];
     const char *s;
     if (idx>=0) {
-        sprintf(p, "%sExecFormat[%zd].", prefix, idx);
+        sprintf(p, "%sFormat[%zd].", prefix, idx);
     } else {
-        sprintf(p, "%sExecFormat.", prefix);
+        sprintf(p, "%sFormat.", prefix);
     }
     const int w = std::max(1, DUMP_FIELD_WIDTH-(int)strlen(p));
     
@@ -550,7 +639,7 @@
 }
     
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// ExecFile
+// SgAsmGenericFile
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 /* Constructs by mapping file contents into memory */
@@ -698,13 +787,14 @@
 
 /* Returns list of all sections in the file (including headers, holes, etc). */
 SgAsmGenericSectionPtrList
-SgAsmGenericFile::get_sections()
+SgAsmGenericFile::get_sections(bool include_holes)
 {
     SgAsmGenericSectionPtrList retval;
 
     /* Start with headers and holes */
     retval.insert(retval.end(), p_headers->get_headers().begin(), p_headers->get_headers().end());
-    retval.insert(retval.end(), p_holes->get_sections().begin(), p_holes->get_sections().end());
+    if (include_holes)
+        retval.insert(retval.end(), p_holes->get_sections().begin(), p_holes->get_sections().end());
 
     /* Add sections pointed to by headers. */
     for (SgAsmGenericHeaderPtrList::iterator i=p_headers->get_headers().begin(); i!=p_headers->get_headers().end(); ++i) {
@@ -714,6 +804,19 @@
     return retval;
 }
 
+/* Returns list of all sections in the file that are memory mapped, including headers and holes. */
+SgAsmGenericSectionPtrList
+SgAsmGenericFile::get_mapped_sections()
+{
+    SgAsmGenericSectionPtrList retval;
+    SgAsmGenericSectionPtrList all = get_sections(true);
+    for (size_t i=0; i<all.size(); i++) {
+        if (all[i]->is_mapped())
+            retval.push_back(all[i]);
+    }
+    return retval;
+}
+
 /* Returns sections having specified ID across all headers, including headers and holes. */
 SgAsmGenericSectionPtrList
 SgAsmGenericFile::get_sections_by_id(int id)
@@ -928,6 +1031,8 @@
 SgAsmGenericSection *
 SgAsmGenericFile::best_section_by_va(const SgAsmGenericSectionPtrList &sections, addr_t va)
 {
+    if (0==sections.size())
+        return NULL;
     if (1==sections.size()) 
         return sections[0];
     SgAsmGenericSection *best = sections[0];
@@ -1043,11 +1148,19 @@
  * The neighborhood(S) is S itself and the set of all sections that overlap or are adjacent to the neighborhood of S,
  * recursively.
  *
- * A "hole" is an area of the address space that is not occupied by any section (including sections named "hole"
- * that are synthesized to occupy otherwise unreferenced file extents).  In general, making a modification to S will affect
- * sections not entirely to the left of S. However, if there's a hole to the right of neighborhood(S) and the "elastic"
- * argument is true then we utilize the hole's address space in order to limit the effect of sections right of the hole.
+ * The address space can be partitioned into three categories:
+ *     - Section: part of an address space that is referenced by an SgAsmGenericSection other than a "hole" section.
+ *     - Hole:    part of an address space that is referenced only by a "hole" section.
+ *     - Unref:   part of an address space that is not used by any section, including any "hole" section.
+ * 
+ * The last two categories define parts of the address space that can be optionally elastic--they expand or contract
+ * to take up slack or provide space for neighboring sections. This is controlled by the "elasticity" argument.
  *
+ * Note that when elasticity is ELASTIC_HOLE we simply ignore the "hole" sections, effectively removing their addresses from
+ * the range of addresses under consideration. This avoids complications that arise when a "hole" overlaps with a real section
+ * (due to someone changing offsets in an incompatible manner), but causes the hole offset and size to remain fixed.
+ * (FIXME RPM 2008-10-20)
+ *
  * When section S is shifted by 'Sa' bytes and/or enlarged by 'Sn' bytes, other sections are affected as follows:
  *     Cat L:  Not affected
  *     Cat R:  Shifted by Sa+Sn if they are in neighborhood(S). Otherwise the amount of shifting depends on the size of the
@@ -1059,45 +1172,90 @@
  *     Cat B:  Not shifted, but enlarged Sn
  *     Cat E:  Shifted Sa and enlarged Sn
  *
- * If 'filespace' is set then offsets and sizes are file offsets and sizes, otherwise they are memory offsets and sizes.
- * Modifying file space also modifies the memory space.
+ * Generally speaking, the "space" argument should be SgAsmGenericFile::ADDRSP_ALL in order to adjust both file and memory
+ * offsets and sizes in a consistent manner.
  *
- * NOTE: To change the address and/or size of S without regard to other sections in the same file, use set_offset() and
- *       set_size() (for file address space) or set_mapped_rva() and set_mapped_size() (for memory address space).
+ * To change the address and/or size of S without regard to other sections in the same file, use set_offset() and set_size()
+ * (for file address space) or set_mapped_rva() and set_mapped_size() (for memory address space).
  */
 void
-SgAsmGenericFile::shift_extend(SgAsmGenericSection *s, addr_t sa, addr_t sn, bool filespace, bool elastic_holes)
+SgAsmGenericFile::shift_extend(SgAsmGenericSection *s, addr_t sa, addr_t sn, AddressSpace space, Elasticity elasticity)
 {
     ROSE_ASSERT(s!=NULL);
     ROSE_ASSERT(s->get_file()==this);
     ROSE_ASSERT(s->get_congealed()==true); /* must be done parsing */
+    ROSE_ASSERT(space & (ADDRSP_FILE|ADDRSP_MEMORY) != 0);
 
     const bool debug = false;
     static size_t ncalls=0;
     char p[256];
 
     if (debug) {
+        const char *space_s="unknown";
+        if (space & ADDRSP_FILE) {
+            space_s = "file";
+        } else if (space & ADDRSP_MEMORY) {
+            space_s = "memory";
+        }
         sprintf(p, "SgAsmGenericFile::shift_extend[%zu]: ", ncalls++);
         fprintf(stderr, "%s    -- START --\n", p);
         fprintf(stderr, "%s    S = [%d] \"%s\"\n", p, s->get_id(), s->get_name()->c_str());
-        fprintf(stderr, "%s    %s Sa=0x%08"PRIx64" (%"PRIu64"), Sn=0x%08"PRIx64" (%"PRIu64")\n",
-                p, filespace ? "file" : "memory", sa, sa, sn, sn);
+        fprintf(stderr, "%s    %s Sa=0x%08"PRIx64" (%"PRIu64"), Sn=0x%08"PRIx64" (%"PRIu64")\n", p, space_s, sa, sa, sn, sn);
+        fprintf(stderr, "%s    elasticity = %s\n", p, (ELASTIC_NONE==elasticity ? "none" :
+                                                       ELASTIC_UNREF==elasticity ? "unref" :
+                                                       ELASTIC_HOLE==elasticity ? "unref+holes" :
+                                                       "unknown"));
     }
+
+    /* No-op case */
+    if (0==sa && 0==sn) {
+        if (debug) {
+            fprintf(stderr, "%s    No change necessary.\n", p);
+            fprintf(stderr, "%s    -- END --\n", p);
+        }
+        return;
+    }
     
+    bool filespace = (space & ADDRSP_FILE)!=0;
+    bool memspace = (space & ADDRSP_MEMORY)!=0;
     addr_t align=1, aligned_sa, aligned_sasn;
-    SgAsmGenericSectionPtrList all = get_sections();
     SgAsmGenericSectionPtrList neighbors, villagers;
     ExtentMap amap; /* address mappings for all extents */
-    ExtentPair nhs; /* neighborhood of S */
     ExtentPair sp;
 
+    /* Get a list of all sections that may need to be adjusted. */
+    SgAsmGenericSectionPtrList all;
+    switch (elasticity) {
+      case ELASTIC_NONE:
+      case ELASTIC_UNREF:
+        all = filespace ? get_sections() : get_mapped_sections();
+        break;
+      case ELASTIC_HOLE:
+        all = filespace ? get_sections(false) : get_mapped_sections();
+        break;
+    }
+    if (debug) {
+        fprintf(stderr, "%s    Following sections are in 'all' set:\n", p);
+        for (size_t i=0; i<all.size(); i++) {
+            ExtentPair ep;
+            if (filespace) {
+                ep = all[i]->get_file_extent();
+            } else {
+                ROSE_ASSERT(all[i]->is_mapped());
+                ep = all[i]->get_mapped_extent();
+            }
+            fprintf(stderr, "%s        0x%08"PRIx64" 0x%08"PRIx64" 0x%08"PRIx64" [%d] \"%s\"\n",
+                    p, ep.first, ep.second, ep.first+ep.second, all[i]->get_id(), all[i]->get_name()->c_str());
+        }
+    }
+
     for (size_t pass=0; pass<2; pass++) {
         if (debug) fprintf(stderr, "%s    -- PASS %zu --\n", p, pass);
 
         /* S offset and size in file or memory address space */
         if (filespace) {
             sp = s->get_file_extent();
-        } else if (!s->is_mapped()) {
+        } else if (!memspace || !s->is_mapped()) {
             return; /*nothing to do*/
         } else {
             sp = s->get_mapped_extent();
@@ -1107,21 +1265,37 @@
         for (size_t i=0; i<all.size(); i++) {
             if (filespace) {
                 amap.insert(all[i]->get_file_extent());
-            } else if (all[i]->is_mapped()) {
+            } else {
+                ROSE_ASSERT(all[i]->is_mapped());
                 amap.insert(all[i]->get_mapped_extent());
             }
         }
-
+        if (debug) {
+            fprintf(stderr, "%s    Address map:\n", p);
+            amap.dump_extents(stderr, (std::string(p)+"        ").c_str(), "amap");
+            fprintf(stderr, "%s    Extent of S:\n", p);
+            fprintf(stderr, "%s        start=0x%08"PRIx64" size=0x%08"PRIx64" end=0x%08"PRIx64"\n",
+                    p, sp.first, sp.second, sp.first+sp.second);
+        }
+        
         /* Neighborhood (nhs) of S is a single extent */
         ExtentMap nhs_map = amap.overlap_with(sp);
+        if (debug) {
+            fprintf(stderr, "%s    Neighborhood of S:\n", p);
+            nhs_map.dump_extents(stderr, (std::string(p)+"        ").c_str(), "nhs_map");
+        }
         ROSE_ASSERT(nhs_map.size()==1);
-        nhs = *(nhs_map.begin());
+        ExtentPair nhs = *(nhs_map.begin());
 
         /* What sections are in the neighborhood (including S), and right of the neighborhood? */
         neighbors.clear(); /*sections in neighborhood*/
+        neighbors.push_back(s);
         villagers.clear(); /*sections right of neighborhood*/
+        if (debug)
+            fprintf(stderr, "%s    Ignoring left (L) sections:\n", p);
         for (size_t i=0; i<all.size(); i++) {
             SgAsmGenericSection *a = all[i];
+            if (a==s) continue; /*already pushed onto neighbors*/
             ExtentPair ap;
             if (filespace) {
                 ap = a->get_file_extent();
@@ -1132,12 +1306,15 @@
             }
             switch (ExtentMap::category(ap, nhs)) {
               case 'L':
+                if (debug)
+                    fprintf(stderr, "%s        L 0x%08"PRIx64" 0x%08"PRIx64" 0x%08"PRIx64" [%d] \"%s\"\n", 
+                            p, ap.first, ap.second, ap.first+ap.second, a->get_id(), a->get_name()->c_str());
                 break;
               case 'R':
                 /* If holes are elastic then treat things right of the hole as being part of the right village; otherwise
                  * add those sections to the neighborhood of S even though they fall outside 'nhs' (it's OK because this
                  * partitioning of sections is the only thing we use 'nhs' for anyway. */
-                if (elastic_holes) {
+                if (elasticity!=ELASTIC_NONE) {
                     villagers.push_back(a);
                 } else if ('L'!=ExtentMap::category(ap, sp)) { /*ignore sections left of S*/
                     neighbors.push_back(a);
@@ -1227,7 +1404,7 @@
             fprintf(stderr, "%s    Calling recursively to increase hole size by 0x%08"PRIx64" (%"PRIu64") bytes\n",
                     p, need_more, need_more);
         }
-        shift_extend(after_hole, need_more, 0, filespace, elastic_holes);
+        shift_extend(after_hole, need_more, 0, space, elasticity);
         if (debug) fprintf(stderr, "%s    Returned from recursive call\n", p);
     }
 
@@ -1252,8 +1429,8 @@
             if (filespace) {
                 a->set_offset(a->get_offset()+aligned_sa);
                 a->set_size(a->get_size()+sn);
-                if (!resized_mem && a->is_mapped()) {
-                    shift_extend(a, 0, sn, false, elastic_holes);
+                if (memspace && !resized_mem && a->is_mapped()) {
+                    shift_extend(a, 0, sn, ADDRSP_MEMORY, elasticity);
                     resized_mem = true;
                 }
             } else {
@@ -1273,8 +1450,8 @@
             } else {
                 if (filespace) {
                     a->set_size(a->get_size()+aligned_sasn);
-                    if (!resized_mem && a->is_mapped()) {
-                        shift_extend(a, 0, aligned_sasn, false, elastic_holes);
+                    if (memspace && !resized_mem && a->is_mapped()) {
+                        shift_extend(a, 0, aligned_sasn, ADDRSP_MEMORY, elasticity);
                         resized_mem = true;
                     }
                 } else {
@@ -1292,8 +1469,8 @@
           case 'B':
             if (filespace) {
                 a->set_size(a->get_size()+sn);
-                if (!resized_mem && a->is_mapped()) {
-                    shift_extend(a, 0, sn, false, elastic_holes);
+                if (memspace && !resized_mem && a->is_mapped()) {
+                    shift_extend(a, 0, sn, ADDRSP_MEMORY, elasticity);
                     resized_mem = true;
                 }
             } else {
@@ -1465,24 +1642,46 @@
     ROSE_ASSERT(get_holes()->get_sections().size()==0);
 }
 
-/* Mirror image of parsing an executable file. The result should be identical to the original file. */
+/* Call this before unparsing to make sure everything is consistent. */
 void
-SgAsmGenericFile::unparse(const std::string &filename)
+SgAsmGenericFile::reallocate()
 {
-    FILE *f = fopen(filename.c_str(), "wb");
-    ROSE_ASSERT(f);
+    bool reallocated;
+    do {
+        reallocated = false;
 
+        /* holes */
+        for (SgAsmGenericSectionPtrList::iterator i=p_holes->get_sections().begin(); i!=p_holes->get_sections().end(); ++i) {
+            if ((*i)->reallocate())
+                reallocated = true;
+        }
+
+        /* file headers (and indirectly, all that they reference) */
+        for (SgAsmGenericHeaderPtrList::iterator i=p_headers->get_headers().begin(); i!=p_headers->get_headers().end(); ++i) {
+            if ((*i)->reallocate())
+                reallocated = true;
+        }
+    } while (reallocated);
+}
+
+/* Mirror image of parsing an executable file. The result (unless the AST has been modified) should be identical to the
+ * original file. */
+void
+SgAsmGenericFile::unparse(std::ostream &f) const
+{
 #if 0
     /* This is only for debugging -- fill the file with something other than zero so we have a better chance of making sure
      * that all data is written back to the file, including things that are zero. */
-    addr_t remaining = get_size();
-    unsigned char fill=0xaa, buf[4096];
-    memset(buf, fill, sizeof buf);
+    addr_t remaining = get_current_size();
+    unsigned char buf[4096];
+    memset(buf, 0xaa, sizeof buf);
     while (remaining>=sizeof buf) {
-        fwrite(buf, sizeof buf, 1, f);
+        f.write((const char*)buf, sizeof buf);
+        ROSE_ASSERT(f);
         remaining -= sizeof buf;
     }
-    fwrite(buf, remaining, 1, f);
+    f.write((const char*)buf, remaining);
+    ROSE_ASSERT(f);
 #endif
 
     /* Write unreferenced sections (i.e., "holes") back to disk */
@@ -1492,8 +1691,6 @@
     /* Write file headers (and indirectly, all that they reference) */
     for (SgAsmGenericHeaderPtrList::iterator i=p_headers->get_headers().begin(); i!=p_headers->get_headers().end(); ++i)
         (*i)->unparse(f);
-
-    fclose(f);
 }
 
 /* Return a string describing the file format. We use the last header so that files like PE, NE, LE, LX, etc. which also have
@@ -1530,7 +1727,7 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// ExecSection
+// GenericSection
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 /* Constructor.
@@ -1539,6 +1736,23 @@
  * list that points to this new section.  The section-to-header part of the link is deleted by the default destructor by
  * virtue of being a simple pointer, but we also need to delete the other half of the link in the destructors. */
 void
+SgAsmGenericSection::ctor(SgAsmGenericFile *ef, SgAsmGenericHeader *hdr)
+{
+    ROSE_ASSERT(ef != NULL);
+
+    /* Initialize data members */
+    p_offset = 0;
+    p_data = ef->content(0, 0);
+    p_file = ef;
+    p_size = p_data.size();
+    p_name = new SgAsmBasicString("");
+
+    /* Add this section to the header's section list */
+    if (hdr) hdr->add_section(this);
+}
+
+/* Same as above except also sets offset and size */
+void
 SgAsmGenericSection::ctor(SgAsmGenericFile *ef, SgAsmGenericHeader *hdr, addr_t offset, addr_t size)
 {
     ROSE_ASSERT(ef != NULL);
@@ -1553,7 +1767,6 @@
     p_name = new SgAsmBasicString("");
 
     /* Add this section to the header's section list */
-    set_header(hdr);
     if (hdr) hdr->add_section(this);
 }
 
@@ -1779,12 +1992,25 @@
     return returnValue;
 }
 
-/* Write data back to a file section. The data to write may be larger than the file section as long as the extra (which will
- * not be written) is all zero. The offset is relative to the start of the section. */
+/** Write data to a file section.
+ *
+ *   @param f       Output steam to which to write
+ *   @param offset  Byte offset relative to start of this section
+ *   @param bufsize Size of @p buf in bytes
+ *   @param buf     Buffer of bytes to be written
+ *
+ *  @returns Returns the section-relative byte offset for the first byte beyond what would have been written if all bytes
+ *  of the buffer were written.
+ *
+ *  The buffer is allowed to extend past the end of the section as long as the part that extends beyond is all zeros. The
+ *  zeros will not be written to the output file.  Furthermore, any trailing zeros that extend beyond the end of the file will
+ *  not be written (end-of-file is determined by SgAsmGenericFile::get_orig_size()) */
 rose_addr_t
-SgAsmGenericSection::write(FILE *f, addr_t offset, size_t bufsize, const void *buf)
+SgAsmGenericSection::write(std::ostream &f, addr_t offset, size_t bufsize, const void *buf) const
 {
     size_t nwrite, nzero;
+
+    /* Don't write past end of section */
     if (offset>=get_size()) {
         nwrite = 0;
         nzero  = bufsize;
@@ -1795,18 +2021,30 @@
         nwrite = get_size() - offset;
         nzero = bufsize - nwrite;
     }
-    
-    int status = fseek(f, get_offset()+offset, SEEK_SET);
-    ROSE_ASSERT(status>=0);
-    size_t nwritten = fwrite(buf, 1, nwrite, f);
-    ROSE_ASSERT(nwrite==nwritten);
-    
+
+    /* Don't write past end of current EOF if we can help it. */
+    SgAsmGenericFile *file = get_file();
+    while (nwrite>0 && 0==((const char*)buf)[nwrite-1] &&
+           get_offset()+offset+nwrite>file->get_orig_size())
+        --nwrite;
+
+    /* Write bytes to file. This is a good place to set a break point if you're trying to figure out what section is writing
+     * to a particular file address. For instance, if byte 0x7c is incorrect in the unparsed file you would set a conditional
+     * breakpoint for o<=0x7c && o+nwrite>0x7c */
+    ROSE_ASSERT(f);
+    off_t o = get_offset() + offset;
+    f.seekp(o);
+    ROSE_ASSERT(f);
+    f.write((const char*)buf, nwrite);
+    ROSE_ASSERT(f);
+
+    /* Check that truncated data is all zero and fail if it isn't */
     for (size_t i=nwrite; i<bufsize; i++) {
         if (((const char*)buf)[i]) {
             char mesg[1024];
             sprintf(mesg, "non-zero value truncated: buf[0x%zx]=0x%02x", i, ((const unsigned char*)buf)[i]);
 #if 1
-            fprintf(stderr, "ROBB: Exec::ExecSection::write(): %s\n", mesg);
+            fprintf(stderr, "ROBB: SgAsmGenericSection::write(): %s\n", mesg);
             hexdump(stderr, get_offset()+offset, "      ", (const unsigned char*)buf, bufsize);
             abort(); /*DEBUGGING*/
 #endif
@@ -1819,7 +2057,7 @@
 
 /* See related method above */
 rose_addr_t
-SgAsmGenericSection::write(FILE *f, addr_t offset, const SgFileContentList &buf)
+SgAsmGenericSection::write(std::ostream &f, addr_t offset, const SgFileContentList &buf) const
 {
     if (0==buf.size())
         return 0;
@@ -1828,7 +2066,7 @@
 
 /* See related method above */
 rose_addr_t
-SgAsmGenericSection::write(FILE *f, addr_t offset, const SgUnsignedCharList &buf)
+SgAsmGenericSection::write(std::ostream &f, addr_t offset, const SgUnsignedCharList &buf) const
 {
     if (0==buf.size())
         return 0;
@@ -1837,14 +2075,14 @@
 
 /* See related method above. */
 rose_addr_t
-SgAsmGenericSection::write(FILE *f, addr_t offset, const std::string &str)
+SgAsmGenericSection::write(std::ostream &f, addr_t offset, const std::string &str) const
 {
     return write(f, offset, str.size(), &(str[0]));
 }
 
 /* See related method above. */
 rose_addr_t
-SgAsmGenericSection::write(FILE *f, addr_t offset, char c)
+SgAsmGenericSection::write(std::ostream &f, addr_t offset, char c) const
 {
     return write(f, offset, 1, &c);
 }
@@ -1907,7 +2145,7 @@
     p_size = new_size;
 }
 
-/* True (the ExecHeader pointer) if this section is also a top-level file header, false (NULL) otherwise. */
+/* True (the SgAsmGenericHeader pointer) if this section is also a top-level file header, false (NULL) otherwise. */
 SgAsmGenericHeader *
 SgAsmGenericSection::is_file_header()
 {
@@ -1922,14 +2160,12 @@
 /* Write a section back to the file. This is the generic version that simply writes the content. Subclasses should override
  * this. */
 void
-SgAsmGenericSection::unparse(FILE *f)
+SgAsmGenericSection::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
-
 #if 0
     /* FIXME: for now we print the names of all sections we dump using this method. Eventually most of these sections will
      *        have subclasses that override this method. */
-    fprintf(stderr, "Exec::ExecSection::unparse(FILE*) for section [%d] \"%s\"\n", id, name.c_str());
+    fprintf(stderr, "SgAsmGenericSection::unparse(FILE*) for section [%d] \"%s\"\n", id, name.c_str());
 #endif
 
     write(f, 0, p_data);
@@ -1937,23 +2173,21 @@
 
 /* Write just the specified regions back to the file */
 void
-SgAsmGenericSection::unparse(FILE *f, const ExtentMap &map)
+SgAsmGenericSection::unparse(std::ostream &f, const ExtentMap &map) const
 {
     for (ExtentMap::const_iterator i=map.begin(); i!=map.end(); ++i) {
         ROSE_ASSERT((*i).first+(*i).second <= get_size());
-        const unsigned char *extent_data = content((*i).first, (*i).second);
+        const unsigned char *extent_data = &p_data[(*i).first];
         write(f, (*i).first, (*i).second, extent_data);
     }
 }
 
 /* Write holes (unreferenced areas) back to the file */
 void
-SgAsmGenericSection::unparse_holes(FILE *f)
+SgAsmGenericSection::unparse_holes(std::ostream &f) const
 {
-    bool was_congealed = get_congealed();
-    unparse(f, congeal());
-    if (!was_congealed)
-        uncongeal();
+    ROSE_ASSERT(get_congealed()); /*done parsing*/
+    unparse(f, p_extents);
 }
 
 /* Returns the file offset associated with the relative virtual address of a mapped section. */
@@ -1996,9 +2230,9 @@
     char p[4096], sbuf[256];
     const char *s;
     if (idx>=0) {
-        sprintf(p, "%sExecSection[%zd].", prefix, idx);
+        sprintf(p, "%sSection[%zd].", prefix, idx);
     } else {
-        sprintf(p, "%sExecSection.", prefix);
+        sprintf(p, "%sSection.", prefix);
     }
     
     const int w = std::max(1, DUMP_FIELD_WIDTH-(int)strlen(p));
@@ -2183,7 +2417,7 @@
 {
     ExtentMap result;
     for (const_iterator i=begin(); i!=end(); ++i) {
-        if ((*i).first < offset+size && (*i).first+(*i).second > offset)
+        if ((*i).first <= offset+size && (*i).first+(*i).second > offset)
             result.super::insert(value_type((*i).first, (*i).second));
     }
     return result;
@@ -2289,13 +2523,17 @@
         if (!label) label = "Extent";
         sprintf(p, "%s%s[%zd]", prefix, label, idx);
         int w = std::max(1, DUMP_FIELD_WIDTH-(int)strlen(p));
-        fprintf(f, "%s%-*s = offset 0x%08"PRIx64" (%"PRIu64"), for 0x%08"PRIx64" (%"PRIu64") byte%s\n",
-                p, w, "", (*i).first, (*i).first, (*i).second, (*i).second, 1==(*i).second?"":"s");
+        fprintf(f, "%s%-*s = offset 0x%08"PRIx64" (%"PRIu64"),"
+                " for 0x%08"PRIx64" (%"PRIu64") byte%s,"
+                " ending at 0x%08"PRIx64" (%"PRIu64")\n",
+                p, w, "", (*i).first, (*i).first,
+                (*i).second, (*i).second, 1==(*i).second?"":"s", 
+                (*i).first+(*i).second, (*i).first+(*i).second);
     }
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// ExecHeader
+// SgAsmGenericHeader
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 /* Constructor.
@@ -2370,11 +2608,8 @@
     
 /* Unparse headers and all they point to */
 void
-SgAsmGenericHeader::unparse(FILE *f)
+SgAsmGenericHeader::unparse(std::ostream &f) const
 {
-    /* Allow all sections to reallocate themselves until things settle */
-    while (reallocate()) /*void*/;
-
     SgAsmGenericSection::unparse(f);
 
     /* Unparse each section */
@@ -2404,6 +2639,7 @@
         ROSE_ASSERT(p_sections->get_sections()[i] != section);
     }
 #endif
+    section->set_header(this);
     section->set_parent(p_sections);
     p_sections->get_sections().push_back(section);
 }
@@ -2464,6 +2700,19 @@
     p_symbols->get_symbols().back()->set_parent(p_symbols);
 }
 
+/* Returns the list of sections that are memory mapped */
+SgAsmGenericSectionPtrList
+SgAsmGenericHeader::get_mapped_sections()
+{
+    SgAsmGenericSectionPtrList retval;
+    for (SgAsmGenericSectionPtrList::iterator i=p_sections->get_sections().begin(); i!=p_sections->get_sections().end(); ++i) {
+        if ((*i)->is_mapped()) {
+            retval.push_back(*i);
+        }
+    }
+    return retval;
+}
+    
 /* Returns sections in this header that have the specified ID. */
 SgAsmGenericSectionPtrList
 SgAsmGenericHeader::get_sections_by_id(int id)
@@ -2603,9 +2852,9 @@
 {
     char p[4096];
     if (idx>=0) {
-        sprintf(p, "%sExecHeader[%zd].", prefix, idx);
+        sprintf(p, "%sHeader[%zd].", prefix, idx);
     } else {
-        sprintf(p, "%sExecHeader.", prefix);
+        sprintf(p, "%sHeader.", prefix);
     }
     const int w = std::max(1, DUMP_FIELD_WIDTH-(int)strlen(p));
 
@@ -2654,11 +2903,11 @@
         fprintf(f, "%s%-*s = [%d] \"%s\"\n", p, w, label, section->get_id(), section->get_name()->c_str());
     }
     
-    fprintf(f, "%s%-*s = %zu entries\n", p, w, "ExecDLL.size", p_dlls->get_dlls().size());
+    fprintf(f, "%s%-*s = %zu entries\n", p, w, "DLL.size", p_dlls->get_dlls().size());
     for (size_t i = 0; i < p_dlls->get_dlls().size(); i++)
         p_dlls->get_dlls()[i]->dump(f, p, i);
 
-    fprintf(f, "%s%-*s = %zu entries\n", p, w, "ExecSymbol.size", p_symbols->get_symbols().size());
+    fprintf(f, "%s%-*s = %zu entries\n", p, w, "Symbol.size", p_symbols->get_symbols().size());
     for (size_t i = 0; i < p_symbols->get_symbols().size(); i++)
         p_symbols->get_symbols()[i]->dump(f, p, i);
 }
@@ -2687,15 +2936,15 @@
 {
     char p[4096];
     if (idx>=0) {
-        sprintf(p, "%sExecDLL[%zd].", prefix, idx);
+        sprintf(p, "%sDLL[%zd].", prefix, idx);
     } else {
-        sprintf(p, "%sExecDLL.", prefix);
+        sprintf(p, "%sDLL.", prefix);
     }
     const int w = std::max(1, DUMP_FIELD_WIDTH-(int)strlen(p));
 
-    fprintf(f, "%s%-*s = \"%s\"\n", p, w, "name", p_name->c_str());
-    for (size_t i = 0; i < p_funcs.size(); i++)
-        fprintf(f, "%s%-*s = [%zd] \"%s\"\n", p, w, "func", i, p_funcs[i].c_str());
+    fprintf(f, "%s%-*s = \"%s\"\n", p, w, "lib_name", p_name->c_str());
+    for (size_t i = 0; i < p_symbols.size(); i++)
+        fprintf(f, "%s%-*s = [%zd] \"%s\"\n", p, w, "symbol_name", i, p_symbols[i].c_str());
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -2716,15 +2965,99 @@
     p_name = s;
 }
 
+std::string
+SgAsmGenericSymbol::stringifyDefState() const
+{
+    std::string s;
+    switch (p_def_state) {
+      case SYM_UNDEFINED: 
+        s = "SYM_UNDEFINED";
+        break;
+      case SYM_TENTATIVE: 
+        s = "SYM_TENTATIVE";
+        break;
+      case SYM_DEFINED:
+        s = "SYM_DEFINED";
+        break;
+      default:
+        printf ("Error: (out of range) p_def_state = %d \n",p_def_state);
+        ROSE_ASSERT(false);
+    }
+    return s;
+}
+
+std::string
+SgAsmGenericSymbol::stringifyType() const
+{
+    std::string s;
+    switch (p_type) {
+      case SYM_NO_TYPE: 
+        s = "SYM_NO_TYPE";
+        break;
+      case SYM_DATA: 
+        s = "SYM_DATA";
+        break;
+      case SYM_FUNC:
+        s = "SYM_FUNC";
+        break;
+      case SYM_SECTION:
+        s = "SYM_SECTION";
+        break;
+      case SYM_FILE:
+        s = "SYM_FILE";
+        break;
+      case SYM_ARRAY:
+        s = "SYM_ARRAY";
+        break;
+      case SYM_TLS:
+        s = "SYM_TLS";
+        break;
+      case SYM_REGISTER:
+        s = "SYM_REGISTER";
+        break;
+      case SYM_COMMON:
+        s = "SYM_COMMON";
+        break;
+      default:
+        printf ("Error: (out of range) p_def_state = %d \n",p_def_state);
+        ROSE_ASSERT(false);
+    }
+    return s;
+}
+
+std::string
+SgAsmGenericSymbol::stringifyBinding() const
+{
+    std::string s;
+    switch (p_binding) {
+      case SYM_NO_BINDING: 
+        s = "SYM_NO_BINDING";
+        break;
+      case SYM_LOCAL: 
+        s = "SYM_LOCAL";
+        break;
+      case SYM_GLOBAL:
+        s = "SYM_GLOBAL";
+        break;
+      case SYM_WEAK:
+        s = "SYM_WEAK";
+        break;
+      default:
+        printf ("Error: (out of range) p_def_state = %d \n",p_def_state);
+        ROSE_ASSERT(false);
+    }
+    return s;
+}
+
 /* Print some debugging info */
 void
 SgAsmGenericSymbol::dump(FILE *f, const char *prefix, ssize_t idx) 
 {
     char p[4096];
     if (idx>=0) {
-        sprintf(p, "%sExecSymbol[%zd].", prefix, idx);
+        sprintf(p, "%sSymbol[%zd].", prefix, idx);
     } else {
-        sprintf(p, "%sExecSymbol.", prefix);
+        sprintf(p, "%sSymbol.", prefix);
     }
     const int w = std::max(1, DUMP_FIELD_WIDTH-(int)strlen(p));
 
@@ -2757,6 +3090,7 @@
       case SYM_TLS:      s_type = "thread";   break;
       case SYM_REGISTER: s_type = "register"; break;
       case SYM_ARRAY:    s_type = "array";    break;
+      case SYM_COMMON:   s_type = "common";   break;
     }
     fprintf(f, "%s%-*s = %s\n", p, w, "type", s_type);
     if (p_bound) {
@@ -2779,6 +3113,413 @@
 // functions
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
+
+SgAsmExecutableFileFormat::ByteOrder
+SgAsmExecutableFileFormat::host_order()
+{
+    static const int i = 1;
+    return *(unsigned char*)&i ? ORDER_LSB : ORDER_MSB;
+}
+
+/* Swap (reverse) bytes taking care of sign extension */
+uint8_t
+SgAsmExecutableFileFormat::swap_bytes(uint8_t n)
+{
+    return n;
+}
+
+uint16_t
+SgAsmExecutableFileFormat::swap_bytes(uint16_t n)
+{
+    return ((n>>8) & 0xff) | ((n<<8) & 0xff00);
+}
+
+uint32_t
+SgAsmExecutableFileFormat::swap_bytes(uint32_t n)
+{
+    return ((n>>24) & 0xff) | ((n>>8) & 0xff00) | ((n<<8) & 0xff0000) | ((n<<24) & 0xff000000u);
+}
+
+uint64_t
+SgAsmExecutableFileFormat::swap_bytes(uint64_t n)
+{
+    return (((n>>56) & (0xffull<<0 )) | ((n>>40) & (0xffull<<8 )) | ((n>>24) & (0xffull<<16)) | ((n>>8 ) & (0xffull<<24)) |
+            ((n<<8 ) & (0xffull<<32)) | ((n<<24) & (0xffull<<40)) | ((n<<40) & (0xffull<<48)) | ((n<<56) & (0xffull<<56)));
+}
+
+int8_t
+SgAsmExecutableFileFormat::swap_bytes(int8_t n)
+{
+    return swap_bytes((uint8_t)n);
+}
+
+int16_t
+SgAsmExecutableFileFormat::swap_bytes(int16_t n)
+{
+    return swap_bytes((uint16_t)n);
+}
+
+int32_t
+SgAsmExecutableFileFormat::swap_bytes(int32_t n)
+{
+    return swap_bytes((uint32_t)n);
+}
+
+int64_t
+SgAsmExecutableFileFormat::swap_bytes(int64_t n)
+{
+    return swap_bytes((uint64_t)n);
+}
+
+/* Little-endian byte order conversions */
+uint8_t
+SgAsmExecutableFileFormat::le_to_host(uint8_t n)
+{
+    return ORDER_LSB==host_order() ? n : swap_bytes(n);
+}
+
+uint16_t
+SgAsmExecutableFileFormat::le_to_host(uint16_t n)
+{
+    return ORDER_LSB==host_order() ? n : swap_bytes(n);
+}
+
+uint32_t
+SgAsmExecutableFileFormat::le_to_host(uint32_t n)
+{
+    return ORDER_LSB==host_order() ? n : swap_bytes(n);
+}
+
+uint64_t
+SgAsmExecutableFileFormat::le_to_host(uint64_t n)
+{
+    return ORDER_LSB==host_order() ? n : swap_bytes(n);
+}
+
+int8_t
+SgAsmExecutableFileFormat::le_to_host(int8_t n)
+{
+    return ORDER_LSB==host_order() ? n : swap_bytes(n);
+}
+
+int16_t
+SgAsmExecutableFileFormat::le_to_host(int16_t n)
+{
+    return ORDER_LSB==host_order() ? n : swap_bytes(n);
+}
+
+int32_t
+SgAsmExecutableFileFormat::le_to_host(int32_t n)
+{
+    return ORDER_LSB==host_order() ? n : swap_bytes(n);
+}
+
+int64_t
+SgAsmExecutableFileFormat::le_to_host(int64_t n)
+{
+    return ORDER_LSB==host_order() ? n : swap_bytes(n);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_le(unsigned h, uint8_t *n)
+{
+    assert(0==(h & ~0xff));
+    uint8_t hh = h;
+    *n = ORDER_LSB==host_order() ? hh : swap_bytes(hh);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_le(unsigned h, uint16_t *n)
+{
+    assert(0==(h & ~0xffff));
+    uint16_t hh = h;
+    *n = ORDER_LSB==host_order() ? hh : swap_bytes(hh);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_le(unsigned h, uint32_t *n)
+{
+    assert(0==(h & ~0xfffffffful));
+    uint32_t hh = h;
+    *n = ORDER_LSB==host_order() ? hh : swap_bytes(hh);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_le(addr_t h, uint64_t *n)
+{
+    assert(0==(h & ~0xffffffffffffffffull));
+    uint64_t hh = h;
+    *n = ORDER_LSB==host_order() ? hh : swap_bytes(hh);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_le(rva_t h, uint32_t *n)
+{
+    host_to_le(h.get_rva(), n);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_le(rva_t h, uint64_t *n)
+{
+    host_to_le(h.get_rva(), n);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_le(int h, int8_t *n)
+{
+    assert((unsigned)h<=0x8f || ((unsigned)h|0xff)==(unsigned)-1);
+    int8_t hh = h;
+    *n = ORDER_LSB==host_order() ? hh : swap_bytes(hh);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_le(int h, int16_t *n)
+{
+    assert((unsigned)h<=0x8fff || ((unsigned)h|0xffff)==(unsigned)-1);
+    int16_t hh = h;
+    *n = ORDER_LSB==host_order() ? hh : swap_bytes(hh);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_le(int h, int32_t *n)
+{
+    assert((unsigned)h<=0x8fffffffu || ((unsigned)h|0xffffffffu)==(unsigned)-1);
+    int32_t hh = h;
+    *n = ORDER_LSB==host_order() ? hh : swap_bytes(hh);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_le(int64_t h, int64_t *n)
+{
+    *n = ORDER_LSB==host_order() ? h : swap_bytes(h);
+}
+
+/* Big-endian byte order conversions */
+uint8_t
+SgAsmExecutableFileFormat::be_to_host(uint8_t n)
+{
+    return ORDER_MSB==host_order() ? n : swap_bytes(n);
+}
+
+uint16_t
+SgAsmExecutableFileFormat::be_to_host(uint16_t n)
+{
+    return ORDER_MSB==host_order() ? n : swap_bytes(n);
+}
+
+uint32_t
+SgAsmExecutableFileFormat::be_to_host(uint32_t n)
+{
+    return ORDER_MSB==host_order() ? n : swap_bytes(n);
+}
+
+uint64_t
+SgAsmExecutableFileFormat::be_to_host(uint64_t n)
+{
+    return ORDER_MSB==host_order() ? n : swap_bytes(n);
+}
+
+int8_t
+SgAsmExecutableFileFormat::be_to_host(int8_t n)
+{
+    return ORDER_MSB==host_order() ? n : swap_bytes(n);
+}
+
+int16_t
+SgAsmExecutableFileFormat::be_to_host(int16_t n)
+{
+    return ORDER_MSB==host_order() ? n : swap_bytes(n);
+}
+
+int32_t
+SgAsmExecutableFileFormat::be_to_host(int32_t n)
+{
+    return ORDER_MSB==host_order() ? n : swap_bytes(n);
+}
+
+int64_t
+SgAsmExecutableFileFormat::be_to_host(int64_t n)
+{
+    return ORDER_MSB==host_order() ? n : swap_bytes(n);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_be(unsigned h, uint8_t *n)
+{
+    assert(0==(h & ~0xff));
+    uint8_t hh = h;
+    *n = ORDER_MSB==host_order() ? hh : swap_bytes(hh);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_be(unsigned h, uint16_t *n)
+{
+    assert(0==(h & ~0xffff));
+    uint16_t hh = h;
+    *n = ORDER_MSB==host_order() ? hh : swap_bytes(hh);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_be(unsigned h, uint32_t *n)
+{
+    assert(0==(h & ~0xfffffffful));
+    uint32_t hh = h;
+    *n = ORDER_MSB==host_order() ? hh : swap_bytes(hh);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_be(addr_t h, uint64_t *n)
+{
+    assert(0==(h & ~0xffffffffffffffffull));
+    uint64_t hh = h;
+    *n = ORDER_MSB==host_order() ? hh : swap_bytes(hh);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_be(rva_t h, uint32_t *n)
+{
+    host_to_be(h.get_rva(), n);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_be(rva_t h, uint64_t *n)
+{
+    host_to_be(h.get_rva(), n);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_be(int h, int8_t *n)
+{
+    assert((unsigned)h<0x8f || ((unsigned)h|0xff)==(unsigned)-1);
+    int8_t hh = h;
+    *n = ORDER_MSB==host_order() ? hh : swap_bytes(hh);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_be(int h, int16_t *n)
+{
+    assert((unsigned)h<0x8fff || ((unsigned)h|0xffff)==(unsigned)-1);
+    int16_t hh = h;
+    *n = ORDER_MSB==host_order() ? hh : swap_bytes(hh);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_be(int h, int32_t *n)
+{
+    assert((unsigned)h<0x8ffffffful || ((unsigned)h|0xfffffffful)==(unsigned)-1);
+    int32_t hh = h;
+    *n = ORDER_MSB==host_order() ? hh : swap_bytes(hh);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_be(int64_t h, int64_t *n)
+{
+    *n = ORDER_MSB==host_order() ? h : swap_bytes(h);
+}
+
+/* Caller-specified byte order conversions */
+uint8_t
+SgAsmExecutableFileFormat::disk_to_host(SgAsmExecutableFileFormat::ByteOrder sex, uint8_t n)
+{
+    return ORDER_LSB==sex ? le_to_host(n) : be_to_host(n);
+}
+
+uint16_t
+SgAsmExecutableFileFormat::disk_to_host(SgAsmExecutableFileFormat::ByteOrder sex, uint16_t n)
+{
+    return ORDER_LSB==sex ? le_to_host(n) : be_to_host(n);
+}
+
+uint32_t
+SgAsmExecutableFileFormat::disk_to_host(SgAsmExecutableFileFormat::ByteOrder sex, uint32_t n)
+{
+    return ORDER_LSB==sex ? le_to_host(n) : be_to_host(n);
+}
+
+uint64_t
+SgAsmExecutableFileFormat::disk_to_host(SgAsmExecutableFileFormat::ByteOrder sex, uint64_t n)
+{
+    return ORDER_LSB==sex ? le_to_host(n) : be_to_host(n);
+}
+
+int8_t
+SgAsmExecutableFileFormat::disk_to_host(SgAsmExecutableFileFormat::ByteOrder sex, int8_t n)
+{
+    return ORDER_LSB==sex ? le_to_host(n) : be_to_host(n);
+}
+
+int16_t
+SgAsmExecutableFileFormat::disk_to_host(SgAsmExecutableFileFormat::ByteOrder sex, int16_t n)
+{
+    return ORDER_LSB==sex ? le_to_host(n) : be_to_host(n);
+}
+
+int32_t
+SgAsmExecutableFileFormat::disk_to_host(SgAsmExecutableFileFormat::ByteOrder sex, int32_t n)
+{
+    return ORDER_LSB==sex ? le_to_host(n) : be_to_host(n);
+}
+
+int64_t
+SgAsmExecutableFileFormat::disk_to_host(SgAsmExecutableFileFormat::ByteOrder sex, int64_t n)
+{
+    return ORDER_LSB==sex ? le_to_host(n) : be_to_host(n);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, unsigned h, uint8_t *np)
+{
+    ORDER_LSB==sex ? host_to_le(h, np) : host_to_be(h, np);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, unsigned h, uint16_t *np)
+{
+    ORDER_LSB==sex ? host_to_le(h, np) : host_to_be(h, np);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, unsigned h, uint32_t *np)
+{
+    ORDER_LSB==sex ? host_to_le(h, np) : host_to_be(h, np);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, addr_t h, uint64_t *np)
+{
+    ORDER_LSB==sex ? host_to_le(h, np) : host_to_be(h, np);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, rva_t h, uint64_t *np)
+{
+    host_to_disk(sex, h.get_rva(), np);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, int h, int8_t *np)
+{
+    ORDER_LSB==sex ? host_to_le(h, np) : host_to_be(h, np);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, int h, int16_t *np)
+{
+    ORDER_LSB==sex ? host_to_le(h, np) : host_to_be(h, np);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, int h, int32_t *np)
+{
+    ORDER_LSB==sex ? host_to_le(h, np) : host_to_be(h, np);
+}
+
+void
+SgAsmExecutableFileFormat::host_to_disk(SgAsmExecutableFileFormat::ByteOrder sex, int64_t h, int64_t *np)
+{
+    ORDER_LSB==sex ? host_to_le(h, np) : host_to_be(h, np);
+}
+
 /* Works like hexdump -C to display N bytes of DATA. The "prefix" can be used for whitespace to intent the output. */
 void
 SgAsmExecutableFileFormat::hexdump(FILE *f, addr_t base_addr, const char *prefix, const unsigned char *data, size_t n)
@@ -2824,16 +3565,27 @@
         hexdump(f, base_addr, prefix.c_str(), &(data[0]), data.size());
 }
 
-/* Writes a new file from the IR node for a parse executable file.  This is primarily to debug the parser by creating
- * an executable that *should* be identical to the original. */
+/** Writes a new file from the IR node for a parse executable file. Warning: This function might modify the AST by calling
+ *  reallocate(), which makes sure all parts of the AST are consistent with respect to each other. */
 void
 SgAsmExecutableFileFormat::unparseBinaryFormat(const std::string &name, SgAsmFile *asmFile)
 {
-    FILE *output = fopen(name.c_str(), "wb");
-    ROSE_ASSERT(output!=NULL);
+    std::ofstream f(name.c_str(), std::ios_base::out|std::ios_base::binary|std::ios_base::trunc);
+    ROSE_ASSERT(f.is_open());
+    f.exceptions(std::ios::badbit | std::ios::failbit);
+    unparseBinaryFormat(f, asmFile);
+    f.close();
+}
+
+/** Unparses an executable file into the supplied output stream. Warning: This function might modify the AST by calling
+ *  reallocate(), which makes sure all parts of the AST are consistent with respect to each other. */
+void
+SgAsmExecutableFileFormat::unparseBinaryFormat(std::ostream &f, SgAsmFile *asmFile)
+{
     ROSE_ASSERT(asmFile!=NULL);
     ROSE_ASSERT(asmFile->get_genericFile() != NULL);
-    asmFile->get_genericFile()->unparse(name);
+    asmFile->get_genericFile()->reallocate();
+    asmFile->get_genericFile()->unparse(f);
 }
 
 // FIXME: This cut-n-pasted version of Exec::ELF::parse() is out-of-date (rpm 2008-07-10)

Modified: branches/testonly/src/frontend/ExecFormats/ROSE_ExecLE.C
===================================================================
--- branches/testonly/src/frontend/ExecFormats/ROSE_ExecLE.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/ExecFormats/ROSE_ExecLE.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -131,7 +131,7 @@
 
 /* Encode the LE header into disk format */
 void *
-SgAsmLEFileHeader::encode(ByteOrder sex, LEFileHeader_disk *disk)
+SgAsmLEFileHeader::encode(ByteOrder sex, LEFileHeader_disk *disk) const
 {
     for (size_t i=0; i<NELMTS(disk->e_magic); i++)
         disk->e_magic[i] = get_magic()[i];
@@ -190,9 +190,8 @@
 
 /* Write the LE file header back to disk and all that it references */
 void
-SgAsmLEFileHeader::unparse(FILE *f)
+SgAsmLEFileHeader::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
     LEFileHeader_disk fh;
     encode(get_sex(), &fh);
     write(f, 0, sizeof fh, &fh);
@@ -366,7 +365,7 @@
 
 /* Encode page table entry to disk format */
 void *
-SgAsmLEPageTableEntry::encode(ByteOrder sex, SgAsmLEPageTableEntry::LEPageTableEntry_disk *disk)
+SgAsmLEPageTableEntry::encode(ByteOrder sex, SgAsmLEPageTableEntry::LEPageTableEntry_disk *disk) const
 {
     host_to_disk(sex, (p_pageno & 0xff),    &(disk->pageno_lo));
     host_to_disk(sex, (p_pageno>>8)&0xffff, &(disk->pageno_hi));
@@ -422,9 +421,8 @@
 
 /* Write page table back to disk */
 void
-SgAsmLEPageTable::unparse(FILE *f)
+SgAsmLEPageTable::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
     addr_t spos=0; /*section offset*/
     for (size_t i=0; i < p_entries.size(); i++) {
         SgAsmLEPageTableEntry::LEPageTableEntry_disk disk;
@@ -468,7 +466,7 @@
 
 /* Encodes a section table entry back into disk format. */
 void *
-SgAsmLESectionTableEntry::encode(ByteOrder sex, LESectionTableEntry_disk *disk)
+SgAsmLESectionTableEntry::encode(ByteOrder sex, LESectionTableEntry_disk *disk) const
 {
     host_to_disk(sex, p_mapped_size,      &(disk->mapped_size));
     host_to_disk(sex, p_base_addr,        &(disk->base_addr));
@@ -612,9 +610,8 @@
 
 /* Writes the section table back to disk along with each of the sections. */
 void
-SgAsmLESectionTable::unparse(FILE *f)
+SgAsmLESectionTable::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
     SgAsmLEFileHeader *fhdr = dynamic_cast<SgAsmLEFileHeader*>(get_header());
     ROSE_ASSERT(fhdr!=NULL);
     SgAsmGenericSectionPtrList sections = fhdr->get_sections()->get_sections();
@@ -687,9 +684,8 @@
 
 /* Writes the section back to disk. */
 void
-SgAsmLENameTable::unparse(FILE *f)
+SgAsmLENameTable::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
     addr_t spos=0; /*section offset*/
     ROSE_ASSERT(p_names.size() == p_ordinals.size());
     for (size_t i = 0; i < p_names.size(); i++) {
@@ -749,7 +745,7 @@
 
 /* Write the entry information back to the disk at the specified section and section offset, returning the new section offset. */
 rose_addr_t
-SgAsmLEEntryPoint::unparse(FILE *f, ByteOrder sex, SgAsmGenericSection *section, rose_addr_t spos)
+SgAsmLEEntryPoint::unparse(std::ostream &f, ByteOrder sex, const SgAsmGenericSection *section, rose_addr_t spos) const
 {
     if (0==(p_flags & 0x01)) {
         /* Empty entry; write only the flag byte */
@@ -841,9 +837,8 @@
 
 /* Write entry table back to file */
 void
-SgAsmLEEntryTable::unparse(FILE *f)
+SgAsmLEEntryTable::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
     addr_t spos=0; /*section offset*/
     ROSE_ASSERT(p_entries.size()<=0xff);
     uint8_t byte = p_entries.size();
@@ -907,7 +902,7 @@
 #if 0 /*FIXME: not implemented yet*/
 /* Write relocation table back to disk */
 void
-SgAsmLERelocTable::unparse(FILE *f)
+SgAsmLERelocTable::unparse(std::ostream &f)
 {
     ROSE_ASSERT(0==reallocate(false)); /*should have been called well before any unparsing started*/
 }
@@ -975,7 +970,6 @@
     SgAsmLEFileHeader *le_header = new SgAsmLEFileHeader(ef, dos2_header->get_e_lfanew());
 
     /* The extended part of the DOS header is owned by the LE header */
-    dos2_header->set_header(le_header);
     le_header->add_section(dos2_header);
     le_header->set_dos2_header(dos2_header);
 

Modified: branches/testonly/src/frontend/ExecFormats/ROSE_ExecNE.C
===================================================================
--- branches/testonly/src/frontend/ExecFormats/ROSE_ExecNE.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/ExecFormats/ROSE_ExecNE.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -86,7 +86,7 @@
 
 /* Encode the extended header back into disk format */
 void *
-SgAsmNEExtendedDOSHeader::encode(SgAsmNEExtendedDOSHeader::ExtendedDOSHeader_disk *disk)
+SgAsmNEExtendedDOSHeader::encode(SgAsmNEExtendedDOSHeader::ExtendedDOSHeader_disk *disk) const
 {
     for (size_t i = 0; i < NELMTS(disk->e_res1); i++)
         host_to_le(p_e_res1[i], &(disk->e_res1[i]));
@@ -97,9 +97,8 @@
 
 /* Write an extended header back to disk */
 void
-SgAsmNEExtendedDOSHeader::unparse(FILE *f)
+SgAsmNEExtendedDOSHeader::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
     ExtendedDOSHeader_disk disk;
     encode(&disk);
     write(f, 0, sizeof disk, &disk);
@@ -213,7 +212,7 @@
 
 /* Encode the NE header into disk format */
 void *
-SgAsmNEFileHeader::encode(SgAsmNEFileHeader::NEFileHeader_disk *disk)
+SgAsmNEFileHeader::encode(SgAsmNEFileHeader::NEFileHeader_disk *disk) const
 {
     for (size_t i = 0; i < NELMTS(disk->e_magic); i++)
         disk->e_magic[i] = get_magic()[i];
@@ -252,9 +251,8 @@
 
 /* Write the NE file header back to disk and all that it references */
 void
-SgAsmNEFileHeader::unparse(FILE *f)
+SgAsmNEFileHeader::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
     NEFileHeader_disk fh;
     encode(&fh);
     write(f, 0, sizeof fh, &fh);
@@ -382,7 +380,7 @@
 
 /* Encodes a section table entry back into disk format. */
 void *
-SgAsmNESectionTableEntry::encode(NESectionTableEntry_disk *disk)
+SgAsmNESectionTableEntry::encode(NESectionTableEntry_disk *disk) const
 {
     host_to_le(p_sector,          &(disk->sector));
     unsigned x_physical_size = p_physical_size==64*1024 ? 0 : p_physical_size;
@@ -432,9 +430,8 @@
 
 /* Write section back to disk */
 void
-SgAsmNESection::unparse(FILE *f)
+SgAsmNESection::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
     SgAsmGenericSection::unparse(f);
     if (p_reloc_table)
         p_reloc_table->unparse(f);
@@ -523,9 +520,8 @@
 
 /* Writes the section table back to disk along with each of the sections. */
 void
-SgAsmNESectionTable::unparse(FILE *f)
+SgAsmNESectionTable::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
     SgAsmNEFileHeader *fhdr = dynamic_cast<SgAsmNEFileHeader*>(get_header());
     ROSE_ASSERT(fhdr!=NULL);
     SgAsmGenericSectionPtrList sections = fhdr->get_sections()->get_sections();
@@ -598,9 +594,8 @@
 
 /* Writes the section back to disk. */
 void
-SgAsmNENameTable::unparse(FILE *f)
+SgAsmNENameTable::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
     addr_t spos=0; /*section offset*/
     ROSE_ASSERT(p_names.size() == p_ordinals.size());
 
@@ -688,9 +683,8 @@
 
 /* Writes the section back to disk. */
 void
-SgAsmNEModuleTable::unparse(FILE *f)
+SgAsmNEModuleTable::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
     addr_t spos = 0; /*section offset*/
     p_strtab->unparse(f);
 
@@ -889,9 +883,8 @@
 
 /* Write section back to disk */
 void
-SgAsmNEEntryTable::unparse(FILE *f)
+SgAsmNEEntryTable::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
     addr_t spos=0; /*section offset*/
 
     for (size_t bi=0, ei=0; bi < p_bundle_sizes.size(); ei += p_bundle_sizes[bi++]) {
@@ -1057,7 +1050,7 @@
 
 /* Write entry back to disk at the specified section and section offset, returning new offset */
 rose_addr_t
-SgAsmNERelocEntry::unparse(FILE *f, SgAsmGenericSection *section, rose_addr_t spos)
+SgAsmNERelocEntry::unparse(std::ostream &f, const SgAsmGenericSection *section, rose_addr_t spos) const
 {
     unsigned char byte;
     byte = (p_modifier << 8) | (p_src_type & 0x0f);
@@ -1230,9 +1223,8 @@
 
 /* Write relocation table back to disk */
 void
-SgAsmNERelocTable::unparse(FILE *f)
+SgAsmNERelocTable::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
     addr_t spos=0; /*section offset*/
     uint16_t size_le;
     host_to_le(p_entries.size(), &size_le);
@@ -1305,7 +1297,6 @@
     SgAsmNEFileHeader *ne_header = new SgAsmNEFileHeader(ef, dos2_header->get_e_lfanew());
 
     /* The extended part of the DOS header is owned by the NE header */
-    dos2_header->set_header(ne_header);
     ne_header->add_section(dos2_header);
     ne_header->set_dos2_header(dos2_header);
 

Modified: branches/testonly/src/frontend/ExecFormats/ROSE_ExecPE.C
===================================================================
--- branches/testonly/src/frontend/ExecFormats/ROSE_ExecPE.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/ExecFormats/ROSE_ExecPE.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -4,6 +4,8 @@
 #define __STDC_FORMAT_MACROS
 #include <inttypes.h>
 
+#define ALIGN(ADDR,ALMNT)       ((((ADDR)+(ALMNT)-1)/(ALMNT))*(ALMNT))
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // Extended DOS File Header
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -33,7 +35,7 @@
 
 /* Encode the extended header back into disk format */
 void *
-SgAsmPEExtendedDOSHeader::encode(ExtendedDOSHeader_disk *disk)
+SgAsmPEExtendedDOSHeader::encode(ExtendedDOSHeader_disk *disk) const
 {
     for (size_t i=0; i < NELMTS(disk->e_res1); i++)
         host_to_le(p_e_res1[i], &(disk->e_res1[i]));
@@ -47,10 +49,8 @@
 
 /* Write an extended header back to disk */
 void
-SgAsmPEExtendedDOSHeader::unparse(FILE *f)
+SgAsmPEExtendedDOSHeader::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
-
     ExtendedDOSHeader_disk disk;
     encode(&disk);
     write(f, 0, sizeof disk, &disk);
@@ -86,7 +86,8 @@
     fprintf(f, "%s%-*s = %u\n",                     p, w, "e_res2[9]",  p_e_res2[9]);
     fprintf(f, "%s%-*s = %"PRIu64" byte offset (0x%"PRIx64")\n",  p, w, "e_lfanew",   p_e_lfanew,p_e_lfanew);
 
-    hexdump(f, 0, std::string(p)+"data at ", p_data);
+    if (variantT() == V_SgAsmPEExtendedDOSHeader) //unless a base class
+        hexdump(f, 0, std::string(p)+"data at ", p_data);
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -101,7 +102,7 @@
     set_synthesized(true);
     set_purpose(SP_HEADER);
 
- // DQ (8/16/2008): Added code to set SgAsmPEFileHeader as parent of input SgAsmGenericFile
+    // DQ (8/16/2008): Added code to set SgAsmPEFileHeader as parent of input SgAsmGenericFile
     f->set_parent(this);
 
     p_rvasize_pairs = new SgAsmPERVASizePairList;
@@ -115,7 +116,7 @@
     if (fh.e_magic[0]!='P' || fh.e_magic[1]!='E' || fh.e_magic[2]!='\0' || fh.e_magic[3]!='\0')
         throw FormatError("Bad PE magic number");
 
-    /* Decode file header */
+    /* Decode COFF file header */
     p_e_cpu_type           = le_to_host(fh.e_cpu_type);
     p_e_nsections          = le_to_host(fh.e_nsections);
     p_e_time               = le_to_host(fh.e_time);
@@ -124,7 +125,8 @@
     p_e_nt_hdr_size        = le_to_host(fh.e_nt_hdr_size);
     p_e_flags              = le_to_host(fh.e_flags);
 
-    /* Read the optional header, the size of which is stored in the e_nt_hdr_size of the main PE file header. According to
+    /* Read the "Optional Header" (optional in the sense that not all files have one, but required for an executable), the
+     * size of which is stored in the e_nt_hdr_size of the main PE file header. According to 
      * http://www.phreedom.org/solar/code/tinype the Windows loader honors the e_nt_hdr_size even when set to smaller than the
      * smallest possible documented size of the optional header. Also it's possible for the optional header to extend beyond
      * the end of the file, in which case that part should be read as zero. */
@@ -135,18 +137,26 @@
     content(sizeof fh, sizeof oh32, &oh32);
     p_e_opt_magic = le_to_host(oh32.e_opt_magic);
     
+    /* File format */
+    p_exec_format->set_family(FAMILY_PE);
+    p_exec_format->set_purpose(p_e_flags & HF_PROGRAM ? PURPOSE_EXECUTABLE : PURPOSE_LIBRARY);
+    p_exec_format->set_sex(ORDER_LSB);
+    p_exec_format->set_abi(ABI_NT);
+    p_exec_format->set_abi_version(0);
+    p_exec_format->set_word_size(0x010b==p_e_opt_magic? 4 : 8);
+
     /* Decode the optional header. */
-    if (0x010b == p_e_opt_magic) {                                           
-        p_exec_format->set_word_size(4);
+    addr_t entry_rva;
+    if (4==p_exec_format->get_word_size()) {
         p_e_lmajor             = le_to_host(oh32.e_lmajor);
         p_e_lminor             = le_to_host(oh32.e_lminor);
         p_e_code_size          = le_to_host(oh32.e_code_size);
         p_e_data_size          = le_to_host(oh32.e_data_size);
         p_e_bss_size           = le_to_host(oh32.e_bss_size);
-        p_e_entrypoint_rva     = le_to_host(oh32.e_entrypoint_rva);
+        entry_rva              = le_to_host(oh32.e_entrypoint_rva);
         p_e_code_rva           = le_to_host(oh32.e_code_rva);
         p_e_data_rva           = le_to_host(oh32.e_data_rva);
-        p_e_image_base         = le_to_host(oh32.e_image_base);
+        p_base_va              = le_to_host(oh32.e_image_base);
         p_e_section_align      = le_to_host(oh32.e_section_align);
         p_e_file_align         = le_to_host(oh32.e_file_align);
         p_e_os_major           = le_to_host(oh32.e_os_major);
@@ -167,9 +177,8 @@
         p_e_heap_commit_size   = le_to_host(oh32.e_heap_commit_size);
         p_e_loader_flags       = le_to_host(oh32.e_loader_flags);
         p_e_num_rvasize_pairs  = le_to_host(oh32.e_num_rvasize_pairs);
-    } else if (0x020b == p_e_opt_magic) {
-        /* We guessed wrong so extend and read the 64-bit header. */
-        p_exec_format->set_word_size(8);
+    } else if (8==p_exec_format->get_word_size()) {
+        /* We guessed wrong. This is a 64-bit header, not 32-bit. */
         PE64OptHeader_disk oh64;
         memset(&oh64, 0, sizeof oh64);
         addr_t need64 = std::min(p_e_nt_hdr_size, (addr_t)(sizeof oh64));
@@ -180,10 +189,10 @@
         p_e_code_size          = le_to_host(oh64.e_code_size);
         p_e_data_size          = le_to_host(oh64.e_data_size);
         p_e_bss_size           = le_to_host(oh64.e_bss_size);
-        p_e_entrypoint_rva     = le_to_host(oh64.e_entrypoint_rva);
+        entry_rva              = le_to_host(oh64.e_entrypoint_rva);
         p_e_code_rva           = le_to_host(oh64.e_code_rva);
-     // p_e_data_rva         = le_to_host(oh.e_data_rva); /* not in PE32+ */
-        p_e_image_base         = le_to_host(oh64.e_image_base);
+     // p_e_data_rva           = le_to_host(oh.e_data_rva);             /* not in PE32+ */
+        p_base_va              = le_to_host(oh64.e_image_base);
         p_e_section_align      = le_to_host(oh64.e_section_align);
         p_e_file_align         = le_to_host(oh64.e_file_align);
         p_e_os_major           = le_to_host(oh64.e_os_major);
@@ -213,15 +222,9 @@
         p_magic.push_back(fh.e_magic[i]);
 
     /* File format */
-    p_exec_format->set_family(FAMILY_PE);
-    p_exec_format->set_purpose( p_e_flags & HF_PROGRAM ? PURPOSE_EXECUTABLE : PURPOSE_LIBRARY );
-    p_exec_format->set_sex( ORDER_LSB );
-    p_exec_format->set_abi( ABI_NT );
-    p_exec_format->set_abi_version(0);
- // p_exec_format.word_size   = ???; /*word size was set above*/
     ROSE_ASSERT(p_e_lmajor <= 0xffff && p_e_lminor <= 0xffff);
-    p_exec_format->set_version( (p_e_lmajor << 16) | p_e_lminor );
-    p_exec_format->set_is_current_version( true ); /*FIXME*/
+    p_exec_format->set_version((p_e_lmajor << 16) | p_e_lminor);
+    p_exec_format->set_is_current_version(true); /*FIXME*/
 
     /* Target architecture */
     switch (p_e_cpu_type) {
@@ -284,32 +287,32 @@
         set_isa(ISA_Mitsubishi_M32R);
         break;
       default:
+        fprintf(stderr, "Warning: SgAsmPEFileHeader::ctor::p_e_cputype = 0x%x (%u)\n", p_e_cpu_type, p_e_cpu_type);
         set_isa(ISA_OTHER);
         break;
     }
 
-    /* Entry point */
-    p_base_va = p_e_image_base;
-    add_entry_rva(p_e_entrypoint_rva);
+    /* Entry point. We will eventually bind the entry point to a particular section (in SgAsmPEFileHeader::parse) so that if
+     * sections are rearranged, extended, etc. the entry point will be updated automatically. */
+    add_entry_rva(entry_rva);
 }
 
 SgAsmPEFileHeader::~SgAsmPEFileHeader() 
 {
- // printf ("In ~SgAsmPEFileHeader() \n");
-
     ROSE_ASSERT(p_rvasize_pairs->get_pairs().empty() == true);
-    
- // Delete the pointers to the IR nodes containing the STL lists
+    // Delete the pointers to the IR nodes containing the STL lists
     delete p_rvasize_pairs;
     p_rvasize_pairs = NULL;
 }
 
 /* Encode the PE header into disk format */
 void *
-SgAsmPEFileHeader::encode(PEFileHeader_disk *disk)
+SgAsmPEFileHeader::encode(PEFileHeader_disk *disk) const
 {
     for (size_t i=0; i<NELMTS(disk->e_magic); i++)
         disk->e_magic[i] = get_magic()[i];
+
+
     host_to_le(p_e_cpu_type,           &(disk->e_cpu_type));
     host_to_le(p_e_nsections,          &(disk->e_nsections));
     host_to_le(p_e_time,               &(disk->e_time));
@@ -321,7 +324,7 @@
     return disk;
 }
 void *
-SgAsmPEFileHeader::encode(PE32OptHeader_disk *disk)
+SgAsmPEFileHeader::encode(PE32OptHeader_disk *disk) const
 {
     host_to_le(p_e_opt_magic,          &(disk->e_opt_magic));
     host_to_le(p_e_lmajor,             &(disk->e_lmajor));
@@ -329,10 +332,10 @@
     host_to_le(p_e_code_size,          &(disk->e_code_size));
     host_to_le(p_e_data_size,          &(disk->e_data_size));
     host_to_le(p_e_bss_size,           &(disk->e_bss_size));
-    host_to_le(p_e_entrypoint_rva,     &(disk->e_entrypoint_rva));
+    host_to_le(get_entry_rva(),        &(disk->e_entrypoint_rva));
     host_to_le(p_e_code_rva,           &(disk->e_code_rva));
     host_to_le(p_e_data_rva,           &(disk->e_data_rva));
-    host_to_le(p_e_image_base,         &(disk->e_image_base));
+    host_to_le(get_base_va(),          &(disk->e_image_base));
     host_to_le(p_e_section_align,      &(disk->e_section_align));
     host_to_le(p_e_file_align,         &(disk->e_file_align));
     host_to_le(p_e_os_major,           &(disk->e_os_major));
@@ -357,7 +360,7 @@
     return disk;
 }
 void *
-SgAsmPEFileHeader::encode(PE64OptHeader_disk *disk)
+SgAsmPEFileHeader::encode(PE64OptHeader_disk *disk) const
 {
     host_to_le(p_e_opt_magic,          &(disk->e_opt_magic));
     host_to_le(p_e_lmajor,             &(disk->e_lmajor));
@@ -365,10 +368,10 @@
     host_to_le(p_e_code_size,          &(disk->e_code_size));
     host_to_le(p_e_data_size,          &(disk->e_data_size));
     host_to_le(p_e_bss_size,           &(disk->e_bss_size));
-    host_to_le(p_e_entrypoint_rva,     &(disk->e_entrypoint_rva));
+    host_to_le(get_entry_rva(),        &(disk->e_entrypoint_rva));
     host_to_le(p_e_code_rva,           &(disk->e_code_rva));
  // host_to_le(p_e_data_rva,           &(disk->e_data_rva)); /* not present in PE32+ */
-    host_to_le(p_e_image_base,         &(disk->e_image_base));
+    host_to_le(get_base_va(),          &(disk->e_image_base));
     host_to_le(p_e_section_align,      &(disk->e_section_align));
     host_to_le(p_e_file_align,         &(disk->e_file_align));
     host_to_le(p_e_os_major,           &(disk->e_os_major));
@@ -402,6 +405,7 @@
     SgAsmPERVASizePair::RVASizePair_disk pairs_disk;
 
     ROSE_ASSERT(p_rvasize_pairs != NULL);
+    ROSE_ASSERT(p_rvasize_pairs->get_pairs().size()==0);
 
     extend_up_to(pairs_size);
     for (size_t i = 0; i < p_e_num_rvasize_pairs; i++, pairs_offset += sizeof pairs_disk) {
@@ -427,21 +431,21 @@
         /* Table names come from PE file specification and are hard coded by RVA/Size pair index */
         const char *tabname = NULL;
         switch (i) {
-          case 0:  tabname = "Export table";                 break;
-          case 1:  tabname = "Import table";                 break;
-          case 2:  tabname = "Resource table";               break;
-          case 3:  tabname = "Exception table";              break;
-          case 4:  tabname = "Certificate table";            break;
-          case 5:  tabname = "Base relocation table";        break;
+          case 0:  tabname = "Export Table";                 break;
+          case 1:  tabname = "Import Table";                 break;
+          case 2:  tabname = "Resource Table";               break;
+          case 3:  tabname = "Exception Table";              break;
+          case 4:  tabname = "Certificate Table";            break;
+          case 5:  tabname = "Base relocation Table";        break;
           case 6:  tabname = "Debug";                        break;
           case 7:  tabname = "Architecture";                 break;
-          case 8:  tabname = "Global ptr";                   break;
-          case 9:  tabname = "TLS table";                    break;
-          case 10: tabname = "Load config table";            break;
-          case 11: tabname = "Bound import";                 break;
-          case 12: tabname = "Import address table";         break;
-          case 13: tabname = "Delay import descriptor";      break;
-          case 14: tabname = "CLR runtime header";           break;
+          case 8:  tabname = "Global Ptr";                   break;
+          case 9:  tabname = "TLS Table";                    break;
+          case 10: tabname = "Load Config Table";            break;
+          case 11: tabname = "Bound Import";                 break;
+          case 12: tabname = "Import Address Table";         break;
+          case 13: tabname = "Delay Import Descriptor";      break;
+          case 14: tabname = "CLR Runtime Header";           break;
           case 15: ROSE_ASSERT(!"reserved; should be zero"); break;
           default: ROSE_ASSERT(!"too many RVA/Size pairs");  break;
         }
@@ -452,78 +456,271 @@
         if (!contained_in) {
             fprintf(stderr, "SgAsmPEFileHeader::create_table_sections(): pair-%zu, rva=0x%08"PRIx64", size=%"PRIu64" bytes \"%s\""
                     ": unable to find a section containing the virtual address (skipping)\n",
-                    i, pair->get_e_rva(), pair->get_e_size(), tabname?tabname:"");
+                    i, pair->get_e_rva().get_rva(), pair->get_e_size(), tabname?tabname:"");
             continue;
         }
-        addr_t file_offset = contained_in->get_rva_offset(pair->get_e_rva());
-        
+        addr_t file_offset = contained_in->get_rva_offset(pair->get_e_rva().get_rva());
 
-        SgAsmGenericSection *tabsec = new SgAsmGenericSection(ef, this, file_offset, pair->get_e_size());
+        /* Create the new section */
+        SgAsmGenericSection *tabsec = NULL;
+        switch (i) {
+          case 0:
+            tabsec = new SgAsmPEExportSection(this, file_offset, pair->get_e_size(), pair->get_e_rva().get_rva());
+            break;
+#if 1 /*not ready for prime-time yet (RPM 2008-10-29)*/
+          case 1:
+            tabsec = new SgAsmPEImportSection(this, file_offset, pair->get_e_size(), pair->get_e_rva().get_rva());
+            break;
+#endif
+          default:
+            tabsec = new SgAsmGenericSection(ef, this, file_offset, pair->get_e_size());
+            break;
+        }
         if (tabname) tabsec->set_name(new SgAsmBasicString(tabname));
         tabsec->set_synthesized(true);
         tabsec->set_purpose(SP_HEADER);
         tabsec->set_file_alignment(get_e_file_align());
         tabsec->set_mapped_alignment(get_e_section_align());
-        tabsec->set_mapped_rva(pair->get_e_rva());
+        tabsec->set_mapped_rva(pair->get_e_rva().get_rva());
         tabsec->set_mapped_size(pair->get_e_size());
         tabsec->set_mapped_rperm(true);
         tabsec->set_mapped_wperm(false);
         tabsec->set_mapped_xperm(false);
         pair->set_section(tabsec);
+        pair->set_e_rva(pair->get_e_rva().set_section(tabsec));
     }
 }
 
-/* Write the PE file header back to disk and all that it references */
-void
-SgAsmPEFileHeader::unparse(FILE *f)
+/* Change size of PE header based on word size */
+bool
+SgAsmPEFileHeader::reallocate()
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
+    bool reallocated = SgAsmGenericHeader::reallocate();
+    
+    /* Resize if necessary */
+    addr_t need = sizeof(PEFileHeader_disk);
+    if (4==get_word_size()) {
+        need += sizeof(PE32OptHeader_disk);
+    } else if (8==get_word_size()) {
+        need += sizeof(PE64OptHeader_disk);
+    } else {
+        throw FormatError("unsupported PE word size");
+    }
+    need += p_rvasize_pairs->get_pairs().size() * sizeof(SgAsmPERVASizePair::RVASizePair_disk);
+    if (need<get_size()) {
+        if (is_mapped()) {
+            ROSE_ASSERT(get_mapped_size()==get_size());
+            set_mapped_size(need);
+        }
+        set_size(need);
+        reallocated = true;
+    } else if (need>get_size()) {
+        get_file()->shift_extend(this, 0, need-get_size(), SgAsmGenericFile::ADDRSP_ALL, SgAsmGenericFile::ELASTIC_HOLE);
+        reallocated = true;
+    }
 
-    /* The fixed length part of the header */
-    PEFileHeader_disk fh;
-    encode(&fh);
+    /* Make sure header is consistent with sections. Reallocate() has already been called recursively for the sections.
+     * Count the number of sections in the table and update the header's e_nsections member. */
+    if (p_section_table) {
+        ROSE_ASSERT(p_section_table->get_header()==this);
+        SgAsmGenericSectionList *all = get_sections();
+        p_e_nsections = 0;
+        for (size_t i=0; i<all->get_sections().size(); i++) {
+            SgAsmPESection *pesec = dynamic_cast<SgAsmPESection*>(all->get_sections()[i]);
+            if (pesec && pesec->get_st_entry()!=NULL)
+                p_e_nsections++;
+        }
 
-    /* The optional header */
-    PE32OptHeader_disk oh32;
-    PE64OptHeader_disk oh64;
-    void *oh       = NULL;
-    size_t oh_size = 0;
+        addr_t header_size = ALIGN(p_section_table->get_offset() + p_section_table->get_size(),
+                                   p_e_file_align>0 ? p_e_file_align : 1);
+#if 1
+        /* The PE Specification regarding e_header_size (known as "SizeOfHeader" on page 14 of "Microsoft Portable Executable
+         * and Common Object File Format Specification: Revision 8.1 February 15, 2008" is not always followed. We recompute
+         * it here as being the minimum RVA from all the sections defined in the PE Section Table, but not smaller
+         * than the value according to the specification. This alternate value is kept if it's already in the parse tree,
+         * otherwise we use the correct value. (RPM 2008-10-21) */
+        addr_t min_offset;
+        for (size_t i=0, nfound=0; i<all->get_sections().size(); i++) {
+            SgAsmPESection *pesec = dynamic_cast<SgAsmPESection*>(all->get_sections()[i]);
+            if (pesec && pesec->get_st_entry()!=NULL) {
+                if (0==nfound++) {
+                    min_offset = pesec->get_offset();
+                } else {
+                    min_offset = std::min(min_offset, pesec->get_offset());
+                }
+            }
+        }
+        addr_t header_size2 = std::max(header_size, min_offset);
+        if (p_e_header_size==header_size2)
+            header_size = header_size2;
 
+        /* If the original header size was zero then don't change that--leave it at zero. Some tiny executables have a zero
+         * value here and as a result, since this is near the end of the NT Optional Header, they can truncate the file and
+         * the loader will fill the optional header with zeros when reading. (RPM 2008-11-11) */
+        if (p_e_header_size==0)
+            header_size = 0;
+#endif
+        p_e_header_size = header_size;
+    }
+            
+    /* Update COFF symbol table related data members in the file header */
+    if (p_coff_symtab) {
+        ROSE_ASSERT(p_coff_symtab->get_header()==this);
+        p_e_coff_symtab = p_coff_symtab->get_offset();
+        p_e_coff_nsyms = p_coff_symtab->get_symbols()->get_symbols().size();
+    }
+
+    /* Update some additional header fields */
+    p_e_num_rvasize_pairs = p_rvasize_pairs->get_pairs().size();
+    p_e_opt_magic = 4==get_word_size() ? 0x010b : 0x020b;
+    p_e_lmajor = (p_exec_format->get_version() >> 16) & 0xffff;
+    p_e_lminor = p_exec_format->get_version() & 0xffff;
+
+    /* Adjust the COFF Header's e_nt_hdr_size to accommodate the NT Optional Header in such a way that EXEs from tinype.com
+     * don't change (i.e., don't increase e_nt_hdr_size if the bytes beyond it are zero anyway, and if they aren't then adjust
+     * it as little as possible.  The RVA/Size pairs are considered to be part of the NT Optional Header. */
+    size_t oh_size = p_rvasize_pairs->get_pairs().size() * sizeof(SgAsmPERVASizePair::RVASizePair_disk);
+    size_t rvasize_offset; /*offset with respect to "oh" buffer allocated below*/
     if (4==get_word_size()) {
-        oh = encode(&oh32);
-        oh_size = sizeof oh32;
+        oh_size += sizeof(PE32OptHeader_disk);
     } else if (8==get_word_size()) {
-        oh = encode(&oh64);
-        oh_size = sizeof oh64;
+        oh_size += sizeof(PE64OptHeader_disk);
     } else {
-        ROSE_ASSERT(!"unsupported word size");
+        throw FormatError("unsupported PE word size");
     }
+    unsigned char *oh = new unsigned char[oh_size];
+    if (4==get_word_size()) {
+        encode((PE32OptHeader_disk*)oh);
+        rvasize_offset = sizeof(PE32OptHeader_disk);
+    } else if (8==get_word_size()) {
+        encode((PE64OptHeader_disk*)oh);
+        rvasize_offset = sizeof(PE64OptHeader_disk);
+    } else {
+        throw FormatError("unsupported PE word size");
+    }
+    while (oh_size>p_e_nt_hdr_size) {
+        if (0!=oh[oh_size-1]) break;
+        --oh_size;
+    }
+    p_e_nt_hdr_size = oh_size;
+    return reallocated;
+}
+
+/* Override ROSETTA accessors because we don't want users changing these values when traversing the AST */
+void
+SgAsmPEFileHeader::set_e_coff_symtab(addr_t a)
+{
+    ROSE_ASSERT(!get_congealed()); /*must be still parsing*/
+    p_e_coff_symtab = a;
+}
+void
+SgAsmPEFileHeader::set_e_coff_nsyms(unsigned n)
+{
+    ROSE_ASSERT(!get_congealed()); /*must still be parsing*/
+    p_e_coff_nsyms = n;
+}
+void
+SgAsmPEFileHeader::set_e_nsections(unsigned n)
+{
+    ROSE_ASSERT(!get_congealed()); /*must still be parsing*/
+    p_e_nsections = n;
+}
+void
+SgAsmPEFileHeader::set_e_header_size(unsigned n)
+{
+    ROSE_ASSERT(!get_congealed()); /*must still be parsing*/
+    p_e_header_size = n;
+}
+void
+SgAsmPEFileHeader::set_e_num_rvasize_pairs(unsigned n)
+{
+    ROSE_ASSERT(!get_congealed()); /*must still be parsing*/
+    p_e_num_rvasize_pairs = n;
+}
+void
+SgAsmPEFileHeader::set_e_lmajor(unsigned n)
+{
+    ROSE_ASSERT(!get_congealed()); /*must still be parsing*/
+    p_e_lmajor = n;
+}
+void
+SgAsmPEFileHeader::set_e_lminor(unsigned n)
+{
+    ROSE_ASSERT(!get_congealed()); /*must still be parsing*/
+    p_e_lminor = n;
+}
+
+/* Write the PE file header back to disk and all that it references */
+void
+SgAsmPEFileHeader::unparse(std::ostream &f) const
+{
+    /* Write unreferenced areas back to the file before anything else. */
+    unparse_holes(f);
     
-    /* Write file and optional header to disk */
-    addr_t spos = write(f, 0, sizeof fh, &fh);
-    spos = write(f, spos, oh_size, oh);
+    /* Write the PE section table and, indirectly, the sections themselves. */
+    if (p_section_table)
+        p_section_table->unparse(f);
 
-    /* The variable length RVA/size pair table and its sections */
-    for (size_t i = 0; i < p_e_num_rvasize_pairs; i++) {
-        SgAsmPERVASizePair::RVASizePair_disk rvasize_disk;
-        p_rvasize_pairs->get_pairs()[i]->encode(&rvasize_disk);
-        spos = write(f, spos, sizeof rvasize_disk, &rvasize_disk);
+    /* Write sections that are pointed to by the file header */
+    if (p_coff_symtab) {
+        ROSE_ASSERT(p_e_coff_symtab == p_coff_symtab->get_offset());
+        ROSE_ASSERT(p_e_coff_nsyms == p_coff_symtab->get_symbols()->get_symbols().size());
+        p_coff_symtab->unparse(f);
+    }
+    
+    /* Write the sections from the header RVA/size pair table. */
+    for (size_t i=0; i<p_rvasize_pairs->get_pairs().size(); i++) {
         SgAsmGenericSection *sizepair_section = p_rvasize_pairs->get_pairs()[i]->get_section();
         if (sizepair_section)
             sizepair_section->unparse(f);
     }
 
-    /* The extended DOS header */
-    if (p_dos2_header)
+    /* Write the extended DOS header */
+    if (p_dos2_header) {
+        ROSE_ASSERT(p_dos2_header->get_header()==this);
         p_dos2_header->unparse(f);
+    }
 
-    /* The section table and all the non-synthesized sections */
-    if (p_section_table)
-        p_section_table->unparse(f);
+    /* Encode the "NT Optional Header" before the COFF Header since the latter depends on the former. Adjust the COFF Header's
+     * e_nt_hdr_size to accommodate the NT Optional Header in such a way that EXEs from tinype.com don't change (i.e., don't
+     * increase e_nt_hdr_size if the bytes beyond it are zero anyway, and if they aren't then adjust it as little as possible.
+     * The RVA/Size pairs are considered to be part of the NT Optional Header. */
+    size_t oh_size = p_rvasize_pairs->get_pairs().size() * sizeof(SgAsmPERVASizePair::RVASizePair_disk);
+    size_t rvasize_offset; /*offset with respect to "oh" buffer allocated below*/
+    if (4==get_word_size()) {
+        oh_size += sizeof(PE32OptHeader_disk);
+    } else if (8==get_word_size()) {
+        oh_size += sizeof(PE64OptHeader_disk);
+    } else {
+        throw FormatError("unsupported PE word size");
+    }
+    unsigned char *oh = new unsigned char[oh_size];
+    if (4==get_word_size()) {
+        encode((PE32OptHeader_disk*)oh);
+        rvasize_offset = sizeof(PE32OptHeader_disk);
+    } else if (8==get_word_size()) {
+        encode((PE64OptHeader_disk*)oh);
+        rvasize_offset = sizeof(PE64OptHeader_disk);
+    } else {
+        throw FormatError("unsupported PE word size");
+    }
+    for (size_t i=0; i<p_rvasize_pairs->get_pairs().size(); i++, rvasize_offset+=sizeof(SgAsmPERVASizePair::RVASizePair_disk)) {
+        SgAsmPERVASizePair::RVASizePair_disk *rvasize_disk = (SgAsmPERVASizePair::RVASizePair_disk*)(oh+rvasize_offset);
+        p_rvasize_pairs->get_pairs()[i]->encode(rvasize_disk);
+    }
+    while (oh_size>p_e_nt_hdr_size) {
+        if (0!=oh[oh_size-1]) break;
+        --oh_size;
+    }
+    ROSE_ASSERT(p_e_nt_hdr_size==oh_size); /*set in reallocate()*/
 
-    /* Sections that aren't in the section table */
-    if (p_coff_symtab)
-        p_coff_symtab->unparse(f);
+    /* Write the fixed-length COFF Header */
+    PEFileHeader_disk fh;
+    encode(&fh);
+    addr_t spos = write(f, 0, sizeof fh, &fh);
+
+    /* Write the following "NT Optional Header" */
+    spos = write(f, spos, oh_size, oh);
 }
     
 /* Print some debugging information */
@@ -543,54 +740,51 @@
     strftime(time_str, sizeof time_str, "%c", localtime(&t));
 
     SgAsmGenericHeader::dump(f, p, -1);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_cpu_type",          p_e_cpu_type);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_nsections",         p_e_nsections);
-    fprintf(f, "%s%-*s = %u (%s)\n",       p, w, "e_time",              p_e_time, time_str);
-    fprintf(f, "%s%-*s = %"PRIu64"\n",     p, w, "e_coff_symtab",       p_e_coff_symtab);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_coff_nsyms",        p_e_coff_nsyms);
+    fprintf(f, "%s%-*s = 0x%04x (%u)\n",               p, w, "e_cpu_type",          p_e_cpu_type, p_e_cpu_type);
+    fprintf(f, "%s%-*s = %u\n",                        p, w, "e_nsections",         p_e_nsections);
+    fprintf(f, "%s%-*s = %u (%s)\n",                   p, w, "e_time",              p_e_time, time_str);
+    fprintf(f, "%s%-*s = 0x%08"PRIx64" (%"PRIu64")\n", p, w, "e_coff_symtab",       p_e_coff_symtab, p_e_coff_symtab);
+    fprintf(f, "%s%-*s = %u\n",                        p, w, "e_coff_nsyms",        p_e_coff_nsyms);
     if (p_coff_symtab) {
-        fprintf(f, "%s%-*s = [%d] \"%s\"\n", p, w, "coff_symtab", p_coff_symtab->get_id(), p_coff_symtab->get_name()->c_str());
+        fprintf(f, "%s%-*s = [%d] \"%s\"\n",           p, w, "coff_symtab",
+                p_coff_symtab->get_id(), p_coff_symtab->get_name()->c_str());
     } else {
-        fprintf(f, "%s%-*s = none\n",      p, w, "coff_symtab");
+        fprintf(f, "%s%-*s = none\n",                  p, w, "coff_symtab");
     }
-    fprintf(f, "%s%-*s = %"PRIu64"\n",     p, w, "e_nt_hdr_size",       p_e_nt_hdr_size);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_flags",             p_e_flags);
-    fprintf(f, "%s%-*s = 0x%04x %s\n",     p, w, "e_opt_magic",         p_e_opt_magic,
+    fprintf(f, "%s%-*s = 0x%08"PRIx64" (%"PRIu64")\n", p, w, "e_nt_hdr_size",       p_e_nt_hdr_size, p_e_nt_hdr_size);
+    fprintf(f, "%s%-*s = 0x%04x (%u)\n",               p, w, "e_flags",             p_e_flags, p_e_flags);
+    fprintf(f, "%s%-*s = 0x%04x %s\n",                 p, w, "e_opt_magic",         p_e_opt_magic,
             0x10b == p_e_opt_magic ? "PE32" : (0x20b == p_e_opt_magic ? "PE32+" : "other"));
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_lmajor",            p_e_lmajor);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_lminor",            p_e_lminor);
-    fprintf(f, "%s%-*s = %u bytes\n",      p, w, "e_code_size",         p_e_code_size);
-    fprintf(f, "%s%-*s = %u bytes\n",      p, w, "e_data_size",         p_e_data_size);
-    fprintf(f, "%s%-*s = %u bytes\n",      p, w, "e_bss_size",          p_e_bss_size);
-    fprintf(f, "%s%-*s = 0x%08x\n",        p, w, "e_entrypoint_rva",    p_e_entrypoint_rva);
-    fprintf(f, "%s%-*s = 0x%08x\n",        p, w, "e_code_rva",          p_e_code_rva);
-    fprintf(f, "%s%-*s = 0x%08x\n",        p, w, "e_data_rva",          p_e_data_rva);
-    fprintf(f, "%s%-*s = 0x%08"PRIx64"\n", p, w, "e_image_base",        p_e_image_base);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_section_align",     p_e_section_align);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_file_align",        p_e_file_align);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_os_major",          p_e_os_major);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_os_minor",          p_e_os_minor);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_user_major",        p_e_user_major);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_user_minor",        p_e_user_minor);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_subsys_major",      p_e_subsys_major);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_subsys_minor",      p_e_subsys_minor);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_reserved9",         p_e_reserved9);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_image_size",        p_e_image_size);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_header_size",       p_e_header_size);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_file_checksum",     p_e_file_checksum);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_subsystem",         p_e_subsystem);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_dll_flags",         p_e_dll_flags);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_stack_reserve_size",p_e_stack_reserve_size);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_stack_commit_size", p_e_stack_commit_size);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_heap_reserve_size", p_e_heap_reserve_size);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_heap_commit_size",  p_e_heap_commit_size);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_loader_flags",      p_e_loader_flags);
-    fprintf(f, "%s%-*s = %u\n",            p, w, "e_num_rvasize_pairs", p_e_num_rvasize_pairs);
-    for (unsigned i = 0; i < p_e_num_rvasize_pairs; i++) {
+    fprintf(f, "%s%-*s = %u.%u\n",                     p, w, "linker_vers",         p_e_lmajor, p_e_lminor);
+    fprintf(f, "%s%-*s = 0x%08x (%u) bytes\n",         p, w, "e_code_size",         p_e_code_size, p_e_code_size);
+    fprintf(f, "%s%-*s = 0x%08x (%u) bytes\n",         p, w, "e_data_size",         p_e_data_size, p_e_data_size);
+    fprintf(f, "%s%-*s = 0x%08x (%u) bytes\n",         p, w, "e_bss_size",          p_e_bss_size, p_e_bss_size);
+    fprintf(f, "%s%-*s = %s\n",                        p, w, "e_code_rva",          p_e_code_rva.to_string().c_str());
+    fprintf(f, "%s%-*s = %s\n",                        p, w, "e_data_rva",          p_e_data_rva.to_string().c_str());
+    fprintf(f, "%s%-*s = 0x%08x (%u)\n",               p, w, "e_section_align",     p_e_section_align, p_e_section_align);
+    fprintf(f, "%s%-*s = 0x%08x (%u)\n",               p, w, "e_file_align",        p_e_file_align, p_e_file_align);
+    fprintf(f, "%s%-*s = %u.%u\n",                     p, w, "os_vers",             p_e_os_major, p_e_os_minor);
+    fprintf(f, "%s%-*s = %u.%u\n",                     p, w, "user_vers",           p_e_user_major, p_e_user_minor);
+    fprintf(f, "%s%-*s = %u.%u\n",                     p, w, "subsys_vers",         p_e_subsys_major, p_e_subsys_minor);
+    fprintf(f, "%s%-*s = %u\n",                        p, w, "e_reserved9",         p_e_reserved9);
+    fprintf(f, "%s%-*s = 0x%08x (%u)\n",               p, w, "e_image_size",        p_e_image_size, p_e_image_size);
+    fprintf(f, "%s%-*s = 0x%08x (%u)\n",               p, w, "e_header_size",       p_e_header_size, p_e_header_size);
+    fprintf(f, "%s%-*s = 0x%08x (%u)\n",               p, w, "e_file_checksum",     p_e_file_checksum, p_e_file_checksum);
+    fprintf(f, "%s%-*s = %u\n",                        p, w, "e_subsystem",         p_e_subsystem);
+    fprintf(f, "%s%-*s = 0x%04x (%u)\n",               p, w, "e_dll_flags",         p_e_dll_flags, p_e_dll_flags);
+    fprintf(f, "%s%-*s = 0x%08x (%u)\n",               p, w, "e_stack_reserve_size",
+            p_e_stack_reserve_size, p_e_stack_reserve_size);
+    fprintf(f, "%s%-*s = 0x%08x (%u)\n",               p, w, "e_stack_commit_size", p_e_stack_commit_size, p_e_stack_commit_size);
+    fprintf(f, "%s%-*s = 0x%08x (%u)\n",               p, w, "e_heap_reserve_size", p_e_heap_reserve_size, p_e_heap_reserve_size);
+    fprintf(f, "%s%-*s = 0x%08x (%u)\n",               p, w, "e_heap_commit_size",  p_e_heap_commit_size, p_e_heap_commit_size);
+    fprintf(f, "%s%-*s = 0x%08x (%u)\n",               p, w, "e_loader_flags",      p_e_loader_flags, p_e_loader_flags);
+    fprintf(f, "%s%-*s = %u\n",                        p, w, "e_num_rvasize_pairs", p_e_num_rvasize_pairs);
+    for (unsigned i = 0; i < p_rvasize_pairs->get_pairs().size(); i++) {
         sprintf(p, "%sPEFileHeader.pair[%d].", prefix, i);
         w = std::max(1, DUMP_FIELD_WIDTH-(int)strlen(p));
-        fprintf(f, "%s%-*s = 0x%08" PRIx64 "\n",  p, w, "e_rva",  p_rvasize_pairs->get_pairs()[i]->get_e_rva());
-        fprintf(f, "%s%-*s = %" PRIu64 " bytes\n", p, w, "e_size", p_rvasize_pairs->get_pairs()[i]->get_e_size());
+        fprintf(f, "%s%-*s = rva %s,\tsize 0x%08"PRIx64" (%"PRIu64")\n", p, w, "..",
+                p_rvasize_pairs->get_pairs()[i]->get_e_rva().to_string().c_str(),
+                p_rvasize_pairs->get_pairs()[i]->get_e_size(), p_rvasize_pairs->get_pairs()[i]->get_e_size());
     }
     if (p_dos2_header) {
         fprintf(f, "%s%-*s = [%d] \"%s\"\n", p, w, "dos2_header", p_dos2_header->get_id(), p_dos2_header->get_name()->c_str());
@@ -604,7 +798,8 @@
         fprintf(f, "%s%-*s = none\n", p, w, "section_table");
     }
 
-    hexdump(f, 0, std::string(p)+"data at ", p_data);
+    if (variantT() == V_SgAsmPEFileHeader) //unless a base class
+        hexdump(f, 0, std::string(p)+"data at ", p_data);
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -632,7 +827,7 @@
 
 /* Encodes a section table entry back into disk format. */
 void *
-SgAsmPESectionTableEntry::encode(PESectionTableEntry_disk *disk)
+SgAsmPESectionTableEntry::encode(PESectionTableEntry_disk *disk) const
 {
     memset(disk->name, 0, sizeof(disk->name));
 
@@ -690,9 +885,11 @@
     }
 
     SgAsmGenericSection::dump(f, p, -1);
-    p_st_entry->dump(f, p, -1);
+    if (p_st_entry)
+        p_st_entry->dump(f, p, -1);
 
-    hexdump(f, 0, std::string(p)+"data at ", p_data);
+    if (variantT() == V_SgAsmPESection) //unless a base class
+        hexdump(f, 0, std::string(p)+"data at ", p_data);
 }
 
 /* Constructor */
@@ -746,10 +943,8 @@
 
 /* Writes the section table back to disk along with each of the sections. */
 void
-SgAsmPESectionTable::unparse(FILE *f)
+SgAsmPESectionTable::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
-
     SgAsmPEFileHeader *fhdr = dynamic_cast<SgAsmPEFileHeader*>(get_header());
     ROSE_ASSERT(fhdr != NULL);
     SgAsmGenericSectionPtrList sections = fhdr->get_sections()->get_sections();
@@ -785,7 +980,8 @@
 
     SgAsmGenericSection::dump(f, p, -1);
 
-    hexdump(f, 0, std::string(p)+"data at ", p_data);
+    if (variantT() == V_SgAsmPESectionTable) //unless a base class
+        hexdump(f, 0, std::string(p)+"data at ", p_data);
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -794,27 +990,77 @@
 
 /* Constructor */
 void
-SgAsmPEImportDirectory::ctor(const PEImportDirectory_disk *disk)
+SgAsmPEImportDirectory::ctor(SgAsmPEImportSection *section, size_t idx)
 {
-    p_hintnames_rva   = le_to_host(disk->hintnames_rva);
-    p_time            = le_to_host(disk->time);
-    p_forwarder_chain = le_to_host(disk->forwarder_chain);
-    p_dll_name_rva    = le_to_host(disk->dll_name_rva);
-    p_bindings_rva    = le_to_host(disk->bindings_rva);
+    SgAsmPEFileHeader *fhdr = dynamic_cast<SgAsmPEFileHeader*>(section->get_header());
+    ROSE_ASSERT(fhdr!=NULL);
+
+    set_parent(section);
+
+    size_t entry_size = sizeof(PEImportDirectory_disk);
+    PEImportDirectory_disk disk, zero;
+    memset(&zero, 0, sizeof zero);
+    section->content(idx*entry_size, entry_size, &disk);
+
+    if (0==memcmp(&disk, &zero, sizeof zero)) {
+        p_idx = -1;
+    } else {
+        p_idx = idx;
+    }
+    
+    p_ilt_rva         = le_to_host(disk.ilt_rva);
+    p_time            = le_to_host(disk.time);
+    p_forwarder_chain = le_to_host(disk.forwarder_chain);
+    p_dll_name_rva    = le_to_host(disk.dll_name_rva);
+    p_iat_rva         = le_to_host(disk.iat_rva);
+
+    /* Bind RVAs to best sections */
+    p_ilt_rva.bind(fhdr);
+    p_dll_name_rva.bind(fhdr);
+    p_iat_rva.bind(fhdr);
+
+    if (p_dll_name_rva.get_section()) {
+        p_dll_name = new SgAsmBasicString(p_dll_name_rva.get_section()->content_str(p_dll_name_rva.get_rel()));
+    } else {
+        p_dll_name = NULL;
+    }
 }
 
 /* Encode a directory entry back into disk format */
 void *
-SgAsmPEImportDirectory::encode(PEImportDirectory_disk *disk)
+SgAsmPEImportDirectory::encode(PEImportDirectory_disk *disk) const
 {
-    host_to_le(p_hintnames_rva,   &(disk->hintnames_rva));
-    host_to_le(p_time,            &(disk->time));
-    host_to_le(p_forwarder_chain, &(disk->forwarder_chain));
-    host_to_le(p_dll_name_rva,    &(disk->dll_name_rva));
-    host_to_le(p_bindings_rva,    &(disk->bindings_rva));
+    host_to_le(p_ilt_rva.get_rva(),      &(disk->ilt_rva));
+    host_to_le(p_time,                   &(disk->time));
+    host_to_le(p_forwarder_chain,        &(disk->forwarder_chain));
+    host_to_le(p_dll_name_rva.get_rva(), &(disk->dll_name_rva));
+    host_to_le(p_iat_rva.get_rva(),      &(disk->iat_rva));
     return disk;
 }
 
+void
+SgAsmPEImportDirectory::unparse(std::ostream &f, const SgAsmPEImportSection *section) const
+{
+    ROSE_ASSERT(get_idx()>=0);
+
+    SgAsmPEFileHeader *fhdr = dynamic_cast<SgAsmPEFileHeader*>(section->get_header());
+    ROSE_ASSERT(fhdr!=NULL);
+
+    if (p_dll_name_rva>0) {
+        addr_t spos = p_dll_name_rva.get_section()->write(f, p_dll_name_rva.get_rel(), p_dll_name->get_string());
+        p_dll_name_rva.get_section()->write(f, spos, '\0');
+    }
+    if (p_ilt)
+        p_ilt->unparse(f, fhdr, p_ilt_rva);
+    if (p_iat)
+        p_iat->unparse(f, fhdr, p_iat_rva);
+    
+    PEImportDirectory_disk disk;
+    encode(&disk);
+    section->write(f, get_idx()*sizeof disk, sizeof disk, &disk);
+}
+
+
 /* Print debugging info */
 void
 SgAsmPEImportDirectory::dump(FILE *f, const char *prefix, ssize_t idx)
@@ -826,309 +1072,621 @@
         sprintf(p, "%sPEImportDirectory.", prefix);
     }
     const int w = std::max(1, DUMP_FIELD_WIDTH-(int)strlen(p));
+
+    fprintf(f, "%s%-*s = %s",          p, w, "dll_name_rva", p_dll_name_rva.to_string().c_str());
+    if (p_dll_name)
+        fprintf(f, " \"%s\"", p_dll_name->c_str());
+    fputc('\n', f);
+
+    fprintf(f, "%s%-*s = %s\n",          p, w, "ilt_rva", p_ilt_rva.to_string().c_str());
+    fprintf(f, "%s%-*s = %s\n",          p, w, "iat_rva", p_iat_rva.to_string().c_str());
+    fprintf(f, "%s%-*s = %lu %s",        p, w, "time", (unsigned long)p_time, ctime(&p_time));
+    fprintf(f, "%s%-*s = 0x%08x (%u)\n", p, w, "forwarder_chain", p_forwarder_chain, p_forwarder_chain);
+    if (p_ilt)
+        p_ilt->dump(f, p, -1);
+    if (p_iat)
+        p_iat->dump(f, p, -1);
+}
+
+/* Construct an Import Lookup Table Entry or a Lookup Address Table Entry */
+void
+SgAsmPEImportILTEntry::ctor(SgAsmPEImportSection *isec, uint64_t ilt_word)
+{
+    SgAsmPEFileHeader *fhdr = dynamic_cast<SgAsmPEFileHeader*>(isec->get_header());
+    ROSE_ASSERT(fhdr!=NULL);
+    p_hnt_entry = NULL;
+
+    /* Initialize */
+    p_ordinal = 0;
+    p_hnt_entry_rva = 0;
+    p_hnt_entry = NULL;
+    p_extra_bits = 0;
+    p_bound_rva = 0;
+
+    /* Masks for different word sizes */
+    uint64_t ordmask;                                           /* if bit is set then ILT Entry is an Ordinal */
+    uint64_t hnrvamask = 0x7fffffff;                            /* Hint/Name RVA mask (both word sizes use 31 bits) */
+    if (4==fhdr->get_word_size()) {
+        ordmask = (uint64_t)1<<31;
+    } else if (8==fhdr->get_word_size()) {
+        ordmask = (uint64_t)1<<63;
+    } else {
+        throw FormatError("unsupported PE word size");
+    }
     
-    fprintf(f, "%s%-*s = 0x%08"PRIx64"\n", p, w, "hintnames_rva",   p_hintnames_rva);
-    fprintf(f, "%s%-*s = %lu %s",          p, w, "time",            (unsigned long)p_time, ctime(&p_time));
-    fprintf(f, "%s%-*s = %u\n",            p, w, "forwarder_chain", p_forwarder_chain);
-    fprintf(f, "%s%-*s = 0x%08"PRIx64"\n", p, w, "dll_name_rva",    p_dll_name_rva);
-    fprintf(f, "%s%-*s = 0x%08"PRIx64"\n", p, w, "bindings_rva",    p_bindings_rva);
+    if (ilt_word & ordmask) {
+        /* Ordinal */
+        p_entry_type = ILT_ORDINAL;
+        p_ordinal = ilt_word & 0xffff;
+        p_extra_bits = ilt_word & ~(ordmask|0xffff);
+    } else if (0!=(ilt_word & ~hnrvamask) || NULL==fhdr->get_best_section_by_va((ilt_word&hnrvamask) + fhdr->get_base_va())) {
+        /* Bound address */
+        p_entry_type = ILT_BOUND_RVA;
+        p_bound_rva = ilt_word;
+        p_bound_rva.bind(fhdr);
+    } else {
+        /* Hint/Name Pair RVA */
+        p_entry_type = ILT_HNT_ENTRY_RVA;
+        p_hnt_entry_rva = ilt_word & hnrvamask;
+        p_hnt_entry_rva.bind(fhdr);
+    }
 }
 
-/* Constructor */
+/* Encode the PE Import Lookup Table or PE Import Address Table object into a word. */
+uint64_t
+SgAsmPEImportILTEntry::encode(const SgAsmPEFileHeader *fhdr) const
+{
+    uint64_t w = 0;
+
+    /* Masks for different word sizes */
+    uint64_t ordmask;                                           /* if bit is set then ILT Entry is an Ordinal */
+    if (4==fhdr->get_word_size()) {
+        ordmask = (uint64_t)1<<31;
+    } else if (8==fhdr->get_word_size()) {
+        ordmask = (uint64_t)1<<63;
+    } else {
+        throw FormatError("unsupported PE word size");
+    }
+    
+    switch (p_entry_type) {
+      case ILT_ORDINAL:
+        w |= ordmask | p_extra_bits | p_ordinal;
+        break;
+      case ILT_BOUND_RVA:
+        w |= p_bound_rva.get_rva();
+        break;
+      case ILT_HNT_ENTRY_RVA:
+        w |= p_hnt_entry_rva.get_rva();
+        break;
+    }
+    return w;
+}
+
 void
-SgAsmPEImportHintName::ctor(SgAsmGenericSection *section, addr_t offset)
+SgAsmPEImportILTEntry::unparse(std::ostream &f, const SgAsmPEFileHeader *fhdr, rva_t rva, size_t idx) const
 {
-    PEImportHintName_disk disk;
-    section->content(offset, sizeof disk, &disk);
-    p_hint = le_to_host(disk.hint);
-    p_name = section->content_str(offset+sizeof disk);
-    p_padding = (p_name.size()+1) % 2 ? *(section->content(offset + sizeof(disk)+ p_name.size() + 1, 1)) : '\0';
+    ROSE_ASSERT(rva.get_section()!=NULL);
+    uint64_t ilt_entry_word = encode(fhdr);
+    if (4==fhdr->get_word_size()) {
+        uint32_t ilt_entry_disk;
+        host_to_le(ilt_entry_word, &ilt_entry_disk);
+        rva.get_section()->write(f, rva.get_rel()+idx*4, 4, &ilt_entry_disk);
+    } else if (8==fhdr->get_word_size()) {
+        uint64_t ilt_entry_disk;
+        host_to_le(ilt_entry_word, &ilt_entry_disk);
+        rva.get_section()->write(f, rva.get_rel()+idx*8, 8, &ilt_entry_disk);
+    } else {
+        throw FormatError("unsupported PE word size");
+    }
+
+    if (p_hnt_entry)
+        p_hnt_entry->unparse(f, p_hnt_entry_rva);
 }
 
-/* Writes the hint/name back to disk at the specified offset */
+/* Print debugging info for an Import Lookup Table Entry or an Import Address Table Entry */
 void
-SgAsmPEImportHintName::unparse(FILE *f, SgAsmGenericSection *section, addr_t spos)
+SgAsmPEImportILTEntry::dump(FILE *f, const char *prefix, ssize_t idx)
 {
-    /* The hint */
-    uint16_t hint_le;
+    char p[4096];
+    if (idx>=0) {
+        sprintf(p, "%sentry[%zd].", prefix, idx);
+    } else {
+        sprintf(p, "%sentry.", prefix);
+    }
+    const int w = std::max(1, DUMP_FIELD_WIDTH-(int)strlen(p));
 
- // DQ (8/16/2008): Assertion on p_hint in host_to_le
-    assert(0==(p_hint & ~0xffff));
+    switch (p_entry_type) {
+      case ILT_ORDINAL:
+        fprintf(f, "%s%-*s = 0x%04x (%u)\n", p, w, "ordinal", p_ordinal, p_ordinal);
+        break;
+      case ILT_HNT_ENTRY_RVA:
+        fprintf(f, "%s%-*s = %s\n", p, w, "hnt_entry_rva", p_hnt_entry_rva.to_string().c_str());
+        break;
+      case ILT_BOUND_RVA:
+        fprintf(f, "%s%-*s = %s\n", p, w, "bound_rva", p_bound_rva.to_string().c_str());
+        break;
+      default:
+        ROSE_ASSERT(!"PE Import Lookup Table entry type is not valid");
+    }
+    if (p_extra_bits)
+        fprintf(f, "%s%-*s = 0x%08"PRIx64"\n", p, w, "extra_bits", p_extra_bits);
+    if (p_hnt_entry)
+        p_hnt_entry->dump(f, p, -1);
+}
 
-    host_to_le(p_hint, &hint_le);
-    spos = section->write(f, spos, sizeof hint_le, &hint_le);
+/* Constructor. rva is the address of the table and should be bound to a section (which may not necessarily be isec). This
+ * C object represents one of two PE objects depending on the value of is_iat.
+ *    true  => PE Import Address Table
+ *    false => PE Import Lookup Table */
+void
+SgAsmPEImportLookupTable::ctor(SgAsmPEImportSection *isec, rva_t rva, size_t idir_idx, bool is_iat)
+{
+    ROSE_ASSERT(p_entries==NULL);
+    p_entries = new SgAsmPEImportILTEntryList();
+    p_entries->set_parent(this);
+    p_is_iat = is_iat;
+    const char *tname = is_iat ? "Import Address Table" : "Import Lookup Table";
 
-    /* NUL-terminated name */
-    spos = section->write(f, spos, p_name);
-    spos = section->write(f, spos, '\0');
+    SgAsmPEFileHeader *fhdr = dynamic_cast<SgAsmPEFileHeader*>(isec->get_header());
+    ROSE_ASSERT(fhdr!=NULL);
+
+    /* Read the Import Lookup (or Address) Table, an array of 32 or 64 bit values, the last of which is zero */
+    if (!rva.get_section()) {
+        fprintf(stderr, "SgAsmPEImportSection::ctor: error: in PE Import Directory entry %zu "
+                "%s RVA (0x%08"PRIx64") is not in the mapped address space.\n",
+                idir_idx, tname, rva.get_rva());
+        return;
+    }
     
-    /* Padding to make an even size */
-    if ((p_name.size() + 1) % 2)
-        section->write(f, spos, p_padding);
+    if (rva.get_section()!=isec) {
+        fprintf(stderr, "SgAsmPEImportSection::ctor: warning: %s RVA is outside PE Import Table\n", tname);
+        fprintf(stderr, "        Import Directory Entry #%zu\n", idir_idx);
+        fprintf(stderr, "        %s RVA is %s\n", tname, rva.to_string().c_str());
+        fprintf(stderr, "        PE Import Table mapped from 0x%08"PRIx64" to 0x%08"PRIx64"\n", 
+                isec->get_mapped_rva(), isec->get_mapped_rva()+isec->get_mapped_size());
+    }
+
+    for (size_t i=0; 1; i++) {
+        uint64_t ilt_entry_word=0;
+        if (4==fhdr->get_word_size()) {
+            const uint32_t *ilt_entry_disk;
+            ilt_entry_disk = (const uint32_t*)rva.get_section()->content(rva.get_rel(), sizeof ilt_entry_disk);
+            ilt_entry_word = le_to_host(*ilt_entry_disk);
+        } else if (8==fhdr->get_word_size()) {
+            const uint64_t *ilt_entry_disk;
+            ilt_entry_disk = (const uint64_t*)rva.get_section()->content(rva.get_rel(), sizeof ilt_entry_disk);
+            ilt_entry_word = le_to_host(*ilt_entry_disk);
+        } else {
+            throw FormatError("unsupported PE word size");
+        }
+        rva.set_rva(rva.get_rva()+fhdr->get_word_size()); /*advance to next entry of table*/
+        if (0==ilt_entry_word)
+            break;
+
+        SgAsmPEImportILTEntry *ilt_entry = new SgAsmPEImportILTEntry(isec, ilt_entry_word);
+        add_ilt_entry(ilt_entry);
+
+        if (SgAsmPEImportILTEntry::ILT_HNT_ENTRY_RVA==ilt_entry->get_entry_type()) {
+            SgAsmPEImportHNTEntry *hnt_entry = new SgAsmPEImportHNTEntry(ilt_entry->get_hnt_entry_rva());
+            ilt_entry->set_hnt_entry(hnt_entry);
+            hnt_entry->set_parent(ilt_entry);
+        }
+    }
 }
 
-/* Print debugging info */
+/* Adds another Import Lookup Table Entry or Import Address Table Entry to the Import Lookup Table */
 void
-SgAsmPEImportHintName::dump(FILE *f, const char *prefix, ssize_t idx)
+SgAsmPEImportLookupTable::add_ilt_entry(SgAsmPEImportILTEntry *ilt_entry)
 {
+    ROSE_ASSERT(p_entries!=NULL);
+    ROSE_ASSERT(ilt_entry);
+    p_entries->get_vector().push_back(ilt_entry);
+    ROSE_ASSERT(p_entries->get_vector().size()>0);
+    ilt_entry->set_parent(this);
+}
+
+void
+SgAsmPEImportLookupTable::unparse(std::ostream &f, const SgAsmPEFileHeader *fhdr, rva_t rva) const
+{
+    if (rva!=0) {
+        const char *tname = p_is_iat ? "Import Address Table" : "Import Lookup Table";
+        for (size_t i=0; i<p_entries->get_vector().size(); i++) {
+            SgAsmPEImportILTEntry *ilt_entry = p_entries->get_vector()[i];
+            ilt_entry->unparse(f, fhdr, rva, i);
+        }
+
+        /* Zero terminated */
+        uint64_t zero = 0;
+        ROSE_ASSERT(fhdr->get_word_size()<=sizeof zero);
+        addr_t spos = rva.get_rel() + p_entries->get_vector().size() * fhdr->get_word_size();
+        rva.get_section()->write(f, spos, fhdr->get_word_size(), &zero);
+    }
+}
+
+/* Print some debugging info for an Import Lookup Table or Import Address Table */
+void
+SgAsmPEImportLookupTable::dump(FILE *f, const char *prefix, ssize_t idx)
+{
+    prefix = "    ...";
+    const char *tabbr = p_is_iat ? "IAT" : "ILT";
     char p[4096];
     if (idx>=0) {
-        sprintf(p, "%sImporNameHint[%zd].", prefix, idx);
+        sprintf(p, "%s%s[%zd].", prefix, tabbr, idx);
     } else {
-        sprintf(p, "%sImporNameHint.", prefix);
+        sprintf(p, "%s%s.", prefix, tabbr);
     }
     const int w = std::max(1, DUMP_FIELD_WIDTH-(int)strlen(p));
     
-    fprintf(f, "%s%-*s = %u\n",     p, w, "hint",    p_hint);
-    fprintf(f, "%s%-*s = \"%s\"\n", p, w, "name",    p_name.c_str());
-    fprintf(f, "%s%-*s = 0x%02x\n", p, w, "padding", p_padding);
+    fprintf(f, "%s%-*s = %zu\n", p, w, "nentries", p_entries->get_vector().size());
+    for (size_t i=0; i<p_entries->get_vector().size(); i++) {
+        SgAsmPEImportILTEntry *ilt_entry = p_entries->get_vector()[i];
+        ilt_entry->dump(f, p, i);
+    }
 }
 
 /* Constructor */
 void
-SgAsmPEDLL::ctor() 
+SgAsmPEImportHNTEntry::ctor(rva_t rva)
 {
-    p_hintnames = new SgAsmPEImportHintNameList;
-    p_hintnames->set_parent(this);
+    ROSE_ASSERT(rva.get_rva() % 2 == 0);
+    ROSE_ASSERT(rva.get_section());
+
+    const uint16_t *hint_disk = (const uint16_t*)rva.get_section()->content(rva.get_rel(), 2);
+    p_hint = le_to_host(*hint_disk);
+    
+    const char *s = (const char*)rva.get_section()->content_str(rva.get_rel()+2);
+    p_name = new SgAsmBasicString(s);
+    
+    if ((strlen(s)+1) % 2) {
+        p_padding = *(rva.get_section()->content(rva.get_rel()+2+strlen(s)+1, 1));
+    } else {
+        p_padding = 0;
+    }
 }
 
+void
+SgAsmPEImportHNTEntry::unparse(std::ostream &f, rva_t rva) const
+{
+    uint16_t hint_disk;
+    host_to_le(p_hint, &hint_disk);
+    addr_t spos = rva.get_rel();
+    spos = rva.get_section()->write(f, spos, 2, &hint_disk);
+    spos = rva.get_section()->write(f, spos, p_name->get_string());
+    spos = rva.get_section()->write(f, spos, '\0');
+    if ((p_name->get_string().size()+1) % 2)
+        rva.get_section()->write(f, spos, p_padding);
+}
+
 /* Print debugging info */
 void
-SgAsmPEDLL::dump(FILE *f, const char *prefix, ssize_t idx)
+SgAsmPEImportHNTEntry::dump(FILE *f, const char *prefix, ssize_t idx)
 {
     char p[4096];
     if (idx>=0) {
-        sprintf(p, "%sPEDLL[%zd].", prefix, idx);
+        sprintf(p, "%sHNTEntry[%zd].", prefix, idx);
     } else {
-        sprintf(p, "%sPEDLL.", prefix);
+        sprintf(p, "%sHNTEntry.", prefix);
     }
     const int w = std::max(1, DUMP_FIELD_WIDTH-(int)strlen(p));
-    SgAsmGenericDLL::dump(f, p, -1);
-    if (p_idir)
-        p_idir->dump(f, p, -1);
-    for (size_t i=0; i < p_hintname_rvas.size(); i++) {
-        fprintf(f, "%s%-*s = [%zu] 0x%08"PRIx64"\n", p, w, "hintname_rva", i, p_hintname_rvas[i]);
-        fprintf(f, "%s%-*s = [%zu] 0x%08"PRIx64"\n", p, w, "binding", i, p_bindings[i]);
-    }
+    
+    fprintf(f, "%s%-*s = %u\t\"%s\"", p, w, "hint/name", p_hint, p_name->c_str());
+    if ((p_name->get_string().size()+1)%2)
+        fprintf(f, " + '\\%03o'", p_padding);
+    fputc('\n', f);
 }
 
-/* Constructor */
+/** Constructor for PE import data. Constructs an SgAsmPEImportSection that represents either a PE ".idata" section as defined
+ *  by the PE Section Table, or a PE Import Table as described by the RVA/Size pairs at the end of the NT Optional Header. The
+ *  ".idata" section and PE Import Table both have the same format, which is generally:
+ * 
+ * @code
+ * +-------------------------------+  Starts at address zero of the .idata
+ * | Import Directory Table:       |  section or PE Import Table. Each Directory
+ * |   Import Directory Entry #0   |  represents one library and all  its
+ * |   Import Directory Entry #1   |  associated symbols.
+ * |   ...                         |
+ * |   Zero-filled Directory Entry |
+ * +-------------------------------+
+ *
+ * +-------------------------------+  One table per dynamic library, starting
+ * | Import Lookup Table (ILT)     |  at arbitrary RVA specified in the
+ * |   ILT Entry #0                |  Directory Table.
+ * |   ILT Entry #1                |
+ * |   Zero-filled ILTEntry        |
+ * +-------------------------------+
+ *
+ * +-------------------------------+  There is no starting RVA for this table.
+ * | Hint-Name Table               |  Rather, ILT Entries each contain an RVA
+ * |                               |  to an entry in the Hint-Name Table.
+ * +-------------------------------+
+ * @endcode
+ */
 void
 SgAsmPEImportSection::ctor(addr_t offset, addr_t size, addr_t mapped_rva)
 {
+    set_mapped_rva(mapped_rva);
+    set_mapped_size(size);
+    p_import_directories = new SgAsmPEImportDirectoryList();
+    p_import_directories->set_parent(this);
+
     SgAsmPEFileHeader *fhdr = dynamic_cast<SgAsmPEFileHeader*>(get_header());
     ROSE_ASSERT(fhdr!=NULL);
 
-    size_t entry_size = sizeof(SgAsmPEImportDirectory::PEImportDirectory_disk);
-    SgAsmPEImportDirectory::PEImportDirectory_disk zero;
-    memset(&zero, 0, sizeof zero);
+    for (size_t i = 0; 1; i++) {
+        /* Read idata directory entries. The list is terminated with a zero-filled entry whose idx will be negative */
+        SgAsmPEImportDirectory *idir = new SgAsmPEImportDirectory(this, i);
+        if (idir->get_idx()<0) {
+            delete idir;
+            break;
+        }
 
-    p_dlls = new SgAsmPEDLLList();
-    p_dlls->set_parent(this);
+        /* Library name warnings and errors */
+        rva_t rva = idir->get_dll_name_rva();
+        if (!rva.get_section()) {
+            fprintf(stderr, "SgAsmPEImportSection::ctor: error: in PE Import Directory entry %zu "
+                    "Name RVA (0x%08"PRIx64") is not in the mapped address space.\n",
+                    i, rva.get_rva());
+        } else if (rva.get_section()!=this) {
+            fprintf(stderr, "SgAsmPEImportSection::ctor: warning: Name RVA is outside PE Import Table\n");
+            fprintf(stderr, "        Import Directory Entry #%zu\n", i);
+            fprintf(stderr, "        Name RVA is %s\n", rva.to_string().c_str());
+            fprintf(stderr, "        PE Import Table mapped from 0x%08"PRIx64" to 0x%08"PRIx64"\n", 
+                    get_mapped_rva(), get_mapped_rva()+get_mapped_size());
+        }
 
-    /* Read idata directory entries--one per DLL*/
-    for (size_t i = 0; 1; i++) {
-        /* End of list is marked by an entry of all zero. */
-        SgAsmPEImportDirectory::PEImportDirectory_disk idir_disk;
-        content(i*entry_size, entry_size, &idir_disk);
-        if (!memcmp(&zero, &idir_disk, sizeof zero)) break;
-        SgAsmPEImportDirectory *idir = new SgAsmPEImportDirectory(&idir_disk);
+        /* Import Lookup Table */
+        SgAsmPEImportLookupTable *ilt = new SgAsmPEImportLookupTable(this, idir->get_ilt_rva(), i, false);
+        idir->set_ilt(ilt);
+        ilt->set_parent(idir);
 
-        /* The library's name is indicated by RVA. We need a section offset instead. */
-        ROSE_ASSERT(idir->get_dll_name_rva() >= mapped_rva);
-        addr_t dll_name_offset = idir->get_dll_name_rva() - mapped_rva;
-        std::string dll_name = content_str(dll_name_offset);
+        /* Import Address Table (same class as the Import Lookup Table) */
+        SgAsmPEImportLookupTable *iat = new SgAsmPEImportLookupTable(this, idir->get_iat_rva(), i, true);
+        idir->set_iat(iat);
+        iat->set_parent(idir);
 
-        /* Create the DLL objects */
-        SgAsmPEDLL *dll = new SgAsmPEDLL(new SgAsmBasicString(dll_name));
-        dll->set_idir(idir);
+        add_import_directory(idir);
 
-        idir->set_parent(dll);
+        /* Create the GenericDLL for this library */
+        SgAsmGenericDLL *dll = new SgAsmGenericDLL(idir->get_dll_name());
+        for (size_t j=0; j<ilt->get_entries()->get_vector().size(); j++) {
+            SgAsmPEImportILTEntry *e = ilt->get_entries()->get_vector()[j];
+            SgAsmPEImportHNTEntry *hn = e->get_hnt_entry();
+            if (hn!=NULL)
+                dll->add_symbol(hn->get_name()->c_str());
+        }
+        fhdr->add_dll(dll);
+    }
+}
 
-        /* The idir->hintname_rvas is an (optional) RVA for a NULL-terminated array whose members are either:
-         *    1. an RVA of a hint/name pair (if the high-order bit of the array member is clear)
-         *    2. an ordinal if the high-order bit is set */
-        if (idir->get_hintnames_rva() != 0) {
-            if (idir->get_hintnames_rva() < mapped_rva)
-                throw FormatError("hint/name RVA is before beginning of \".idata\" object");
+void
+SgAsmPEImportSection::add_import_directory(SgAsmPEImportDirectory *d)
+{
+    ROSE_ASSERT(p_import_directories!=NULL);
+    p_import_directories->get_vector().push_back(d);
+    d->set_parent(this);
+}
 
-         // DQ (8/11/2008): Should this really be a "for loop"; test is "1;"
-            for (addr_t hintname_rvas_offset = idir->get_hintnames_rva() - mapped_rva; /*section offset of RVA/ordinal array */
-                 1; 
-                 hintname_rvas_offset += fhdr->get_word_size()) {
-                addr_t hintname_rva = 0; /*RVA of the hint/name pair*/
-                bool import_by_ordinal=false; /*was high-order bit of array element set?*/
-                if (4==fhdr->get_word_size()) {
-                    uint32_t word;
-                    content(hintname_rvas_offset, sizeof word, &word);
-                    hintname_rva = le_to_host(word);
-                    import_by_ordinal = (hintname_rva & 0x80000000) != 0;
-                } else if (8==fhdr->get_word_size()) {
-                    uint64_t word;
-                    content(hintname_rvas_offset, sizeof word, &word);
-                    hintname_rva = le_to_host(word);
-                    import_by_ordinal = (hintname_rva & 0x8000000000000000ull) != 0;
-                } else {
-                    ROSE_ASSERT(!"unsupported word size");
-                }
+/* Write the import section back to disk */
+void
+SgAsmPEImportSection::unparse(std::ostream &f) const
+{
+    unparse_holes(f);
 
-                /* Array is NULL terminated */
-                if (0==hintname_rva)
-                    break;
+    /* Import Directory Entries and all they point to (even in other sections) */
+    for (size_t i=0; i<get_import_directories()->get_vector().size(); i++) {
+        get_import_directories()->get_vector()[i]->unparse(f, this);
+    }
+    
+    /* Zero terminated */
+    SgAsmPEImportDirectory::PEImportDirectory_disk zero;
+    memset(&zero, 0, sizeof zero);
+    write(f, get_import_directories()->get_vector().size()*sizeof(zero), sizeof zero, &zero);
+}
 
-                /* Add arrary value and hint/name pair to the DLL object */
-                dll->add_hintname_rva(hintname_rva);
-                if (!import_by_ordinal) {
-                    addr_t hintname_offset = (hintname_rva & 0x7fffffff) - mapped_rva;
-                    SgAsmPEImportHintName *hintname = new SgAsmPEImportHintName(this, hintname_offset);
-                    dll->add_function(hintname->get_name());
-                    dll->add_hintname(hintname);
+/* Print debugging info */
+void
+SgAsmPEImportSection::dump(FILE *f, const char *prefix, ssize_t idx)
+{
+    char p[4096];
+    if (idx>=0) {
+        sprintf(p, "%sPEImportSection[%zd].", prefix, idx);
+    } else {
+        sprintf(p, "%sPEImportSection.", prefix);
+    }
+    const int w = std::max(1, DUMP_FIELD_WIDTH-(int)strlen(p));
+    
+    SgAsmPESection::dump(f, p, -1);
+    fprintf(f, "%s%-*s = %zu\n", p, w, "ndirectories", p_import_directories->get_vector().size());
+    for (size_t i=0; i<p_import_directories->get_vector().size(); i++)
+        p_import_directories->get_vector()[i]->dump(f, p, i);
 
-                 // Make the parent the list IR node
-                    hintname->set_parent(dll->get_hintnames());
-                }
-            }
-        }
-        
-        /* The idir->bindings_rva is a NULL-terminated array of RVAs */
-        if (idir->get_bindings_rva() != 0) {
-            if (idir->get_bindings_rva() < mapped_rva)
-                throw FormatError("bindings RVA is before beginning of \".idata\" object");
+    if (variantT() == V_SgAsmPEImportSection) //unless a base class
+        hexdump(f, 0, std::string(p)+"data at ", p_data);
+}
 
-            for (addr_t bindings_offset  = idir->get_bindings_rva()  - mapped_rva; /*section offset of RVA array for bindings*/
-                 1; 
-                 bindings_offset += fhdr->get_word_size()) {
-                addr_t binding=0;
-                if (4==fhdr->get_word_size()) {
-                    uint32_t word;
-                    content(bindings_offset, sizeof word, &word);
-                    binding = le_to_host(word);
-                } else if (8==fhdr->get_word_size()) {
-                    uint64_t word;
-                    content(bindings_offset, sizeof word, &word);
-                    binding = le_to_host(word);
-                } else {
-                    ROSE_ASSERT(!"unsupported word size");
-                }
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// PE Export Section.
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
-                /* Array is NULL terminated; otherwise add binding to DLL object */
-                if (0==binding)
-                    break;
-                dll->add_binding(binding);
-            }
-        }
+/* Constructor */
+void
+SgAsmPEExportDirectory::ctor(SgAsmPEExportSection *section)
+{
+    set_parent(section);
 
-        /* Add dll to both this section and to the file header */
-        add_dll(dll);
-        fhdr->add_dll(dll);
+    size_t entry_size = sizeof(PEExportDirectory_disk);
+    const PEExportDirectory_disk *disk = (const PEExportDirectory_disk*)section->content(0, entry_size);
+    
+    p_res1         = le_to_host(disk->res1);
+    p_timestamp    = le_to_host(disk->timestamp);
+    p_vmajor       = le_to_host(disk->vmajor);
+    p_vminor       = le_to_host(disk->vminor);
+    p_name_rva     = le_to_host(disk->name_rva);       p_name_rva.set_section(section);
+    p_ord_base     = le_to_host(disk->ord_base);
+    p_expaddr_n    = le_to_host(disk->expaddr_n);
+    p_nameptr_n    = le_to_host(disk->nameptr_n);
+    p_expaddr_rva  = le_to_host(disk->expaddr_rva);    p_expaddr_rva.set_section(section);
+    p_nameptr_rva  = le_to_host(disk->nameptr_rva);    p_nameptr_rva.set_section(section);
+    p_ordinals_rva = le_to_host(disk->ordinals_rva);   p_ordinals_rva.set_section(section);
+
+    const char *name = p_name_rva.get_section()->content_str(p_name_rva.get_rel());
+    p_name = new SgAsmBasicString(name);
+}
+
+/* Print debugging info */
+void
+SgAsmPEExportDirectory::dump(FILE *f, const char *prefix, ssize_t idx)
+{
+    char p[4096];
+    if (idx>=0) {
+        sprintf(p, "%sPEExportDirectory[%zd].", prefix, idx);
+    } else {
+        sprintf(p, "%sPEExportDirectory.", prefix);
     }
+    const int w = std::max(1, DUMP_FIELD_WIDTH-(int)strlen(p));
+    
+    fprintf(f, "%s%-*s = \"%s\"\n",                    p, w, "name", p_name->c_str());
+    fprintf(f, "%s%-*s = 0x%08x (%u)\n",               p, w, "res1", p_res1, p_res1);
+    fprintf(f, "%s%-*s = %lu %s",                      p, w, "timestamp", (unsigned long)p_timestamp, ctime(&p_timestamp));
+    fprintf(f, "%s%-*s = %u\n",                        p, w, "vmajor", p_vmajor);
+    fprintf(f, "%s%-*s = %u\n",                        p, w, "vminor", p_vminor);
+    fprintf(f, "%s%-*s = %s\n",                        p, w, "name_rva", p_name_rva.to_string().c_str());
+    fprintf(f, "%s%-*s = %u\n",                        p, w, "ord_base", p_ord_base);
+    fprintf(f, "%s%-*s = %zu\n",                       p, w, "expaddr_n", p_expaddr_n);
+    fprintf(f, "%s%-*s = %zu\n",                       p, w, "nameptr_n", p_nameptr_n);
+    fprintf(f, "%s%-*s = %s\n",                        p, w, "expaddr_rva", p_expaddr_rva.to_string().c_str());
+    fprintf(f, "%s%-*s = %s\n",                        p, w, "nameptr_rva", p_nameptr_rva.to_string().c_str());
+    fprintf(f, "%s%-*s = %s\n",                        p, w, "ordinals_rva", p_ordinals_rva.to_string().c_str());
 }
 
-/* Write the import section back to disk */
+/* Constructor */
 void
-SgAsmPEImportSection::unparse(FILE *f)
+SgAsmPEExportEntry::ctor(SgAsmGenericString *fname, unsigned ordinal, rva_t expaddr, SgAsmGenericString *forwarder)
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
-    SgAsmGenericHeader *fhdr = get_header();
+    set_name(fname);
+    set_ordinal(ordinal);
+    set_export_rva(expaddr);
+    set_forwarder(forwarder);
+}
 
- // This is the same as accessing p_dlls and used to be redundant with "dlls" before being use with RISE IR nodes.
- // const std::vector<SgAsmPEDLL*> & dlls = get_dlls();
-    const std::vector<SgAsmPEDLL*> & dlls = get_dlls()->get_dlls();
+/* Print debugging info */
+void
+SgAsmPEExportEntry::dump(FILE *f, const char *prefix, ssize_t idx)
+{
+    char p[4096];
+    if (idx>=0) {
+        sprintf(p, "%sPEExportEntry[%zd].", prefix, idx);
+    } else {
+        sprintf(p, "%sPEExportEntry.", prefix);
+    }
+    const int w = std::max(1, DUMP_FIELD_WIDTH-(int)strlen(p));
 
-    for (size_t dllno = 0; dllno < dlls.size(); dllno++) {
-        SgAsmPEDLL *dll = dlls[dllno];
-        SgAsmPEImportDirectory *idir = dll->get_idir();
-        
-        /* Directory entry */
-        SgAsmPEImportDirectory::PEImportDirectory_disk idir_disk;
-        idir->encode(&idir_disk);
-        write(f, dllno*sizeof(idir_disk), sizeof idir_disk, &idir_disk);
+    fprintf(f, "%s%-*s = [ord %u] rva=%s \"%s\"", p, w, "info", p_ordinal, p_export_rva.to_string().c_str(), p_name->c_str());
+    if (p_forwarder)
+        fprintf(f, " -> \"%s\"", p_forwarder->c_str());
+    fputc('\n', f);
+}
 
-        /* Library name */
-        ROSE_ASSERT(idir->get_dll_name_rva() >= p_mapped_rva);
-        addr_t dll_name_offset = idir->get_dll_name_rva() - p_mapped_rva;
-        ROSE_ASSERT(dll_name_offset + dll->get_name()->get_string().size() + 1 < get_size());
-        addr_t spos = write(f, dll_name_offset, dll->get_name()->get_string());
-        write(f, spos, '\0');
+/* Override ROSETTA to set parent */
+void
+SgAsmPEExportEntry::set_name(SgAsmGenericString *fname)
+{
+    p_name = fname;
+    if (p_name) p_name->set_parent(this);
+}
+void
+SgAsmPEExportEntry::set_forwarder(SgAsmGenericString *forwarder)
+{
+    p_forwarder = forwarder;
+    if (p_forwarder) p_forwarder->set_parent(this);
+}
+    
+/* Constructor */
+void
+SgAsmPEExportSection::ctor(addr_t offset, addr_t size, addr_t mapped_rva)
+{
+    ROSE_ASSERT(p_exports  == NULL);
+    p_exports = new SgAsmPEExportEntryList();
+    p_exports->set_parent(this);
 
-        /* Write the hint/name pairs and the array entries that point to them. */
-        if (idir->get_hintnames_rva() != 0) {
-            ROSE_ASSERT(idir->get_hintnames_rva() >= p_mapped_rva);
-            addr_t hintname_rvas_spos = idir->get_hintnames_rva() - p_mapped_rva; /*section offset*/
-            const std::vector<addr_t> & hintname_rvas = dll->get_hintname_rvas();
-            const std::vector<SgAsmPEImportHintName*> & hintnames = dll->get_hintnames()->get_hintnames();
-            for (size_t i = 0; i <= hintname_rvas.size(); i++) {
-                /* Hint/name RVA */
-                addr_t hintname_rva = i < hintname_rvas.size() ? hintname_rvas[i] : 0; /*zero terminated*/
-                bool import_by_ordinal = false;
-                if (4 == fhdr->get_word_size()) {
-                    uint32_t rva_le;
-                    host_to_le(hintname_rva, &rva_le);
-                    write(f, hintname_rvas_spos + i*fhdr->get_word_size(), sizeof rva_le, &rva_le);
-                    import_by_ordinal = (hintname_rva & 0x80000000) != 0;
-                } else if (8==fhdr->get_word_size()) {
-                    uint64_t rva_le;
-                    host_to_le(hintname_rva, &rva_le);
-                    write(f, hintname_rvas_spos + i*fhdr->get_word_size(), sizeof rva_le, &rva_le);
-                    import_by_ordinal = (hintname_rva & 0x8000000000000000ull) != 0;
-                } else {
-                    ROSE_ASSERT(!"unsupported word size");
-                }
-            
-                /* Hint/name pair */
-                if (i<hintname_rvas.size() && !import_by_ordinal) {
-                    addr_t hintname_spos = (hintname_rvas[i] & 0x7fffffff) - p_mapped_rva; /*section offset*/
-                    hintnames[i]->unparse(f, this, hintname_spos);
-                }
-            }
+    set_mapped_rva(mapped_rva);
+    set_mapped_size(size);
+
+    SgAsmPEFileHeader *fhdr = dynamic_cast<SgAsmPEFileHeader*>(get_header());
+    ROSE_ASSERT(fhdr!=NULL);
+
+    p_export_dir = new SgAsmPEExportDirectory(this);
+
+
+    for (size_t i=0; i<p_export_dir->get_nameptr_n(); i++) {
+        /* Function name */
+        const ExportNamePtr_disk *nameptr_disk;
+        addr_t nameptr_offset = p_export_dir->get_nameptr_rva().get_rel(this) + i*sizeof(*nameptr_disk);
+        nameptr_disk = (const ExportNamePtr_disk*)content(nameptr_offset, sizeof(*nameptr_disk));
+        rva_t nameptr = le_to_host(*nameptr_disk);
+        SgAsmGenericString *fname = new SgAsmBasicString(content_str(nameptr.get_rel(this)));
+
+        /* Ordinal (sort of an index into the Export Address Table contained in this same section) */
+        const ExportOrdinal_disk *ordinal_disk;
+        addr_t ordinal_offset = p_export_dir->get_ordinals_rva().get_rel(this) + i*sizeof(*ordinal_disk);
+        ordinal_disk = (const ExportOrdinal_disk*)content(ordinal_offset, sizeof(*ordinal_disk));
+        unsigned ordinal = le_to_host(*ordinal_disk);
+
+        /* Export address. Convert the symbol's Ordinal into an index into the Export Address Table. The spec says to subtract
+         * the ord_base from the Ordinal to get the index, but testing has shown this to be off by one (e.g., Windows-XP file
+         * /WINDOWS/system32/msacm32.dll's Export Table's first symbol has the name "XRegThunkEntry" with an Ordinal of zero
+         * and the ord_base is one. The index according to spec would be -1 rather than the correct value of zero.) */
+        rva_t expaddr;
+        if (ordinal >= (p_export_dir->get_ord_base()-1)) {
+            unsigned expaddr_idx = ordinal - (p_export_dir->get_ord_base()-1);
+            ROSE_ASSERT(expaddr_idx < p_export_dir->get_expaddr_n());
+            const ExportAddress_disk *expaddr_disk;
+            addr_t expaddr_offset = p_export_dir->get_expaddr_rva().get_rel(this) + expaddr_idx*sizeof(*expaddr_disk);
+            expaddr_disk = (const ExportAddress_disk*)content(expaddr_offset, sizeof(*expaddr_disk));
+            expaddr = le_to_host(*expaddr_disk);
+            expaddr.bind(fhdr);
+        } else {
+            expaddr = 0xffffffff; /*Ordinal out of range!*/
         }
-        
-        /* Write the bindings array */
-        if (idir->get_bindings_rva() != 0) {
-            ROSE_ASSERT(idir->get_bindings_rva() >= p_mapped_rva);
-            const addr_t bindings_spos = idir->get_bindings_rva() - p_mapped_rva; /*section offset*/
-            const std::vector<addr_t> & bindings = dll->get_bindings();
-            for (size_t i=0; i<=bindings.size(); i++) {
-                addr_t binding = i<bindings.size() ? bindings[i] : 0; /*zero terminated*/
-                if (4==fhdr->get_word_size()) {
-                    uint32_t binding_le;
-                    host_to_le(binding, &binding_le);
-                    write(f, bindings_spos + i*fhdr->get_word_size(), sizeof binding_le, &binding_le);
-                } else if (8==fhdr->get_word_size()) {
-                    uint64_t binding_le;
-                    host_to_le(binding, &binding_le);
-                    write(f, bindings_spos + i*fhdr->get_word_size(), sizeof binding_le, &binding_le);
-                } else {
-                    ROSE_ASSERT(!"unsupported word size");
-                }
-            }
+
+        /* If export address is within this section then it points to a NUL-terminated forwarder name. */
+        SgAsmGenericString *forwarder = NULL;
+        if (expaddr.get_rva()>=get_mapped_rva() && expaddr.get_rva()<get_mapped_rva()+get_mapped_size()) {
+            forwarder = new SgAsmBasicString(content_str(expaddr.get_rel(this)));
         }
-    }
 
-    /* DLL list is zero terminated */
-    {
-        SgAsmPEImportDirectory::PEImportDirectory_disk zero;
-        memset(&zero, 0, sizeof zero);
-        write(f, dlls.size()*sizeof zero, sizeof zero, &zero);
+        SgAsmPEExportEntry *entry = new SgAsmPEExportEntry(fname, ordinal, expaddr, forwarder);
+        add_entry(entry);
     }
+}
 
-    unparse_holes(f);
+void
+SgAsmPEExportSection::add_entry(SgAsmPEExportEntry *entry)
+{
+    ROSE_ASSERT(p_exports!=NULL);
+    p_exports->get_exports().push_back(entry);
 }
 
 /* Print debugging info */
 void
-SgAsmPEImportSection::dump(FILE *f, const char *prefix, ssize_t idx)
+SgAsmPEExportSection::dump(FILE *f, const char *prefix, ssize_t idx)
 {
     char p[4096];
     if (idx>=0) {
-        sprintf(p, "%sPEImportSection[%zd].", prefix, idx);
+        sprintf(p, "%sPEExportSection[%zd].", prefix, idx);
     } else {
-        sprintf(p, "%sPEImportSection.", prefix);
+        sprintf(p, "%sPEExportSection.", prefix);
     }
     
     SgAsmPESection::dump(f, p, -1);
 
-    hexdump(f, 0, std::string(p)+"data at ", p_data);
+    if (p_export_dir)
+        p_export_dir->dump(f, p, -1);
+    for (size_t i=0; i<p_exports->get_exports().size(); i++)
+        p_exports->get_exports()[i]->dump(f, p, i);
+
+    if (variantT() == V_SgAsmPEExportSection) //unless a base class
+        hexdump(f, 0, std::string(p)+"data at ", p_data);
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1157,9 +1715,8 @@
 
 /* Unparse an ElfStringSection by unparsing the ElfStrtab */
 void
-SgAsmPEStringSection::unparse(FILE *f)
+SgAsmPEStringSection::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
     get_strtab()->unparse(f);
     unparse_holes(f);
 }
@@ -1198,6 +1755,9 @@
 
     ROSE_ASSERT(get_strtab()!=NULL);
     get_strtab()->dump(f, p, -1);
+
+    if (variantT() == V_SgAsmPEStringSection) //unless a base class
+        hexdump(f, 0, std::string(p)+"data at ", p_data);
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1284,9 +1844,8 @@
 
 /* Write string table back to disk. Free space is zeroed out; holes are left as they are. */
 void
-SgAsmCoffStrtab::unparse(FILE *f)
+SgAsmCoffStrtab::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate(false)); /*should have been called well before any unparsing started*/
     SgAsmGenericSection *container = get_container();
 
     /* Write length coded strings. Shared strings will be written more than once, but that's OK. */
@@ -1480,7 +2039,7 @@
 
 /* Encode a symbol back into disk format */
 void *
-SgAsmCoffSymbol::encode(COFFSymbol_disk *disk)
+SgAsmCoffSymbol::encode(COFFSymbol_disk *disk) const
 {
     if (0 == p_st_name_offset) {
         /* Name is stored in entry */
@@ -1642,9 +2201,8 @@
 
 /* Write symbol table back to disk */
 void
-SgAsmCoffSymbolTable::unparse(FILE *f)
+SgAsmCoffSymbolTable::unparse(std::ostream &f) const
 {
-    ROSE_ASSERT(0==reallocate()); /*should have been called well before any unparsing started*/
     addr_t spos = 0; /*section offset*/
     
     for (size_t i=0; i < p_symbols->get_symbols().size(); i++) {
@@ -1676,7 +2234,8 @@
         p_symbols->get_symbols()[i]->dump(f, p, i);
     }
 
-    hexdump(f, 0, std::string(p)+"data at ", p_data);
+    if (variantT() == V_SgAsmCoffSymbolTable) //unless a base class
+        hexdump(f, 0, std::string(p)+"data at ", p_data);
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1720,38 +2279,43 @@
     SgAsmPEExtendedDOSHeader *dos2_header = new SgAsmPEExtendedDOSHeader(ef, dos_header->get_size());
     
     /* The PE header has a fixed-size component followed by some number of RVA/Size pairs */
-    SgAsmPEFileHeader *pe_header = new SgAsmPEFileHeader(ef, dos2_header->get_e_lfanew());
-    ROSE_ASSERT(pe_header->get_e_num_rvasize_pairs() < 1000); /* just a sanity check before we allocate memory */
-    pe_header->add_rvasize_pairs();
+    SgAsmPEFileHeader *fhdr = new SgAsmPEFileHeader(ef, dos2_header->get_e_lfanew());
+    ROSE_ASSERT(fhdr->get_e_num_rvasize_pairs() < 1000); /* just a sanity check before we allocate memory */
+    fhdr->add_rvasize_pairs();
 
     /* The extended part of the DOS header is owned by the PE header */
-    dos2_header->set_header(pe_header);
-    pe_header->add_section(dos2_header);
-    pe_header->set_dos2_header(dos2_header);
+    fhdr->add_section(dos2_header);
+    fhdr->set_dos2_header(dos2_header);
 
     /* Now go back and add the DOS Real-Mode section but rather than using the size specified in the DOS header, constrain it
      * to not extend beyond the beginning of the PE file header. This makes detecting holes in the PE format much easier. */
-    dos_header->add_rm_section(pe_header->get_offset());
+    dos_header->add_rm_section(fhdr->get_offset());
 
     /* Construct the section table and its sections (non-synthesized sections). The specification says that the section table
      * comes after the optional (NT) header, which in turn comes after the fixed part of the PE header. The size of the
      * optional header is indicated in the fixed header. */
-    addr_t secttab_offset = pe_header->get_offset() + sizeof(PEFileHeader_disk) + pe_header->get_e_nt_hdr_size();
-    addr_t secttab_size = pe_header->get_e_nsections() * sizeof(SgAsmPESectionTableEntry::PESectionTableEntry_disk);
-    SgAsmPESectionTable *secttab = new SgAsmPESectionTable(pe_header, secttab_offset, secttab_size);
-    pe_header->set_section_table(secttab);
+    addr_t secttab_offset = fhdr->get_offset() + sizeof(PEFileHeader_disk) + fhdr->get_e_nt_hdr_size();
+    addr_t secttab_size = fhdr->get_e_nsections() * sizeof(SgAsmPESectionTableEntry::PESectionTableEntry_disk);
+    SgAsmPESectionTable *secttab = new SgAsmPESectionTable(fhdr, secttab_offset, secttab_size);
+    fhdr->set_section_table(secttab);
 
     /* Parse the COFF symbol table and add symbols to the PE header */
-    if (pe_header->get_e_coff_symtab() && pe_header->get_e_coff_nsyms()) {
-        SgAsmCoffSymbolTable *symtab = new SgAsmCoffSymbolTable(pe_header);
+    if (fhdr->get_e_coff_symtab() && fhdr->get_e_coff_nsyms()) {
+        SgAsmCoffSymbolTable *symtab = new SgAsmCoffSymbolTable(fhdr);
         std::vector<SgAsmCoffSymbol*> & symbols = symtab->get_symbols()->get_symbols();
         for (size_t i = 0; i < symbols.size(); i++)
-            pe_header->add_symbol(symbols[i]);
-        pe_header->set_coff_symtab(symtab);
+            fhdr->add_symbol(symbols[i]);
+        fhdr->set_coff_symtab(symtab);
     }
 
+    /* Associate RVAs with particular sections. */
+    ROSE_ASSERT(fhdr->get_entry_rvas().size()==1);
+    fhdr->get_entry_rvas()[0].bind(fhdr);
+    fhdr->set_e_code_rva(fhdr->get_e_code_rva().bind(fhdr));
+    fhdr->set_e_data_rva(fhdr->get_e_data_rva().bind(fhdr));
+
     /* Turn header-specified tables (RVA/Size pairs) into generic sections */
-    pe_header->create_table_sections();
+    fhdr->create_table_sections();
     
-    return pe_header;
+    return fhdr;
 }

Copied: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranModuleInfo.C (from rev 128, trunk/src/frontend/OpenFortranParser_SAGE_Connection/FortranModuleInfo.C)
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranModuleInfo.C	                        (rev 0)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranModuleInfo.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,140 @@
+
+#include "rose.h"
+#include "FortranModuleInfo.h"
+
+using namespace std;
+using std::string;
+using std::map;
+
+map<string, SgModuleStatement*> FortranModuleInfo::moduleNameAstMap;
+unsigned                        FortranModuleInfo::nestedSgFile;
+SgProject*                      FortranModuleInfo::currentProject;
+
+
+bool
+FortranModuleInfo::isRmodFile() 
+  {
+
+    if (nestedSgFile)
+       return true;
+
+    return false;
+
+  }
+
+
+
+SgProject*
+FortranModuleInfo::getCurrentProject() 
+  {
+     return currentProject;
+  }
+
+
+
+void
+FortranModuleInfo::setCurrentProject(SgProject* project)
+  {
+     currentProject = project;
+  }
+
+
+
+SgModuleStatement*
+FortranModuleInfo::getModule(string modName)
+  {
+ // DQ (11/12/2008): I am unclear if the conversion of the module name to lowercase 
+ // should happen here, it does not appear to be required since at least the tests 
+ // codes we have appear to work.
+
+    SgModuleStatement *modStmt = moduleNameAstMap[modName];
+
+    if (modStmt)
+          return modStmt;
+
+    if (createSgSourceFile(modName) == NULL ) {
+        cerr << "error: No declaration found for the module: "<<modName << endl;
+        return NULL;
+    } else // in createSgSourceFile: insert moduleNameAstMap[modName] 
+          return moduleNameAstMap[modName];
+  }
+
+
+SgSourceFile*
+FortranModuleInfo::createSgSourceFile(string modName)
+   {
+     int errorCode = 0;
+     vector<string> argv;
+
+  // DQ (11/12/2008): Modified to force filename to lower case.
+  // printf ("In FortranModuleInfo::createSgSourceFile(): generating a module file %s using module name = %s \n",StringUtility::convertToLowerCase(modName).c_str(),modName.c_str());
+     modName = StringUtility::convertToLowerCase(modName);
+
+     string rmodFileName = modName + MOD_FILE_SUFFIX;
+
+     argv.push_back(SKIP_SYNTAX_CHECK);
+     argv.push_back(rmodFileName);
+
+     nestedSgFile++;
+     SgProject*  project = getCurrentProject();
+
+     SgSourceFile* newFile = isSgSourceFile(determineFileType(argv,errorCode,project));
+       // SgSourceFile* newFile =  new SgSourceFile (argv, errorCode, 0, project);
+
+     ROSE_ASSERT (newFile != NULL);
+     ROSE_ASSERT (newFile->get_startOfConstruct() != NULL);
+
+  // Set the project as the  parent 
+     newFile->set_parent(project);
+
+  // DQ (11/12/2008): This rmod file should be explicitly marked to not be compiled.
+  // printf ("Marking the new module file to not be compiled \n");
+     newFile->set_skipfinalCompileStep(true);
+
+     project->set_file(*newFile);
+
+     nestedSgFile--;
+
+     return newFile;
+   }
+
+
+
+void       
+FortranModuleInfo::addMapping(string modName,SgModuleStatement* modNode)
+  {
+  // printf ("In FortranModuleInfo::addMapping() modName = %s \n",modName.c_str());
+
+     if ( moduleNameAstMap[modName] == NULL ) 
+            moduleNameAstMap[modName] = modNode;
+     else
+            cerr << "Warning: The map entry for " << modName 
+                 << " is not empty. " << endl;
+     
+#ifdef USE_STMT_DEBUG
+     dumpMap();
+#endif
+  }
+
+
+
+
+void
+FortranModuleInfo::clearMap()
+   {
+     moduleNameAstMap.clear();
+     return;
+   }
+
+
+
+void 
+FortranModuleInfo::dumpMap()
+   {
+     map<string,SgModuleStatement*>::iterator iter;
+
+     cout << "Module Statement*  map::" << endl;
+     for(iter = moduleNameAstMap.begin(); iter != moduleNameAstMap.end(); iter++)
+           cout <<"FIRST : " << (*iter).first << " SECOND : " << (*iter).second << endl;    
+   }
+

Copied: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranModuleInfo.h (from rev 128, trunk/src/frontend/OpenFortranParser_SAGE_Connection/FortranModuleInfo.h)
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranModuleInfo.h	                        (rev 0)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranModuleInfo.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,45 @@
+/*
+ *  Read a module file "XX.rmod"
+ *  Create a SgFile for the module
+ *  Create an entry for the module in the moduleNAmeAstMap
+ */
+
+#ifndef __FORTRANMODULEINFO_H_
+#define __FORTRANMODULEINFO_H_
+
+#include "rose.h"
+#include "fortran_support.h"
+
+#define  MOD_FILE_SUFFIX   ".rmod"
+#define  SKIP_SYNTAX_CHECK "-rose:skip_syntax_check"
+
+
+class FortranModuleInfo
+  {
+
+     private:
+       static SgProject*                      currentProject;
+       static std::map<std::string, SgModuleStatement*> moduleNameAstMap;
+       static unsigned                        nestedSgFile; 
+
+     public:
+       static bool                 isRmodFile();
+       static void                 setCurrentProject(SgProject*);
+       static SgProject*           getCurrentProject();
+
+       static SgModuleStatement*   getModule(std::string modName);
+       static void                 addMapping(std::string modName,SgModuleStatement* modStmt);
+ 
+       FortranModuleInfo(){};
+
+       ~FortranModuleInfo(){};
+
+     private:
+       static SgSourceFile*               createSgSourceFile(std::string modName);
+       static void                  clearMap();
+       static void                  dumpMap();
+
+  };
+
+
+#endif /*__FORTRANMODULEINFO_H_*/

Modified: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranParserActionROSE.C
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranParserActionROSE.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranParserActionROSE.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -18,6 +18,10 @@
 #include "rose.h"
 #include "fortran_support.h"
 
+// FMZ
+#include "FortranModuleInfo.h"
+#include "FortranParserState.h"
+
 #define SKIP_C_ACTION_IMPLEMENTATION 0
 
 using namespace std;
@@ -421,12 +425,12 @@
         }
 
   // DQ (10/8/2008): this rule causes the token to sometime appear on the stack a 2nd time.
-     printf ("Should we push the token on the stack? (YES) \n");
+  // printf ("Should we push the token on the stack? (YES) \n");
 
   // DQ (10/9/2008): To be uniform in the handling of operators (used defined and intrinsic, we ALWAYS push the token onto the stack!
      astNameStack.push_front(definedOp);
 
-#if 1
+#if 0
   // Output debugging information about saved state (stack) information.
      outputState("At BOTTOM of R311 c_action_defined_operator()");
 #endif
@@ -3812,11 +3816,29 @@
                 
                case ArraySpecElement_expr_colon_expr:
                   {
+                 // See test2008_62.f90 for an example of this.
+                 // expression = new SgColonShapeExp();
+                 // setSourcePosition(expression);
+
+                 // DQ (11/14/2008): A colon expression at this point can only have a base and bound (no stride).
+                    bool hasLowerBound = true;
+                    bool hasUpperBound = true;
+                    bool hasStride     = false;
+                    bool isAmbiguous   = false;
+
+                    expression = buildSubscriptExpression(hasLowerBound,hasUpperBound,hasStride,isAmbiguous);
+
+#if 0
+                 // Output debugging information about saved state (stack) information.
+                    outputState("In case ArraySpecElement_expr_colon_expr of R510 #3 c_action_array_spec_element()");
+#endif
+#if 0
                     printf ("Error: Need an example of this before I can support it. \n");
                     ROSE_ASSERT(false);
+#endif
                     break;
                   }
-                
+
                case ArraySpecElement_expr_colon_asterisk:
                   {
                     printf ("Error: Need an example of this before I can support it. \n");
@@ -13781,6 +13803,15 @@
      SgModuleStatement* moduleStatement = isSgModuleStatement(astScopeStack.front()->get_parent());
      ROSE_ASSERT(moduleStatement != NULL);
 
+  // FMZ: 05/30/2008  add the subtree root to the map
+     string  fileName = moduleStatement->get_name();
+
+  // DQ (11/12/2008): Modified to force filename to lower case.
+  // printf ("Creating a module file %s using module name = %s \n",StringUtility::convertToLowerCase(fileName).c_str(),fileName.c_str());
+     fileName = StringUtility::convertToLowerCase(fileName);
+
+     FortranModuleInfo::addMapping(fileName,moduleStatement);
+
      setStatementNumericLabel(moduleStatement,label);
 
   // Pop the module's scope
@@ -14089,8 +14120,39 @@
 
        // Once we find the module declaration to the module
 
+#if 0
           printf ("Error: module not found in current translation unit! (need contribution from Rice) \n");
           ROSE_ASSERT(false);
+#else 
+        // FMZ:(5/28/2008) importing the module declaration from modName.rmod file
+        // save the global variable
+        
+        // FMZ(10/22008) in the new version (rice branch) SgFile*=>SgSourceFile
+        // SgFile* savedFilePointer = OpenFortranParser_globalFilePointer;
+          SgSourceFile* savedFilePointer = OpenFortranParser_globalFilePointer;
+        
+          FortranModuleInfo rmodFile;
+        
+        //  need to check module/def/decl or read from .rmod file
+          string modName = useStatement->get_name();
+
+       // DQ (11/12/2008): Convert generated file name to lower case.
+       // Fortran is case insensitive so this maps any module name to 
+       // a unique name module file.
+          modName = StringUtility::convertToLowerCase(modName);
+
+          moduleStatement = FortranModuleInfo::getModule(modName);
+
+          if (moduleStatement == NULL)
+             {
+               cout << "Error : cannot find the module (module should have been seen in a previously generated file) : "<< modName << endl;
+               ROSE_ASSERT(false);
+             }
+    
+         ROSE_ASSERT (moduleStatement != NULL);
+         
+         OpenFortranParser_globalFilePointer = savedFilePointer;
+#endif
         }
        else
         {
@@ -14108,6 +14170,11 @@
           ROSE_ASSERT(moduleStatement != NULL);
         }
      
+  // DQ (11/12/2008): Now set the reference to the module statement from the use statement
+  // (to help support general analysis).  Note that we still do all the symbol table support
+  // to alias symbols in the module statement.
+     useStatement->set_module(moduleStatement);
+
   // Found the module, now read the module's symbols for public members...
   // printf ("Found the module, now read the symbols from the module's symbol table for all public members...\n");
 
@@ -14726,7 +14793,7 @@
        // DQ (10/10/2008): We want to use the actual operator name if it is a .xxx. form
           interfaceNameString = interfaceOperatorNameString;
 
-          printf ("interfaceNameString = %s \n",interfaceNameString.c_str());
+       // printf ("interfaceNameString = %s \n",interfaceNameString.c_str());
        // ROSE_ASSERT(interfaceNameString.size() > 1);
 #endif
 
@@ -16204,7 +16271,7 @@
 
           ROSE_ASSERT(astScopeStack.empty() == false);
 
-          printf ("Inserting includeLine into astScopeStack.front() = %s \n",astScopeStack.front()->class_name().c_str());
+       // printf ("Inserting includeLine into astScopeStack.front() = %s \n",astScopeStack.front()->class_name().c_str());
 
           astScopeStack.front()->append_statement(includeLine);
         }

Copied: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranParserState.C (from rev 128, trunk/src/frontend/OpenFortranParser_SAGE_Connection/FortranParserState.C)
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranParserState.C	                        (rev 0)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranParserState.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,45 @@
+
+#include "FortranParserState.h"
+
+stack<FortranParserState*>  FortranParserState::statesStack;
+
+// Constructor:
+FortranParserState::FortranParserState()
+  {
+     clearStacks();
+     statesStack.push(this);
+     //printf("FortranParserState:: push in the stack currScopeStack = %p \n",&currScopeStack);
+
+  }
+
+
+// Destructor:
+// Pop out the top of the stack, clean all the member stacks 
+FortranParserState::~FortranParserState()
+  {
+      statesStack.pop(); 
+      //printf("FortranParserState:: pop out  the stack \n");
+      clearStacks();
+  }
+
+
+void
+FortranParserState::clearStacks() 
+  {
+      currScopeStack.clear();
+      currExpressionStack.clear();
+      currNodeStack.clear();
+      currNameStack.clear();
+      currTypeStack.clear();
+      currBaseTypeStack.clear();
+      currIntentSpecStack.clear();
+      currAttributeSpecStack.clear();
+      currInitializerStack.clear();
+      currTypeKindStack.clear();
+      currTypeParameterStack.clear();
+      currLabelSymbolStack.clear();
+      currIfStatementStack.clear();
+      currActualArgumentNameStack.clear();
+      currFunctionAttributeStack.clear();
+  }
+

Copied: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranParserState.h (from rev 128, trunk/src/frontend/OpenFortranParser_SAGE_Connection/FortranParserState.h)
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranParserState.h	                        (rev 0)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/FortranParserState.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,120 @@
+#ifndef __FORTRANPARSERSTATE_H_
+#define __FORTRANPARSERSTATE_H_
+
+#include "rose.h"
+#include "fortran_support.h"
+
+#define astScopeStack              (*(FortranParserState::getCurrentScopeStack()))
+#define astExpressionStack         (*(FortranParserState::getCurrentExpressionStack()))
+#define astNodeStack               (*(FortranParserState::getCurrentNodeStack()))
+#define astNameStack               (*(FortranParserState::getCurrentNameStack()))
+#define astTypeStack               (*(FortranParserState::getCurrentTypeStack()))
+#define astBaseTypeStack           (*(FortranParserState::getCurrentBaseTypeStack()))
+#define astIntentSpecStack         (*(FortranParserState::getCurrentIntentSpecStack()))
+#define astAttributeSpecStack      (*(FortranParserState::getCurrentAttributeSpecStack()))
+#define astInitializerStack        (*(FortranParserState::getCurrentInitializerStack()))
+#define astTypeKindStack           (*(FortranParserState::getCurrentTypeKindStack()))
+#define astTypeParameterStack      (*(FortranParserState::getCurrentTypeParameterStack()))
+#define astLabelSymbolStack        (*(FortranParserState::getCurrentLabelSymbolStack()))
+#define astIfStatementStack        (*(FortranParserState::getCurrentIfStatementStack()))
+#define astActualArgumentNameStack (*(FortranParserState::getCurrentActualArgumentNameStack()))
+#define astFunctionAttributeStack  (*(FortranParserState::getCurrentFunctionAttributeStack()))
+#define astIncludeStack            (*(FortranParserState::getCurrentIncludeStack()))
+
+
+using std::string;
+using std::map;
+using std::stack;
+using std::list;
+using std::vector;
+
+
+class FortranParserState
+  {
+
+     private:
+       static stack<FortranParserState*>  statesStack;
+
+     private:
+       list<SgScopeStatement*> currScopeStack;
+       list<SgExpression*>     currExpressionStack;
+       list<SgNode*>           currNodeStack;
+       AstNameListType         currNameStack;
+       list<SgType*>           currTypeStack;
+       list<SgType*>           currBaseTypeStack;
+       list<int>               currIntentSpecStack;
+       list<int>               currAttributeSpecStack;
+       list<SgExpression*>     currInitializerStack;
+       list<SgExpression*>     currTypeKindStack;
+       list<SgExpression*>     currTypeParameterStack;
+       list<SgLabelSymbol*>    currLabelSymbolStack;
+       list<SgIfStmt*>         currIfStatementStack;
+       AstNameListType         currActualArgumentNameStack;
+       AstNameListType         currFunctionAttributeStack;
+       vector<string>          currAstIncludeStack;
+
+       void clearStacks();       
+
+     public:
+
+       // following functions will called by macro in ofp-rose connection files
+       static  list<SgScopeStatement*>  *getCurrentScopeStack()
+          { return &(statesStack.top()->currScopeStack); }
+
+       static  list<SgExpression*>      *getCurrentExpressionStack()
+          { return &(statesStack.top()->currExpressionStack); }
+
+       static  list<SgNode*>            *getCurrentNodeStack()
+          { return &(statesStack.top()->currNodeStack); }
+
+       static  AstNameListType          *getCurrentNameStack()
+          { return &(statesStack.top()->currNameStack); }
+
+       static  list<SgType*>            *getCurrentTypeStack()
+          { return &(statesStack.top()->currTypeStack); }
+
+       static  list<SgType*>            *getCurrentBaseTypeStack()
+          { return &(statesStack.top()->currBaseTypeStack); }
+
+       static  list<int>                *getCurrentIntentSpecStack()
+          { return &(statesStack.top()->currIntentSpecStack); }
+
+       static  list<int>                *getCurrentAttributeSpecStack()
+          { return &(statesStack.top()->currAttributeSpecStack); }
+
+       static  list<SgExpression*>      *getCurrentInitializerStack()
+          { return &(statesStack.top()->currInitializerStack); }
+
+       static  list<SgExpression*>      *getCurrentTypeKindStack()
+          { return &(statesStack.top()->currTypeKindStack); }
+
+       static  list<SgExpression*>      *getCurrentTypeParameterStack()
+          { return &(statesStack.top()->currTypeParameterStack); }
+
+       static  list<SgLabelSymbol*>     *getCurrentLabelSymbolStack()
+          { return &(statesStack.top()->currLabelSymbolStack); }
+
+       static  list<SgIfStmt*>          *getCurrentIfStatementStack()
+          { return &(statesStack.top()->currIfStatementStack); }
+
+       static  AstNameListType          *getCurrentActualArgumentNameStack()
+          { return &(statesStack.top()->currActualArgumentNameStack); }
+
+       static  AstNameListType          *getCurrentFunctionAttributeStack()
+          { return &(statesStack.top()->currFunctionAttributeStack); }
+
+       static  vector<string>          *getCurrentIncludeStack()
+          { return &(statesStack.top()->currAstIncludeStack); }
+
+       //Constructor:
+       //   push "this" object of FortranParserState into the "statesStack"
+       FortranParserState();
+
+       
+       // Destructor: 
+       //   Pop out the stack, clean all the member stacks 
+       ~FortranParserState();
+
+  };
+
+#endif /*__FORTRANPARSERSTATE_H_*/

Modified: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/Makefile.am
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -2,36 +2,10 @@
 
 INCLUDES = $(ROSE_INCLUDES) -I$(top_srcdir)/src/frontend/OpenFortranParser_SAGE_Connection
 
-# This is the free format lexical analyzer
-$(srcdir)/preproc-fortran.C : preproc-fortran.lex 
-	$(LEX) -PRose_Fortran_free_format_ -o$(srcdir)/preproc-fortran.C $(srcdir)/preproc-fortran.lex
+EXTRA_DIST = preproc-fortran.ll preproc-fortran-fixed.ll
+DISTCLEANFILES = preproc-fortran.cc preproc-fortran-fixed.cc
 
-preproc-fortran.o : $(srcdir)/preproc-fortran.C
-#	$(srcdir)/gen_rose_token_defs.pl > rose_token_defs_gen.h
-	$(CXXCOMPILE) -D__EXTERN_C__ -c $(srcdir)/preproc-fortran.C -o $@
-
-# This is the fixed format lexical analyzer
-$(srcdir)/preproc-fortran-fixed.C : preproc-fortran-fixed.lex
-	$(LEX) -PRose_Fortran_fixed_format_ -o$(srcdir)/preproc-fortran-fixed.C $(srcdir)/preproc-fortran-fixed.lex
-
-preproc-fortran-fixed.o : $(srcdir)/preproc-fortran-fixed.C
-	$(CXXCOMPILE) -D__EXTERN_C__ -c $(srcdir)/preproc-fortran-fixed.C -o $@
-
-# Copy the original lex file and the C++ file generated from it to the distribution
-# so that users don't have to find an appropriate version of lex (flex).  Flex should
-# be used by developers so that ANSI C code is generated for g++.  This is something
-# for developers to worry about in the generation of sufficently portable distributions.
-EXTRA_DIST = preproc-fortran.lex preproc-fortran.C preproc-fortran-fixed.lex preproc-fortran-fixed.C
-CLEANFILES = preproc-fortran.o preproc-fortran-fixed.o 
-
-FORTRAN_LEX_SCANNERS = preproc-fortran.C preproc-fortran-fixed.C
-
 if ROSE_USE_OPEN_FORTRAN_PARSER
-# This will cause the dynamic library to be built (as libroseFortran.so)
-# noinst_LTLIBRARIES = libroseFortran.la
-# lib_LTLIBRARIES = libroseFortran.la
-noinst_LTLIBRARIES = libroseFortran.la
-
 # This shared library is built in the Open Fortran Parser using the command:
 #      gcc -shared -I/usr/apps/java/jdk1.5.0_11/include -I/usr/apps/java/jdk1.5.0_11/include/linux 
 #                  -I../  -fPIC ../token.c jni_token_funcs.c c_actions_jni.c ../FortranParserActionPrint.c 
@@ -42,25 +16,18 @@
 # lib_LTLIBRARIES = libfortran_ofp_parser_java_FortranParserActionJNI.la
 lib_LTLIBRARIES = libfortran_ofp_parser_c_jni_FortranParserActionJNI.la
 else
-# DQ (10/21/2007): build an empyy lib file so that ROSE/src/Makefile.am need not be conditional on Fortran.
-noinst_LTLIBRARIES = libroseFortran.la
 endif
 
+# DQ (10/21/2007): build (JJW: either empty or non-empty) lib file so that ROSE/src/Makefile.am need not be conditional on Fortran.
+noinst_LTLIBRARIES = libroseFortran.la
+
 if ROSE_USE_OPEN_FORTRAN_PARSER
-# Compile using the function to call the Open Fortran Parser (should be a C file, since it will not compile currently as a C++ file)
-openFortranParserMain = openFortranParser_main.C
-# libroseFortran_la_LIBADD = -L$(JAVA_JVM_PATH) -ljvm
-libroseFortran_la_LIBADD =
+libroseFortran_la_SOURCES      = fortran_support.C openFortranParser_main.C jserver.C ofp.C FortranModuleInfo.C FortranParserState.C preproc-fortran.ll preproc-fortran-fixed.ll
 else
 # Compile using a function that represents the API of the Open Fortran Parser
-openFortranParserMain = dummy_openFortranParser_main.C
-libroseFortran_la_LIBADD =
+libroseFortran_la_SOURCES      = dummy_openFortranParser_main.C
 endif
 
-# libroseFortran_la_SOURCES    = FortranParserActionROSE.C fortran_support.C token.c $(FORTRAN_LEX_SCANNERS) $(openFortranParserMain)
-libroseFortran_la_SOURCES      = fortran_support.C $(FORTRAN_LEX_SCANNERS) $(openFortranParserMain)
-libroseFortran_la_DEPENDENCIES =
-
 if ROSE_USE_OPEN_FORTRAN_PARSER
 # This file (these c_action() function implementations) need to be in a dynamic 
 # library so that they can be called by the Java based Open Fortran Parser.
@@ -69,19 +36,15 @@
 # libfortran_ofp_parser_java_FortranParserActionJNI_la_SOURCES      = FortranParserActionROSE.C token.c jni_token_funcs.c c_actions_jni.c
 # libfortran_ofp_parser_java_FortranParserActionJNI_la_DEPENDENCIES =
 libfortran_ofp_parser_c_jni_FortranParserActionJNI_la_SOURCES      = FortranParserActionROSE.C token.c jni_token_funcs.c c_actions_jni.c
-libfortran_ofp_parser_c_jni_FortranParserActionJNI_la_DEPENDENCIES =
 
 # To support the Open Fortran Parser we need to build a shared library with a specific name and which will have
 # all of the c_action() function implementations.  The name to match is: XXX libparser_java_FortranParserActionJNI.so
 # As of Feb 18 2008: the name is changed to libfortran_ofp_parser_c_jni_FortranParserActionJNI.so
 
-include_HEADERS = ActionEnums.h  FortranParserAction.h  token.h rose_fortran_token_maps.h  rose_token_defs.h fortran_support.h jni_token_funcs.h
+include_HEADERS = ActionEnums.h  FortranParserAction.h  token.h rose_fortran_token_maps.h  rose_token_defs.h fortran_support.h jni_token_funcs.h jserver.h ofp.h FortranModuleInfo.h FortranParserState.h
 
-openFortranParserMain: $(top_builddir)/rose_paths.h
+# openFortranParserMain: $(top_builddir)/rose_paths.h
 
-# Moved this header file to ../SageIII, it is not used for the lex pass for all languages in ROSE.
-# general_defs.h
-
 # DQ (9/24/2007): After updating the Open Fortran Parser, there are a number of files that should be copied over to ROSE.
 # Note that only the following are used in ROSE:
 #    1) token.c and token.h (definition of OFP's tokens)
@@ -108,7 +71,3 @@
 
 # EXTRA_DIST = FortranParserActionROSE.C token.c jni_token_funcs.c c_actions_jni.c 
 
-clean-local:
-	rm -rf *.o
-
-distclean-local:

Modified: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/fortran_support.C
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/fortran_support.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/fortran_support.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -2,11 +2,15 @@
 
 #include "fortran_support.h"
 
+//FMZ 
+#include "FortranParserState.h"
+
 SgSourceFile* OpenFortranParser_globalFilePointer = NULL;
 
 using namespace std;
 
-#if 1
+#if 0 //FMZ: using decls/defs from "FortranParserState" 
+
 // Global stack of scopes
 std::list<SgScopeStatement*> astScopeStack;
 
@@ -77,7 +81,6 @@
 // and function prototypes of function not defined in the interface we need attach 
 // declarations and names to the SgInterfaceStatement as they are seen.  Since this 
 // is nt always just the last statement, it is easier to support this using a stack.
-std::list<SgInterfaceStatement*> astInterfaceStack;
 
 // DQ (2/18/2008): This is the support for the Fortran include stack.
 // This is specific to the Fortran include mechanism, not the CPP include 
@@ -97,6 +100,8 @@
 // SgFile* OpenFortranParser_globalFilePointer = NULL;
 #endif
 
+std::list<SgInterfaceStatement*> astInterfaceStack;
+
 #include "token.h"
 
 Token_t *create_token(int line, int col, int type, const char *text)
@@ -3391,19 +3396,19 @@
           case AttrSpec_VOLATILE:     variableDeclaration->get_declarationModifier().get_typeModifier().get_constVolatileModifier().setVolatile(); break;
 
           case AttrSpec_PARAMETER:
-               printf ("Error: PARAMETER is an attribute that implies constant value ('const' in C/C++) \n");
+            // printf ("Error: PARAMETER is an attribute that implies constant value ('const' in C/C++) \n");
                variableDeclaration->get_declarationModifier().get_typeModifier().get_constVolatileModifier().setConst();
                break;
 
           case AttrSpec_POINTER:
-               printf ("Error: POINTER is an attribute specifier that effects the associated type (no flag is provided) \n");
+            // printf ("Error: POINTER is an attribute specifier that effects the associated type (no flag is provided) \n");
                break;
 
           case AttrSpec_PASS:
           case AttrSpec_NOPASS:
           case AttrSpec_NON_OVERRIDABLE:
           case AttrSpec_DEFERRED:
-               printf ("Error: Are these F08 attribute specs? astAttributeSpec = %d \n",astAttributeSpec);
+            // printf ("Error: Are these F08 attribute specs? astAttributeSpec = %d \n",astAttributeSpec);
                break;
 
 /*
@@ -4423,3 +4428,4 @@
      return returnValue;
    }
 
+

Modified: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/fortran_support.h
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/fortran_support.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/fortran_support.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -247,5 +247,8 @@
 
 bool isPubliclyAccessible( SgSymbol* symbol );
 
+// DQ (11/12/2008): Used to convert module names to lower case.
+std::string convertToLowerCase( const std::string & inputString );
+
 // endif for ROSE_FORTRAN_SUPPORT
 #endif

Copied: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/jserver.C (from rev 128, trunk/src/frontend/OpenFortranParser_SAGE_Connection/jserver.C)
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/jserver.C	                        (rev 0)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/jserver.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,377 @@
+/* Based on examples/docs from:
+ * http://java.sun.com/j2se/1.4.2/docs/guide/jni/spec/invocation.html#wp9502
+ * http://java.sun.com/j2se/1.4.2/docs/guide/jni/spec/jniTOC.html
+ * http://java.sun.com/docs/books/jni/html/invoke.html
+ */
+#include <string.h>
+#include <string>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "commandline_processing.h"
+
+#include "jserver.h"
+
+using namespace std;
+
+typedef struct {
+   JavaVM * jvm;
+   JNIEnv * env;
+} JvmT;
+
+
+static JvmT je;
+
+#if 0  
+static JNIEnv*  get_env();
+static JavaVM*  get_jvm();
+static JvmT*    get_jvmEnv();
+static void     jserver_start(JvmT* je);
+static void     jserver_destroy();
+static jclass   jserver_getJavaStringClass();
+#else //gdb cannot stop at a static funciton
+JNIEnv*  get_env();
+JavaVM*  get_jvm();
+JvmT*    get_jvmEnv();
+void     jserver_start(JvmT* je);
+void     jserver_destroy();
+jclass   jserver_getJavaStringClass();
+#endif
+
+// static jchar*   convertToJChar(const char *c_string);
+
+/* These  should be defined in jni.h */
+#ifndef JNI_VERSION_1_6
+#define JNI_VERSION_1_6 6
+#endif
+#ifndef JNI_VERSION_1_4
+#define JNI_VERSION_1_4 4
+#endif
+#ifndef JNI_VERSION_1_2
+#define JNI_VERSION_1_2 2
+#endif
+#ifndef JNI_VERSION_1_1
+#define JNI_VERSION_1_1 1
+#endif
+
+
+/* 
+ * This function does nothing since Java VM will
+ * be loaded and started automatically when it needed. 
+ *
+ */
+void 
+jserver_init()
+{
+  return ;
+}
+
+
+void 
+jserver_finish()
+{
+  return jserver_destroy();
+}
+
+
+jclass 
+jserver_FindClass(const char *name)
+{
+   JNIEnv *env = get_env();
+   return env->FindClass(name);
+};
+
+
+jmethodID
+jserver_GetMethodID(int static_method, jclass obj_class, 
+                           const char* name, const char* path)
+{
+   JNIEnv *env = get_env();
+   if (static_method==STATIC_METHOD)   
+     return  env->GetStaticMethodID(obj_class,name, path);
+   else
+     return  env->GetMethodID(obj_class,name, path);
+};
+
+void
+jserver_callMethod(jclass obj_class, jmethodID method, jobjectArray args)
+{  
+    JNIEnv *env = get_env();
+    env->CallStaticVoidMethod(obj_class, method, args);
+    return ;
+};
+
+int
+jserver_callBooleanMethod(jobject obj_class, jmethodID method)
+{
+    int retv = 0; 
+    JNIEnv *env = get_env();
+
+    retv = env->CallBooleanMethod(obj_class, method);
+    return retv;
+};
+
+
+//! Java VM loaded here
+/*! This function return <jvm, env> if Java VM is already load/run
+ *  otherwise load/run Java VM
+ */
+//static JvmT* 
+JvmT* 
+get_jvmEnv()
+{
+  //static JvmT je;
+  if (je.jvm == NULL ) {
+       jserver_start(&je);
+  }
+  return &je; 
+}
+
+//static JavaVM* 
+JavaVM* 
+get_jvm()
+{
+   return (get_jvmEnv())->jvm;
+}
+
+//static JNIEnv* 
+JNIEnv* 
+get_env()
+{
+   return (get_jvmEnv())->env;
+}
+     
+
+//static void 
+void 
+jserver_start(JvmT* je)
+{ 
+  JavaVMInitArgs jvm_args;  /* VM initialization args.  */
+  // char *jni_version = NULL;
+  int res;
+
+//  char *classpathEnvVar = NULL;
+//  char *classpath;
+//
+  string classpath = "-Djava.class.path=";
+  classpath += findRoseSupportPathFromBuild("/src/3rdPartyLibraries/fortran-parser/OpenFortranParser.jar", "lib/OpenFortranParser.jar") + ":";
+  classpath += findRoseSupportPathFromSource("/src/3rdPartyLibraries/antlr-jars/antlr-2.7.7.jar", "lib/antlr-2.7.7.jar") + ":";
+  classpath += findRoseSupportPathFromSource("/src/3rdPartyLibraries/antlr-jars/antlr-3.0.1.jar", "lib/antlr-3.0.1.jar") + ":";
+  classpath += findRoseSupportPathFromSource("/src/3rdPartyLibraries/antlr-jars/antlr-runtime-3.0.1.jar", "lib/antlr-runtime-3.0.1.jar") + ":";
+  classpath += findRoseSupportPathFromSource("/src/3rdPartyLibraries/antlr-jars/stringtemplate-3.1b1.jar", "lib/stringtemplate-3.1b1.jar") + ":";
+  classpath += ".";
+
+  //const char *javaCPOption = "-Djava.class.path=";
+  //int len;
+
+
+  //classpathEnvVar = getenv("CLASSPATH");
+
+  //len = strlen(classpathEnvVar) + strlen(javaCPOption) + 1;
+ 
+  //classpath = malloc(sizeof(char)*len);
+  //snprintf(classpath, len, "%s%s\0", javaCPOption, classpathEnvVar);
+
+   /* Set up the VM initialization args.  */
+  //jni_version = getenv("JNI_VERSION");
+#if 0
+  if(jni_version)
+  {
+  if(strcmp(jni_version, "1.6") == 0)
+    jvm_args.version = JNI_VERSION_1_6;
+  else if(strcmp(jni_version, "1.4") == 0)
+    jvm_args.version = JNI_VERSION_1_4;
+  else if(strcmp(jni_version, "1.2") == 0)
+    jvm_args.version = JNI_VERSION_1_2;
+  else if(strcmp(jni_version, "1.1") == 0)
+    jvm_args.version = JNI_VERSION_1_1;
+  else
+    {
+    /* We got an *invalid* JNI_VERSION.  Try defaulting to 1_4.  */
+    fprintf(stderr, "Warning: Invalid JNI_VERSION.\nDefaulting to 1.4!\n");
+    jvm_args.version = JNI_VERSION_1_4;
+    }
+   } else  {
+     /* The user did not set JNI_VERSION in their environment.  
+      * Warn them and then try defaulting to 1_4.  
+      */
+     fprintf(stderr, "Warning: JNI_VERSION environment variable is not set! Defaulting to 1.4!\n");
+     jvm_args.version = JNI_VERSION_1_4;
+    }
+
+ 
+   jvm_args.options = malloc(sizeof(JavaVMOption));
+
+   xDEBUG(jvm_args.options==NULL, printf("Fatal Error: cannot allocate memory for \"jvm_args.options\". \n"));
+
+   jvm_args.nOptions = 1;
+
+   jvm_args.options->optionString = strdup(classpath);
+
+   jvm_args.ignoreUnrecognized = JNI_FALSE;
+#endif
+
+     jvm_args.version = JNI_VERSION_1_4;
+     jvm_args.nOptions = 1;
+     jvm_args.options = new JavaVMOption[jvm_args.nOptions];
+     jvm_args.options[0].optionString = strdup(classpath.c_str());
+     jvm_args.ignoreUnrecognized = JNI_FALSE;
+
+     // JNI_CreateJavaVM(&jvm, (void **)&env, &jvm_args);
+     
+     //handleExceptionMaybe(jvm, env);
+     
+     /* Create and load the Java VM.  */
+     res = JNI_CreateJavaVM(&(je->jvm), (void **)&(je->env), &jvm_args);
+
+     if (res<0 || je->jvm==NULL || je->env==NULL)
+          exit(1);  
+   return ;
+}
+
+
+
+//static void 
+void 
+jserver_destroy()
+{
+    
+    JavaVM*  jvm = get_jvm();
+    if (jvm != NULL) {
+         /* Destroy the Java VM.  */
+         jvm->DestroyJavaVM();
+    }
+}
+
+
+void 
+jserver_handleException() 
+{
+    JNIEnv* env = get_env();
+     if(env->ExceptionOccurred())
+        env->ExceptionDescribe();
+
+     jserver_destroy();
+
+     /* Exit since the exception should mean we can't recover.  */
+     exit(1);
+}
+
+
+jobject
+jserver_getNewObject(jclass cls,jmethodID method, jobjectArray args,
+                                        jstring name,jstring type)
+{
+    JNIEnv* env = get_env();
+    return env->NewObject(cls,method, args, name, type);
+
+}
+  
+jstring 
+jserver_getJavaString(const char *inString)
+{
+#if 0
+	 /* Based on example from:
+	  * http://java.sun.com/docs/books/jni/html/fldmeth.html#11202  */
+	 jclass stringClass;
+	 jmethodID consID;
+	 jstring javaString;
+	 jcharArray elemArray;
+         JNIEnv*  env = get_env();
+
+	 /* Get the java.lang.String class.  */
+	 stringClass = jserver_getJavaStringClass();
+	 if(stringClass == NULL)
+		return NULL;
+
+	 /* Get the String(char[]) constructor.  */
+	 consID = env->GetMethodID(stringClass, "<init>", "([C)V");
+
+	 if(consID == NULL)
+		return NULL;
+
+	 /* Create the char[] that holds the chars in 'string'.  */
+	 elemArray = env->NewCharArray(strlen(string));
+
+	 if(elemArray == NULL)
+		return NULL;
+
+	 (*env)->SetCharArrayRegion(elemArray, 0, strlen(string),
+	                                            convertToJChar(string));
+
+	 /* Create the java.lang.String object by invoking the given constructor:
+	  * String(char[]).  
+	  */
+	 javaString = env->NewObject(stringClass, consID, elemArray);
+
+	 /* Free local references.  */
+	 env->DeleteLocalRef(elemArray);
+
+	 env->DeleteLocalRef(stringClass);
+
+	 return javaString;
+#endif
+         JNIEnv*  env = get_env();
+         return env->NewStringUTF(inString);
+}
+
+
+jobjectArray 
+jserver_getJavaStringArray(int argc, char **argv)
+{
+	 jobjectArray argsStringArray = NULL;
+	 jclass stringClass;
+	 int i;
+         JNIEnv * env = get_env();
+
+	 /* We need the String class because that is the underlying type of
+		 the array.  */
+	 stringClass = jserver_getJavaStringClass();
+	 if(stringClass == NULL)
+		return NULL;
+
+	 /* Build a new object array.  Params are: env, length, class type of the 
+		 array, initial object(?).  */
+	 argsStringArray = env->NewObjectArray((argc-1), stringClass, NULL);
+
+	 if(argsStringArray == NULL)
+		return NULL;
+
+	 /* Put all args from argv, after the first (which is this program's
+		 name) into the array of Strings for FortranMain.  The args array
+		 for Java does not include the program name.  */
+	 for(i = 1; i < argc; i++)
+ 	   env->SetObjectArrayElement(argsStringArray, (jsize)i-1,
+						jserver_getJavaString(argv[i]));
+
+	 return argsStringArray;
+}
+
+
+#if 0
+static jchar *
+convertToJChar(const char *c_string)
+{
+	 int i;
+	 int len;
+	 jchar *jchar_string;
+
+	 len = strlen(c_string);
+	 jchar_string = malloc(sizeof(jchar)*len);
+
+	 for(i = 0; i < len; i++)
+		jchar_string[i] = (jchar)(*(c_string+i));
+
+	 return jchar_string;
+}
+
+#endif
+
+//static jclass 
+jclass 
+jserver_getJavaStringClass()
+{
+      JNIEnv * env = get_env();
+       return env->FindClass("java/lang/String");
+}
+

Copied: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/jserver.h (from rev 128, trunk/src/frontend/OpenFortranParser_SAGE_Connection/jserver.h)
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/jserver.h	                        (rev 0)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/jserver.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,22 @@
+#ifndef __JSERVER_H__
+#define __JSERVER_H__
+
+#include "jni.h"
+
+#define STATIC_METHOD 1
+#define REGULAR_METHOD 0
+
+#define xDEBUG(flag,code)  { if(flag) {code; fflush(stdout);}}
+
+extern jstring      jserver_getJavaString(const char*);
+extern jobject       jserver_getNewObject(jclass,jmethodID, jobjectArray,jstring,jstring);
+extern jclass       jserver_FindClass(const char *name);
+extern jobjectArray jserver_getJavaStringArray(int argc, char **argv);
+extern void         jserver_callMethod(jclass, jmethodID, jobjectArray);
+extern int          jserver_callBooleanMethod(jobject, jmethodID);
+extern jmethodID    jserver_GetMethodID(int, jclass, const char*, const char*);
+extern void         jserver_handleException();
+extern void         jserver_init();
+extern void         jserver_finish();
+
+#endif

Copied: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/ofp.C (from rev 128, trunk/src/frontend/OpenFortranParser_SAGE_Connection/ofp.C)
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/ofp.C	                        (rev 0)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/ofp.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,133 @@
+#include <string.h>
+#include <string>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "jserver.h"
+#include "ofp.h"
+
+using std::string;
+
+static jmethodID jofp_get_method(int, const char*, const char*);
+static jmethodID jofp_get_main() ;
+static jmethodID jofp_get_error_method();
+static jmethodID jofp_get_cons_method();
+static jclass    jofp_get_class();
+static jobject   jofp_get_new_object(jmethodID, jobjectArray, jstring, jstring);
+//static int       jofp_invoke(int, char **);
+int       jofp_invoke(int, char **);
+
+
+int 
+jvm_ofp_processing(int argc,char** argv)
+{  
+    /* call Open Fortran Parser */   
+    return jofp_invoke(argc, argv);
+
+}
+
+
+static jclass 
+jofp_get_class() 
+{ 
+    static jclass ofp_class ;
+    if (ofp_class == NULL)  {
+        ofp_class = jserver_FindClass("fortran/ofp/FrontEnd");
+        if(ofp_class == NULL)  jserver_handleException();
+    }
+    return ofp_class;
+}
+
+
+static jobject
+jofp_get_new_object(jmethodID method, jobjectArray args, jstring name, 
+                                                                  jstring type)
+{
+    return jserver_getNewObject(jofp_get_class(),method, args, name, type);
+}
+
+
+//static int 
+int
+jofp_invoke(int argc, char **argv)
+{
+    int retval= 0;
+
+    jobjectArray args;
+ 
+    /* Create a Java String[] out of argv (everything after the first arg).  */
+    args = jserver_getJavaStringArray(argc, argv);
+
+    /* The filename of the Fortran source to parse MUST be the LAST
+     * argument!  The setting of this and the type below are probably not
+     * needed since we call main() and give it all args to parse itself.  
+     */
+     jstring fileName = jserver_getJavaString(argv[argc-1]);
+
+     jstring type = jserver_getJavaString("fortran.ofp.parser.java.FortranParserActionNull");
+
+
+     if (fileName == NULL || args == NULL || type == NULL) jserver_handleException(); 
+
+     jserver_callMethod(jofp_get_class(), jofp_get_main(), args);
+
+     jobject new_ofp_class =jofp_get_new_object(jofp_get_cons_method(),args, fileName, type);
+
+     retval = jserver_callBooleanMethod(new_ofp_class, jofp_get_error_method());
+
+     if (retval != 0)  {
+         fprintf(stderr, "Warning: jserver_callBooleanMethod return non-zero result.\n");
+     }      
+
+    return retval;
+}
+
+
+static jmethodID
+jofp_get_method(int static_method, const char* name, const char* arg) 
+{
+    jmethodID result = NULL;
+
+    /* Get the constructor for FortranMain(String[] args, String fileName,
+     * String type).  
+     */
+    result = jserver_GetMethodID(static_method, jofp_get_class(), name, arg);
+
+    if (result == NULL) jserver_handleException();
+	return result;
+}
+
+
+static jmethodID 
+jofp_get_cons_method()
+{
+    static jmethodID  consMethod;
+
+    if (consMethod == NULL) 
+	consMethod = jofp_get_method(REGULAR_METHOD, "<init>", 
+	"([Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
+    return consMethod;
+}
+
+
+static jmethodID 
+jofp_get_error_method()
+{
+    static  jmethodID errorMethod;
+    if (errorMethod ==NULL) 
+         errorMethod = jofp_get_method(STATIC_METHOD, "getError", "()Z");
+    return errorMethod;
+}
+
+
+static jmethodID 
+jofp_get_main() 
+{
+   static jmethodID  mainMethod;
+   if (mainMethod == NULL) 
+        mainMethod = jofp_get_method(STATIC_METHOD, "main", "([Ljava/lang/String;)V");
+   return mainMethod;
+}
+
+
+

Copied: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/ofp.h (from rev 128, trunk/src/frontend/OpenFortranParser_SAGE_Connection/ofp.h)
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/ofp.h	                        (rev 0)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/ofp.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,6 @@
+#ifndef __OFP_H__
+#define __OFP_H__
+
+extern int jvm_ofp_processing(int argc,char** argv);
+
+#endif

Modified: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/openFortranParser_main.C
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/openFortranParser_main.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/openFortranParser_main.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -39,6 +39,7 @@
 
 #define ERROR_CODE 4
 
+#if 0 //FMZ
 /* These should be defined in jni.h.  */  
 #ifndef JNI_VERSION_1_6
 #define JNI_VERSION_1_6 6
@@ -57,8 +58,11 @@
   jclass getJavaStringClass(JNIEnv *env);
   void handleException(JavaVM *jvm, JNIEnv *env);
   void handleExceptionMaybe(JavaVM *jvm, JNIEnv *env);
-  int runOFP(int argc, char **argv);
 
+#endif
+
+int runOFP(int argc, char **argv);
+
 // Include rose.h so that we can reference SgSourceFile::build_classpath() 
 #include "rose.h"
 
@@ -95,11 +99,11 @@
     string new_value = findRoseSupportPathFromBuild("src/frontend/OpenFortranParser_SAGE_Connection/.libs", "lib");
 
  /* Save the old value */
-    const char* old_value = getenv(LTDL_SHLIBPATH_VAR); // Might be null
+    const char* old_value = getenv(ROSE_SHLIBPATH_VAR); // Might be null
 
 #if 0
     printf ("Old value: LD_LIBRARY_PATH = %s \n",old_value);
-    printf ("New value: LD_LIBRARY_PATH = %s \n",new_value);
+    printf ("New value: LD_LIBRARY_PATH = %s \n",new_value.c_str());
  /* This value can be empty if the configuration was done using a relative path, as I recall! */
     printf ("ROSE_AUTOMAKE_TOP_BUILDDIR = %s \n",ROSE_AUTOMAKE_TOP_BUILDDIR);
     printf ("ROSE_COMPILE_TREE_PATH     = %s \n",ROSE_COMPILE_TREE_PATH);
@@ -107,7 +111,7 @@
 
 #if OVERWRITE_LD_LIBRARY_PATH
     int overwrite = 1;
-    int env_status = setenv(LTDL_SHLIBPATH_VAR,new_value.c_str(),overwrite);
+    int env_status = setenv(ROSE_SHLIBPATH_VAR,new_value.c_str(),overwrite);
     assert(env_status == 0);
 #endif
 
@@ -117,7 +121,7 @@
 
  /* Reset to the saved value */
 #if OVERWRITE_LD_LIBRARY_PATH
-    env_status = setenv(LTDL_SHLIBPATH_VAR,old_value,overwrite);
+    env_status = setenv(ROSE_SHLIBPATH_VAR,old_value,overwrite);
     assert(env_status == 0);
 #endif
 
@@ -129,9 +133,13 @@
   if (!val) return def;
   return val;
 }
+// FMZ (5/19/2008)
+#include "jserver.h"
+#include "ofp.h"
 
 int runOFP(int argc, char **argv)
   {
+#if 0 //FMZ (5/19/2008)
 	 JavaVM *jvm;   /* The Java VM.  */
 	 JNIEnv *env;   /* The environment for retrieving class objects, etc.  */
 	 JavaVMInitArgs jvm_args;  /* VM initialization args.  */
@@ -235,9 +243,17 @@
 	 jvm->DestroyJavaVM();
 
 	 return (retval == JNI_TRUE ? ERROR_CODE : 0);
-  }
 
+#else // FMZ (5/19/2008)
+        int retval= 0;
+        /* start/find the Java VM with ofp method loaded,run ofp on the args */
+        retval = jvm_ofp_processing(argc, argv);
   
+        return retval;
+  }
+#endif
+  
+#if 0  //FMZ (5/19/2008)
   jobjectArray getJavaStringArray(JNIEnv *env, int argc, char **argv)
   {
 	 jobjectArray argsStringArray = NULL;
@@ -288,3 +304,5 @@
 	 /* Exit since the exception should mean we can't recover.  */
 	 exit(1);
   }
+#endif
+

Deleted: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.C
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,2608 +0,0 @@
-#line 2 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.C"
-
-#line 4 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.C"
-
-#define  YY_INT_ALIGNED short int
-
-/* A lexical scanner generated by flex */
-
-#define yy_create_buffer Rose_Fortran_fixed_format__create_buffer
-#define yy_delete_buffer Rose_Fortran_fixed_format__delete_buffer
-#define yy_flex_debug Rose_Fortran_fixed_format__flex_debug
-#define yy_init_buffer Rose_Fortran_fixed_format__init_buffer
-#define yy_flush_buffer Rose_Fortran_fixed_format__flush_buffer
-#define yy_load_buffer_state Rose_Fortran_fixed_format__load_buffer_state
-#define yy_switch_to_buffer Rose_Fortran_fixed_format__switch_to_buffer
-#define yyin Rose_Fortran_fixed_format_in
-#define yyleng Rose_Fortran_fixed_format_leng
-#define yylex Rose_Fortran_fixed_format_lex
-#define yylineno Rose_Fortran_fixed_format_lineno
-#define yyout Rose_Fortran_fixed_format_out
-#define yyrestart Rose_Fortran_fixed_format_restart
-#define yytext Rose_Fortran_fixed_format_text
-#define yywrap Rose_Fortran_fixed_format_wrap
-#define yyalloc Rose_Fortran_fixed_format_alloc
-#define yyrealloc Rose_Fortran_fixed_format_realloc
-#define yyfree Rose_Fortran_fixed_format_free
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
-
-/* First, we deal with  platform-specific or compiler-specific issues. */
-
-/* begin standard C headers. */
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-
-/* end standard C headers. */
-
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types. 
- */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
-
-#include <inttypes.h>
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t; 
-typedef unsigned short int flex_uint16_t;
-typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
-
-/* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN               (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN              (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN              (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX               (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX              (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX              (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX              (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX             (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX             (4294967295U)
-#endif
-
-#endif /* ! FLEXINT_H */
-
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else	/* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif	/* defined (__STDC__) */
-#endif	/* ! __cplusplus */
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index.  If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition.  This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN (yy_start) = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.  The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START (((yy_start) - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE Rose_Fortran_fixed_format_restart(Rose_Fortran_fixed_format_in  )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
-#define YY_BUF_SIZE 16384
-#endif
-
-/* The state buf must be large enough to hold one state per character in the main buffer.
- */
-#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
-
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
-
-extern int Rose_Fortran_fixed_format_leng;
-
-extern FILE *Rose_Fortran_fixed_format_in, *Rose_Fortran_fixed_format_out;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-    #define YY_LESS_LINENO(n)
-    
-/* Return all but the first "n" matched characters back to the input stream. */
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up Rose_Fortran_fixed_format_text. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		*yy_cp = (yy_hold_char); \
-		YY_RESTORE_YY_MORE_OFFSET \
-		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up Rose_Fortran_fixed_format_text again */ \
-		} \
-	while ( 0 )
-
-#define unput(c) yyunput( c, (yytext_ptr)  )
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
-struct yy_buffer_state
-	{
-	FILE *yy_input_file;
-
-	char *yy_ch_buf;		/* input buffer */
-	char *yy_buf_pos;		/* current position in input buffer */
-
-	/* Size of input buffer in bytes, not including room for EOB
-	 * characters.
-	 */
-	yy_size_t yy_buf_size;
-
-	/* Number of characters read into yy_ch_buf, not including EOB
-	 * characters.
-	 */
-	int yy_n_chars;
-
-	/* Whether we "own" the buffer - i.e., we know we created it,
-	 * and can realloc() it to grow it, and should free() it to
-	 * delete it.
-	 */
-	int yy_is_our_buffer;
-
-	/* Whether this is an "interactive" input source; if so, and
-	 * if we're using stdio for input, then we want to use getc()
-	 * instead of fread(), to make sure we stop fetching input after
-	 * each newline.
-	 */
-	int yy_is_interactive;
-
-	/* Whether we're considered to be at the beginning of a line.
-	 * If so, '^' rules will be active on the next match, otherwise
-	 * not.
-	 */
-	int yy_at_bol;
-
-    int yy_bs_lineno; /**< The line count. */
-    int yy_bs_column; /**< The column count. */
-    
-	/* Whether to try to fill the input buffer when we reach the
-	 * end of it.
-	 */
-	int yy_fill_buffer;
-
-	int yy_buffer_status;
-
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
-	/* When an EOF's been seen but there's still some text to process
-	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
-	 * shouldn't try reading from the input source any more.  We might
-	 * still have a bunch of tokens to match, though, because of
-	 * possible backing-up.
-	 *
-	 * When we actually see the EOF, we change the status to "new"
-	 * (via Rose_Fortran_fixed_format_restart()), so that the user can continue scanning by
-	 * just pointing Rose_Fortran_fixed_format_in at a new input file.
-	 */
-#define YY_BUFFER_EOF_PENDING 2
-
-	};
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-
-/* Stack of input buffers. */
-static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
-static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- *
- * Returns the top of the stack, or NULL.
- */
-#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
-                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
-                          : NULL)
-
-/* Same as previous macro, but useful when we know that the buffer stack is not
- * NULL or when we need an lvalue. For internal use only.
- */
-#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-
-/* yy_hold_char holds the character lost when Rose_Fortran_fixed_format_text is formed. */
-static char yy_hold_char;
-static int yy_n_chars;		/* number of characters read into yy_ch_buf */
-int Rose_Fortran_fixed_format_leng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 0;		/* whether we need to initialize */
-static int yy_start = 0;	/* start state number */
-
-/* Flag which is used to allow Rose_Fortran_fixed_format_wrap()'s to do buffer switches
- * instead of setting up a fresh Rose_Fortran_fixed_format_in.  A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void Rose_Fortran_fixed_format_restart (FILE *input_file  );
-void Rose_Fortran_fixed_format__switch_to_buffer (YY_BUFFER_STATE new_buffer  );
-YY_BUFFER_STATE Rose_Fortran_fixed_format__create_buffer (FILE *file,int size  );
-void Rose_Fortran_fixed_format__delete_buffer (YY_BUFFER_STATE b  );
-void Rose_Fortran_fixed_format__flush_buffer (YY_BUFFER_STATE b  );
-void Rose_Fortran_fixed_format_push_buffer_state (YY_BUFFER_STATE new_buffer  );
-void Rose_Fortran_fixed_format_pop_buffer_state (void );
-
-static void Rose_Fortran_fixed_format_ensure_buffer_stack (void );
-static void Rose_Fortran_fixed_format__load_buffer_state (void );
-static void Rose_Fortran_fixed_format__init_buffer (YY_BUFFER_STATE b,FILE *file  );
-
-#define YY_FLUSH_BUFFER Rose_Fortran_fixed_format__flush_buffer(YY_CURRENT_BUFFER )
-
-YY_BUFFER_STATE Rose_Fortran_fixed_format__scan_buffer (char *base,yy_size_t size  );
-YY_BUFFER_STATE Rose_Fortran_fixed_format__scan_string (yyconst char *yy_str  );
-YY_BUFFER_STATE Rose_Fortran_fixed_format__scan_bytes (yyconst char *bytes,int len  );
-
-void *Rose_Fortran_fixed_format_alloc (yy_size_t  );
-void *Rose_Fortran_fixed_format_realloc (void *,yy_size_t  );
-void Rose_Fortran_fixed_format_free (void *  );
-
-#define yy_new_buffer Rose_Fortran_fixed_format__create_buffer
-
-#define yy_set_interactive(is_interactive) \
-	{ \
-	if ( ! YY_CURRENT_BUFFER ){ \
-        Rose_Fortran_fixed_format_ensure_buffer_stack (); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            Rose_Fortran_fixed_format__create_buffer(Rose_Fortran_fixed_format_in,YY_BUF_SIZE ); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
-	}
-
-#define yy_set_bol(at_bol) \
-	{ \
-	if ( ! YY_CURRENT_BUFFER ){\
-        Rose_Fortran_fixed_format_ensure_buffer_stack (); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            Rose_Fortran_fixed_format__create_buffer(Rose_Fortran_fixed_format_in,YY_BUF_SIZE ); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
-	}
-
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-
-/* Begin user sect3 */
-
-#define Rose_Fortran_fixed_format_wrap(n) 1
-#define YY_SKIP_YYWRAP
-
-typedef unsigned char YY_CHAR;
-
-FILE *Rose_Fortran_fixed_format_in = (FILE *) 0, *Rose_Fortran_fixed_format_out = (FILE *) 0;
-
-typedef int yy_state_type;
-
-extern int Rose_Fortran_fixed_format_lineno;
-
-int Rose_Fortran_fixed_format_lineno = 1;
-
-extern char *Rose_Fortran_fixed_format_text;
-#define yytext_ptr Rose_Fortran_fixed_format_text
-
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[]  );
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up Rose_Fortran_fixed_format_text.
- */
-#define YY_DO_BEFORE_ACTION \
-	(yytext_ptr) = yy_bp; \
-	Rose_Fortran_fixed_format_leng = (size_t) (yy_cp - yy_bp); \
-	(yy_hold_char) = *yy_cp; \
-	*yy_cp = '\0'; \
-	(yy_c_buf_p) = yy_cp;
-
-#define YY_NUM_RULES 36
-#define YY_END_OF_BUFFER 37
-/* This struct is not used in this scanner,
-   but its presence is necessary. */
-struct yy_trans_info
-	{
-	flex_int32_t yy_verify;
-	flex_int32_t yy_nxt;
-	};
-static yyconst flex_int16_t yy_accept[97] =
-    {   0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,   37,   36,   33,   36,   33,   33,   35,   34,
-        8,    4,   30,    5,   35,    9,   35,   29,   18,   35,
-       19,    3,   32,   35,    3,    0,    0,    1,    6,    0,
-        0,    0,    0,    0,    0,    0,    0,    7,   15,   31,
-       17,   14,   16,    3,   32,   31,    0,    3,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,   21,    0,    0,   23,   26,   24,   25,   22,
-        0,    0,   11,    0,    2,   10,   12,    0,    0,   20,
-        0,    0,   13,   27,   28,    0
-
-    } ;
-
-static yyconst flex_int32_t yy_ec[256] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    3,    4,    5,    6,    7,    8,    9,    9,    9,
-        9,    9,    9,    9,    9,    9,    9,   10,   11,   12,
-       13,   14,    1,    1,   15,   15,   16,   15,   15,   15,
-       15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
-       15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
-        1,    1,    1,    1,   15,    1,   17,   18,   15,   19,
-
-       20,   21,   22,   15,   15,   15,   18,   23,   15,   24,
-       25,   15,   26,   27,   28,   29,   30,   31,   15,   15,
-       15,   15,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1
-    } ;
-
-static yyconst flex_int32_t yy_meta[32] =
-    {   0,
-        1,    2,    1,    1,    1,    1,    1,    1,    3,    4,
-        1,    1,    1,    1,    3,    3,    5,    5,    3,    3,
-        3,    3,    5,    5,    3,    3,    3,    3,    3,    3,
-        3
-    } ;
-
-static yyconst flex_int16_t yy_base[106] =
-    {   0,
-        0,    0,    0,    1,    0,    0,    0,    0,    0,    0,
-       17,   47,  129,  150,    0,    0,  150,  117,  150,  150,
-      102,  150,  150,  150,   55,    0,   94,  150,   90,   89,
-       86,    0,  150,    2,   83,    0,   96,  150,  150,   73,
-       70,   78,   30,   31,   33,   67,   65,  150,  150,  150,
-      150,  150,  150,    0,  150,   89,   88,    0,    0,   70,
-       55,   65,   80,   76,   75,   74,   47,   45,   62,   38,
-        0,   60,  150,   59,   35,  150,  150,  150,  150,  150,
-       30,   49,  150,   35,  150,  150,  150,   32,    3,  150,
-        2,    0,  150,  150,  150,  150,  107,  112,  117,  122,
-
-      125,  129,  134,  139,  144
-    } ;
-
-static yyconst flex_int16_t yy_def[106] =
-    {   0,
-       97,   97,   98,   98,   97,   97,   97,   97,   97,   97,
-       96,   11,   96,   96,   99,   99,   96,  100,   96,   96,
-       96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
-       96,  101,   96,  102,  101,  103,  100,   96,   96,   96,
-       96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
-       96,   96,   96,  101,   96,  102,  102,   35,  104,   96,
-       96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
-      105,   96,   96,   96,   96,   96,   96,   96,   96,   96,
-       96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
-       96,   96,   96,   96,   96,    0,   96,   96,   96,   96,
-
-       96,   96,   96,   96,   96
-    } ;
-
-static yyconst flex_int16_t yy_nxt[182] =
-    {   0,
-       96,   16,   16,   55,   96,   96,   95,   48,   94,   93,
-       96,   56,   49,   96,   96,   17,   18,   19,   20,   21,
-       22,   23,   24,   25,   26,   19,   27,   28,   29,   30,
-       31,   32,   32,   32,   32,   32,   32,   32,   32,   32,
-       32,   32,   32,   32,   32,   32,   32,   32,   33,   63,
-       65,   92,   67,   80,   91,   90,   34,   68,   64,   66,
-       89,   73,   88,   35,   35,   87,   86,   84,   83,   35,
-       35,   40,   81,   82,   41,   42,   43,   44,   45,   46,
-       79,   78,   77,   47,   55,   74,   76,   75,   72,   55,
-       55,   70,   57,   69,   62,   61,   60,   38,   53,   58,
-
-       58,   52,   51,   50,   39,   58,   58,   14,   14,   14,
-       14,   14,   15,   15,   15,   15,   15,   36,   38,   36,
-       36,   36,   37,   37,   37,   37,   37,   54,   96,   54,
-       57,   96,   57,   57,   59,   96,   59,   59,   59,   71,
-       96,   71,   71,   71,   85,   96,   85,   85,   85,   13,
-       96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
-       96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
-       96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
-       96
-    } ;
-
-static yyconst flex_int16_t yy_chk[182] =
-    {   0,
-        0,    3,    4,   34,    0,    0,   92,   26,   91,   89,
-        0,   34,   26,    0,    0,    3,    4,   11,   11,   11,
-       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
-       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
-       11,   11,   11,   11,   11,   11,   11,   11,   12,   43,
-       44,   88,   45,   67,   84,   82,   12,   45,   43,   44,
-       81,   61,   75,   12,   12,   74,   72,   70,   69,   12,
-       12,   25,   67,   68,   25,   25,   25,   25,   25,   25,
-       66,   65,   64,   25,   35,   61,   63,   62,   60,   57,
-       56,   47,   35,   46,   42,   41,   40,   37,   31,   35,
-
-       35,   30,   29,   27,   21,   35,   35,   97,   97,   97,
-       97,   97,   98,   98,   98,   98,   98,   99,   18,   99,
-       99,   99,  100,  100,  100,  100,  100,  101,   13,  101,
-      102,    0,  102,  102,  103,    0,  103,  103,  103,  104,
-        0,  104,  104,  104,  105,    0,  105,  105,  105,   96,
-       96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
-       96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
-       96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
-       96
-    } ;
-
-static yy_state_type yy_last_accepting_state;
-static char *yy_last_accepting_cpos;
-
-extern int Rose_Fortran_fixed_format__flex_debug;
-int Rose_Fortran_fixed_format__flex_debug = 0;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *Rose_Fortran_fixed_format_text;
-#line 1 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-#line 3 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-/* 
-Version 0.2.1 of FORTRAN scanner.
-03-09-2007: Written by Ramakrishna Upadrasta and Dan Quinlan.
-
-In an input free formatted FORTRAN file, this scanner recognizes the following
-the ROSE sequence point in a FORTRAN file
-     comments (beginning with ! and extendig till the end of the line)
-     string literals (enclosed by single quotes '')
-     Keywords (the list is provided in this code)
-*/
-
-
-/*
--------------------------------------------------------------------------------------
-New in the current release:
-    Better data structures for the keywords
-    scripts to generate the header files automatically
-    preliminary macro processing
--------------------------------------------------------------------------------------
-*/
-
-/*
--------------------------------------------------------------------------------------
-Acknowledgements:
--------------------------------------------------------------------------------------
-The authors (Dan and Rama) looked at the source codes of GFORTRAN as well as G95. 
-We gratefully acknowledge the authors of GFORTRAN and G95.
-*/
-
-/*
--------------------------------------------------------------------------------------
-Limitations: 
--------------------------------------------------------------------------------------
-The authors (Rama and Dan) recognize many of the limitations. 
-They will be tabulated later.
-*/
-
-
-
-/*
-There are three scanners in the ROSE frontend. One for C/C++, two for fixed and free 
-format FORTRAN languages. So that the flex generated C code and definitions (Rose_Fortran_fixed_format_lex, 
-Rose_Fortran_fixed_format_text, etc.) of these does not interfere with any other, we are adding 
-     the prefix 'Rose_Fortran_C_Cxx_'        for the C/C++ scanner,
-     the prefix 'Rose_Fortran_Fixed_Format_' for the Fixed Format FORTRAN scanner and
-     the prefix 'Rose_Fortran_Free_Format_'  for the Free Format FORTRAN scanner
-by using the -P<prefix options>
-Note: We could have done this in an arguably more elegant way by changing the individual uses of these 
-functions/variables.
-*/
-
-
-#define Rose_Fortran_fixed_format_text Rose_Fortran_fixed_format_text
-#define Rose_Fortran_fixed_format_lex Rose_Fortran_fixed_format_lex 
-
-
-#include <iostream>
-#include <stdio.h>
-#include <ctype.h>
-#include <string>
-#include <list>
-
-#include "rose.h"
-
-using namespace std;
-
-// namespace Rose_Fortran_fixed_format_namespace {
-
-#include "general_token_defs.h"
-#include "./rose_fortran_token_maps.h"
-
-#if 0
-// These are now defined in general_defs.h
-struct file_pos_info
-{
-    int line_num;
-    int column_num;
-};
-
-struct stream_element
-{ 
-    struct token_element * p_tok_elem;
-    struct file_pos_info beginning_fpi;
-    struct file_pos_info ending_fpi;
-};
-#endif
-
-
-LexTokenStreamTypePointer ROSE_Fortran_fixed_format_token_stream_pointer = NULL;
-typedef LexTokenStreamType::iterator SE_ITR;
-
-static struct file_pos_info curr_beginning;
-
-//Operators
-//This includes the "new" as well as the "old" operators
-static token_element ROSE_Fortran_Operator_map[] = 
-{
-      {"+",       SgToken::FORTRAN_INTRINSIC_PLUS},            /*   GFORTRAN/G95 equivalent is INTRINSIC_PLUS      */
-      {"-",       SgToken::FORTRAN_INTRINSIC_MINUS},           /*   GFORTRAN/G95 equivalent is INTRINSIC_MINUS     */
-      {"**",      SgToken::FORTRAN_INTRINSIC_POWER},           /*   GFORTRAN/G95 equivalent is INTRINSIC_POWER     */
-      {"//",      SgToken::FORTRAN_INTRINSIC_CONCAT},          /*   GFORTRAN/G95 equivalent is INTRINSIC_CONCAT    */
-      {"*",       SgToken::FORTRAN_INTRINSIC_TIMES},           /*   GFORTRAN/G95 equivalent is INTRINSIC_TIMES     */
-      {"/",       SgToken::FORTRAN_INTRINSIC_DIVIDE},          /*   GFORTRAN/G95 equivalent is INTRINSIC_DIVIDE    */
-      {".and.",   SgToken::FORTRAN_INTRINSIC_AND},             /*   GFORTRAN/G95 equivalent is INTRINSIC_AND       */
-      {".or.",    SgToken::FORTRAN_INTRINSIC_OR},              /*   GFORTRAN/G95 equivalent is INTRINSIC_OR        */
-      {".eqv.",   SgToken::FORTRAN_INTRINSIC_EQV},             /*   GFORTRAN/G95 equivalent is INTRINSIC_EQV       */
-      {".neqv.",  SgToken::FORTRAN_INTRINSIC_NEQV},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
-      //{".true.",  SgToken::FORTRAN_TRUE},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
-      //{".false.",  SgToken::FORTRAN_FALSE},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
-      {"==",      SgToken::FORTRAN_INTRINSIC_EQ},              /*   GFORTRAN/G95 equivalent is INTRINSIC_EQ        */
-      {"/=",      SgToken::FORTRAN_INTRINSIC_NE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_NE        */
-      {">=",      SgToken::FORTRAN_INTRINSIC_GE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_GE        */
-      {"<=",      SgToken::FORTRAN_INTRINSIC_LE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_LE        */
-      {"<",       SgToken::FORTRAN_INTRINSIC_LT},              /*   GFORTRAN/G95 equivalent is INTRINSIC_LT        */
-      {">",       SgToken::FORTRAN_INTRINSIC_GT},              /*   GFORTRAN/G95 equivalent is INTRINSIC_GT        */
-      {".not.",   SgToken::FORTRAN_INTRINSIC_NOT},             /*   GFORTRAN/G95 equivalent is INTRINSIC_NOT       */
-      {".eq.",    SgToken::FORTRAN_INTRINSIC_OLDEQ},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDEQ     */
-      {".ne.",    SgToken::FORTRAN_INTRINSIC_OLDNE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDNE     */
-      {".ge.",    SgToken::FORTRAN_INTRINSIC_OLDGE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDGE     */
-      {".le.",    SgToken::FORTRAN_INTRINSIC_OLDLE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDLE     */
-      {".lt.",    SgToken::FORTRAN_INTRINSIC_OLDLT},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDLT     */
-      {".gt.",    SgToken::FORTRAN_INTRINSIC_OLDGT}            /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDGT     */
-};
-
-
-//We know that this is a magic number. 
-//We also know how to fix it.
-#define NUM_KEYWORDS 67
-
-//returns -1 if the string is not a keyword
-//otherwise returns the token ID
-static int identify_if_keyword(string str)
-{
-    //In FORTRAN, the identifiers are case insensitive.
-    //So, variable 'ArEa' is the same as 'aReA'
-
-    string lowered_str;
-    for(unsigned int i = 0; i < strlen(str.c_str()); i++)
-    {
-        lowered_str += tolower(char((str.c_str())[i]));
-    }
-
-    //printf("got called with %s. Converted to %s\n", str.c_str(), lowered_str.c_str());
-    for(int i = 0; i < NUM_KEYWORDS; i++)
-    {
-        if(lowered_str == SgToken::ROSE_Fortran_keyword_map[i].token_lexeme)
-        {
-            return (SgToken::ROSE_Fortran_keyword_map[i].token_id);
-        }
-    }
-    return -1;
-}
-
-//We know that this is a magic number. 
-//It will be fixed.
-#define NUM_OPERATORS 23
-
-#if 0
-static int identify_operator_matching(string str)
-{
-    //printf("got called with %s. \n", str.c_str());
-
-    for(int i = 0; i < NUM_OPERATORS; i++)
-    {
-        if(str == ROSE_Fortran_Operator_map[i].token_lexeme)
-        {
-            return (ROSE_Fortran_Operator_map[i].token_id);
-        }
-    }
-    return -1;
-}
-#endif
-
-static void process_operator(string op) 
-{
-
-}
-
-
-//This could be handled in a fashion better than a MACRO, but for now this will work
-/*
-#define process_operator(op) {  \
-    token_element *p_tok_elem = new token_element;  \
-    p_tok_elem->token_lexeme = Rose_Fortran_fixed_format_text; \
-    int rr = identify_if_keyword(Rose_Fortran_fixed_format_text); \
-    stream_element *p_se = new stream_element;  \
-    p_se->p_tok_elem = p_tok_elem; \
-    p_se->beginning_fpi.line_num = line_no; \
-    p_se->beginning_fpi.column_num = column_no; \
-    column_no+=strlen(Rose_Fortran_fixed_format_text); \
-    p_se->ending_fpi.line_num = line_no; \
-    p_se->ending_fpi.column_num = column_no-1; \
-    ROSE_Fortran_fixed_format_token_stream.push_back(p_se);  \
-} \
-
-*/
-
-static void process_operator(string op);
-
-#define YY_NO_UNPUT
-
-// static int i = 0;
-static std::string currentBuffer;
-
-// DQ (4/19/2006):
-// Store the name of the current file so that we can generate Sg_File_Info objects
-// for each comment.  Later we might want starting and ending fileInfo for each 
-// comments and CPP directive.
-static std::string globalFileName;
-
-#define FORTRAN_LEXICAL_SUPPORT 0
-
-//struct matching_construct
-// static int braces_no=0;
-// static int brace_counting_on=0;
-
-// static int topbracestack();
-// static void pushbracestack(int);
-// static int popbracestack();
-// static bool isemptystack();
-
-// static int num_of_newlines(char*);
-// static int adjust_new_line_counter();
-
-using namespace std;
-
-
-
-#line 774 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.C"
-
-#define INITIAL 0
-#define NORMAL 1
-#define FORT_COMMENT 2
-#define STRING_LIT 3
-#define MACRO 4
-#define REST_OF_LINE 5
-
-#ifndef YY_NO_UNISTD_H
-/* Special case for "unistd.h", since it is non-ANSI. We include it way
- * down here because we want the user's section 1 to have been scanned first.
- * The user has a chance to override it with an option.
- */
-#include <unistd.h>
-#endif
-
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
-#endif
-
-static int yy_init_globals (void );
-
-/* Accessor methods to globals.
-   These are made visible to non-reentrant scanners for convenience. */
-
-int Rose_Fortran_fixed_format_lex_destroy (void );
-
-int Rose_Fortran_fixed_format_get_debug (void );
-
-void Rose_Fortran_fixed_format_set_debug (int debug_flag  );
-
-YY_EXTRA_TYPE Rose_Fortran_fixed_format_get_extra (void );
-
-void Rose_Fortran_fixed_format_set_extra (YY_EXTRA_TYPE user_defined  );
-
-FILE *Rose_Fortran_fixed_format_get_in (void );
-
-void Rose_Fortran_fixed_format_set_in  (FILE * in_str  );
-
-FILE *Rose_Fortran_fixed_format_get_out (void );
-
-void Rose_Fortran_fixed_format_set_out  (FILE * out_str  );
-
-int Rose_Fortran_fixed_format_get_leng (void );
-
-char *Rose_Fortran_fixed_format_get_text (void );
-
-int Rose_Fortran_fixed_format_get_lineno (void );
-
-void Rose_Fortran_fixed_format_set_lineno (int line_number  );
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int Rose_Fortran_fixed_format_wrap (void );
-#else
-extern int Rose_Fortran_fixed_format_wrap (void );
-#endif
-#endif
-
-    static void yyunput (int c,char *buf_ptr  );
-    
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
-#endif
-
-#ifndef YY_NO_INPUT
-
-#ifdef __cplusplus
-static int yyinput (void );
-#else
-static int input (void );
-#endif
-
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO fwrite( Rose_Fortran_fixed_format_text, Rose_Fortran_fixed_format_leng, 1, Rose_Fortran_fixed_format_out )
-#endif
-
-/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
-		{ \
-		int c = '*'; \
-		int n; \
-		for ( n = 0; n < max_size && \
-			     (c = getc( Rose_Fortran_fixed_format_in )) != EOF && c != '\n'; ++n ) \
-			buf[n] = (char) c; \
-		if ( c == '\n' ) \
-			buf[n++] = (char) c; \
-		if ( c == EOF && ferror( Rose_Fortran_fixed_format_in ) ) \
-			YY_FATAL_ERROR( "input in flex scanner failed" ); \
-		result = n; \
-		} \
-	else \
-		{ \
-		errno=0; \
-		while ( (result = fread(buf, 1, max_size, Rose_Fortran_fixed_format_in))==0 && ferror(Rose_Fortran_fixed_format_in)) \
-			{ \
-			if( errno != EINTR) \
-				{ \
-				YY_FATAL_ERROR( "input in flex scanner failed" ); \
-				break; \
-				} \
-			errno=0; \
-			clearerr(Rose_Fortran_fixed_format_in); \
-			} \
-		}\
-\
-
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* end tables serialization structures and prototypes */
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-
-extern int Rose_Fortran_fixed_format_lex (void);
-
-#define YY_DECL int Rose_Fortran_fixed_format_lex (void)
-#endif /* !YY_DECL */
-
-/* Code executed at the beginning of each rule, after Rose_Fortran_fixed_format_text and Rose_Fortran_fixed_format_leng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
-	if ( Rose_Fortran_fixed_format_leng > 0 ) \
-		YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
-				(Rose_Fortran_fixed_format_text[Rose_Fortran_fixed_format_leng - 1] == '\n'); \
-	YY_USER_ACTION
-
-/** The main scanner function which does all the work.
- */
-YY_DECL
-{
-	register yy_state_type yy_current_state;
-	register char *yy_cp, *yy_bp;
-	register int yy_act;
-    
-#line 242 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-
-
-
-#undef Rose_Fortran_Fixed_Format_wrap
-          int line_no = 1;
-          int start_line_no = line_no;
-          int column_no = 1;
-          int start_column_no = column_no;
-          BEGIN NORMAL;
-
-#line 975 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.C"
-
-	if ( !(yy_init) )
-		{
-		(yy_init) = 1;
-
-#ifdef YY_USER_INIT
-		YY_USER_INIT;
-#endif
-
-		if ( ! (yy_start) )
-			(yy_start) = 1;	/* first start state */
-
-		if ( ! Rose_Fortran_fixed_format_in )
-			Rose_Fortran_fixed_format_in = stdin;
-
-		if ( ! Rose_Fortran_fixed_format_out )
-			Rose_Fortran_fixed_format_out = stdout;
-
-		if ( ! YY_CURRENT_BUFFER ) {
-			Rose_Fortran_fixed_format_ensure_buffer_stack ();
-			YY_CURRENT_BUFFER_LVALUE =
-				Rose_Fortran_fixed_format__create_buffer(Rose_Fortran_fixed_format_in,YY_BUF_SIZE );
-		}
-
-		Rose_Fortran_fixed_format__load_buffer_state( );
-		}
-
-	while ( 1 )		/* loops until end-of-file is reached */
-		{
-		yy_cp = (yy_c_buf_p);
-
-		/* Support of Rose_Fortran_fixed_format_text. */
-		*yy_cp = (yy_hold_char);
-
-		/* yy_bp points to the position in yy_ch_buf of the start of
-		 * the current run.
-		 */
-		yy_bp = yy_cp;
-
-		yy_current_state = (yy_start);
-		yy_current_state += YY_AT_BOL();
-yy_match:
-		do
-			{
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
-			if ( yy_accept[yy_current_state] )
-				{
-				(yy_last_accepting_state) = yy_current_state;
-				(yy_last_accepting_cpos) = yy_cp;
-				}
-			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-				{
-				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 97 )
-					yy_c = yy_meta[(unsigned int) yy_c];
-				}
-			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-			++yy_cp;
-			}
-		while ( yy_base[yy_current_state] != 150 );
-
-yy_find_action:
-		yy_act = yy_accept[yy_current_state];
-		if ( yy_act == 0 )
-			{ /* have to back up */
-			yy_cp = (yy_last_accepting_cpos);
-			yy_current_state = (yy_last_accepting_state);
-			yy_act = yy_accept[yy_current_state];
-			}
-
-		YY_DO_BEFORE_ACTION;
-
-do_action:	/* This label is used only to access EOF actions. */
-
-		switch ( yy_act )
-	{ /* beginning of action switch */
-			case 0: /* must back up */
-			/* undo the effects of YY_DO_BEFORE_ACTION */
-			*yy_cp = (yy_hold_char);
-			yy_cp = (yy_last_accepting_cpos);
-			yy_current_state = (yy_last_accepting_state);
-			goto yy_find_action;
-
-case 1:
-/* rule 1 can match eol */
-YY_RULE_SETUP
-#line 252 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{
-                    start_line_no=line_no; 
-                    start_column_no=column_no; 
-                    curr_beginning.line_num = line_no;
-                    curr_beginning.column_num = column_no;
-                    column_no+=1; 
-                    currentBuffer = Rose_Fortran_fixed_format_text; 
-                 // printf("The comment string is as follows: %s\n", Rose_Fortran_fixed_format_text);
-                 // BEGIN FORT_COMMENT; 
-               }
-	YY_BREAK
-case 2:
-/* rule 2 can match eol */
-YY_RULE_SETUP
-#line 262 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{
-                    start_line_no=line_no; 
-                    start_column_no=column_no; 
-                    curr_beginning.line_num = line_no;
-                    curr_beginning.column_num = column_no;
-                    column_no+=1; 
-                    currentBuffer = Rose_Fortran_fixed_format_text; 
-                 // printf("The non comment line is %s\n", Rose_Fortran_fixed_format_text);
-                    BEGIN REST_OF_LINE;
-                 // BEGIN FORT_COMMENT; 
-               }
-	YY_BREAK
-/*
-<REST_OF_LINE>"!"    {
-                    start_line_no=line_no; 
-                    start_column_no=column_no; 
-                    curr_beginning.line_num = line_no;
-                    curr_beginning.column_num = column_no;
-                    column_no+=1; 
-                    currentBuffer = Rose_Fortran_fixed_format_text; 
-                    BEGIN FORT_COMMENT; 
-               }
-<REST_OF_LINE>"'"    {
-                    //This begins a STRING LITERAL
-                    start_line_no=line_no; 
-                    start_column_no=column_no; 
-                    curr_beginning.line_num = line_no;
-                    curr_beginning.column_num = column_no;
-                    column_no+=1; 
-                    currentBuffer = Rose_Fortran_fixed_format_text; 
-                    BEGIN STRING_LIT;
-               }
-<REST_OF_LINE>\n                     { printf("in REST_OF_LINE\n"); line_no++; column_no=1; BEGIN NORMAL; } 
-                                    */
-case 3:
-YY_RULE_SETUP
-#line 295 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{ 
-                                          
-                                          token_element *p_tok_elem = new token_element; 
-                                          p_tok_elem->token_lexeme = Rose_Fortran_fixed_format_text; 
-
-                                          int is_keyword = identify_if_keyword(Rose_Fortran_fixed_format_text); 
-                                          //found a keyword?
-                                          if(is_keyword != -1)
-                                          {
-                                              //printf("%s is a keyword\n", Rose_Fortran_fixed_format_text); 
-                                              p_tok_elem->token_id = is_keyword; 
-                                          }
-                                          else
-                                          {
-                                              //printf("%s is not a keyword\n", Rose_Fortran_fixed_format_text); 
-                                              p_tok_elem->token_id = SgToken::FORTRAN_IDENTIFIER;
-                                          }
-                                          
-                                          stream_element *p_se = new stream_element; 
-                                          p_se->p_tok_elem = p_tok_elem; 
-                                          
-                                          p_se->beginning_fpi.line_num = line_no;
-                                          p_se->beginning_fpi.column_num = column_no;
-                                          column_no+=strlen(Rose_Fortran_fixed_format_text); 
-                                          p_se->ending_fpi.line_num = line_no; 
-                                          p_se->ending_fpi.column_num = column_no-1; 
-                                          //push the element onto the token stream
-                                          ROSE_Fortran_fixed_format_token_stream_pointer->push_back(p_se); 
-                                    }
-	YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 324 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 325 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 326 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 327 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 328 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 329 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 330 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 331 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 332 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 333 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 334 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 335 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 336 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 337 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 338 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 339 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 340 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 341 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 342 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 343 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 344 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 345 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 346 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 347 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);} 
-	YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 348 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{process_operator(Rose_Fortran_fixed_format_text);column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 349 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{//Do stuff to store semi colons
-                          //process_operator(Rose_Fortran_fixed_format_text);
-                           column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 352 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{//Do stuff to store commas
-                          //process_operator(Rose_Fortran_fixed_format_text);
-                           column_no+=strlen(Rose_Fortran_fixed_format_text);}
-	YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 355 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{//Do stuff to store colons
-                           //process_operator(Rose_Fortran_fixed_format_text);
-                           column_no+=strlen(Rose_Fortran_fixed_format_text);
-}
-	YY_BREAK
-case 32:
-/* rule 32 can match eol */
-YY_RULE_SETUP
-#line 359 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{
-                                       //According to the STD, a line which has whitespaces is a comment line
-                                       //We will store it
-                                       printf("came across a blank line\n");
-                                       currentBuffer += Rose_Fortran_fixed_format_text;
-
-                                       token_element *p_tok_elem = new token_element;
-                                       p_tok_elem->token_lexeme = currentBuffer;
-                                       p_tok_elem->token_id = SgToken::FORTRAN_COMMENTS;
-           
-                                       stream_element *p_se = new stream_element;
-                                       p_se->p_tok_elem = p_tok_elem;
-
-                                       p_se->beginning_fpi.line_num = line_no; 
-                                       p_se->beginning_fpi.column_num = column_no;
-
-                                       p_se->ending_fpi.line_num = line_no;
-                                       p_se->ending_fpi.column_num = column_no;
-                                       ROSE_Fortran_fixed_format_token_stream_pointer->push_back(p_se);
-
-                                       line_no++; column_no=1;
-                                  }
-	YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 381 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{
-                        // printf("in <normal>.\n");
-                           column_no++;
-}
-	YY_BREAK
-/*
-<STRING_LIT>[^']        {
-                            column_no++; 
-                            currentBuffer += Rose_Fortran_fixed_format_text;
-                        }
-<STRING_LIT>''          {
-                            printf("Fixed format\n");
-                            column_no+=2; 
-                            currentBuffer += Rose_Fortran_fixed_format_text;
-                        }
-<STRING_LIT>"'"         { 
-                            //This ends the STRING LITERALS
-                            currentBuffer += Rose_Fortran_fixed_format_text;
-                            //printf("\nthe literal string is %s\n", currentBuffer.c_str());
-                            //printf("ending in (%d, %d) \n", line_no, column_no);
-
-                            adjust_new_line_counter();
-
-                            token_element *p_tok_elem = new token_element;
-                            p_tok_elem->token_lexeme = currentBuffer;
-                            p_tok_elem->token_id = SgToken::FORTRAN_STRING_LITERALS;
-
-                            stream_element *p_se = new stream_element;
-                            p_se->p_tok_elem = p_tok_elem;
-
-                            p_se->beginning_fpi = curr_beginning;
-                            p_se->ending_fpi.line_num = line_no;
-                            p_se->ending_fpi.column_num = column_no;
-
-                            ROSE_Fortran_fixed_format_token_stream.push_back(p_se);
-
-                            column_no++; 
-                            BEGIN NORMAL;
-                       }
-                      */
-case 34:
-/* rule 34 can match eol */
-YY_RULE_SETUP
-#line 421 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{ 
-                            //This is also a comment
-                            currentBuffer += Rose_Fortran_fixed_format_text;
-                            //printf("this ends the comment string is %s", currentBuffer.c_str());
-
-                            /* This was commented out by Rama, as it should be, since it does not work...
-                            token_element *p_tok_elem = new token_element;
-                            p_tok_elem->token_lexeme = currentBuffer;
-                            p_tok_elem->token_id = SgToken::FORTRAN_COMMENTS;
-
-                            stream_element *p_se = new stream_element;
-                            p_se->p_tok_elem = p_tok_elem;
-                            p_se->beginning_fpi = curr_beginning;
-                            p_se->ending_fpi.line_num = line_no;
-                            p_se->ending_fpi.column_num = column_no;
-                            ROSE_Fortran_fixed_format_token_stream_pointer->push_back(p_se);
-                            This was comment out by Rama */
-
-                            line_no++; column_no=1; 
-                            BEGIN NORMAL;
-                      }
-	YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 442 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-{ 
-                            column_no++; 
-                            currentBuffer += Rose_Fortran_fixed_format_text;
-                      }
-	YY_BREAK
-case 36:
-YY_RULE_SETUP
-#line 446 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-ECHO;
-	YY_BREAK
-#line 1401 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.C"
-case YY_STATE_EOF(INITIAL):
-case YY_STATE_EOF(NORMAL):
-case YY_STATE_EOF(FORT_COMMENT):
-case YY_STATE_EOF(STRING_LIT):
-case YY_STATE_EOF(MACRO):
-case YY_STATE_EOF(REST_OF_LINE):
-	yyterminate();
-
-	case YY_END_OF_BUFFER:
-		{
-		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
-
-		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = (yy_hold_char);
-		YY_RESTORE_YY_MORE_OFFSET
-
-		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
-			{
-			/* We're scanning a new file or input source.  It's
-			 * possible that this happened because the user
-			 * just pointed Rose_Fortran_fixed_format_in at a new source and called
-			 * Rose_Fortran_fixed_format_lex().  If so, then we have to assure
-			 * consistency between YY_CURRENT_BUFFER and our
-			 * globals.  Here is the right place to do so, because
-			 * this is the first action (other than possibly a
-			 * back-up) that will match for the new input source.
-			 */
-			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-			YY_CURRENT_BUFFER_LVALUE->yy_input_file = Rose_Fortran_fixed_format_in;
-			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
-			}
-
-		/* Note that here we test for yy_c_buf_p "<=" to the position
-		 * of the first EOB in the buffer, since yy_c_buf_p will
-		 * already have been incremented past the NUL character
-		 * (since all states make transitions on EOB to the
-		 * end-of-buffer state).  Contrast this with the test
-		 * in input().
-		 */
-		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
-			{ /* This was really a NUL. */
-			yy_state_type yy_next_state;
-
-			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
-
-			yy_current_state = yy_get_previous_state(  );
-
-			/* Okay, we're now positioned to make the NUL
-			 * transition.  We couldn't have
-			 * yy_get_previous_state() go ahead and do it
-			 * for us because it doesn't know how to deal
-			 * with the possibility of jamming (and we don't
-			 * want to build jamming into it because then it
-			 * will run more slowly).
-			 */
-
-			yy_next_state = yy_try_NUL_trans( yy_current_state );
-
-			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
-
-			if ( yy_next_state )
-				{
-				/* Consume the NUL. */
-				yy_cp = ++(yy_c_buf_p);
-				yy_current_state = yy_next_state;
-				goto yy_match;
-				}
-
-			else
-				{
-				yy_cp = (yy_c_buf_p);
-				goto yy_find_action;
-				}
-			}
-
-		else switch ( yy_get_next_buffer(  ) )
-			{
-			case EOB_ACT_END_OF_FILE:
-				{
-				(yy_did_buffer_switch_on_eof) = 0;
-
-				if ( Rose_Fortran_fixed_format_wrap( ) )
-					{
-					/* Note: because we've taken care in
-					 * yy_get_next_buffer() to have set up
-					 * Rose_Fortran_fixed_format_text, we can now set up
-					 * yy_c_buf_p so that if some total
-					 * hoser (like flex itself) wants to
-					 * call the scanner after we return the
-					 * YY_NULL, it'll still work - another
-					 * YY_NULL will get returned.
-					 */
-					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
-
-					yy_act = YY_STATE_EOF(YY_START);
-					goto do_action;
-					}
-
-				else
-					{
-					if ( ! (yy_did_buffer_switch_on_eof) )
-						YY_NEW_FILE;
-					}
-				break;
-				}
-
-			case EOB_ACT_CONTINUE_SCAN:
-				(yy_c_buf_p) =
-					(yytext_ptr) + yy_amount_of_matched_text;
-
-				yy_current_state = yy_get_previous_state(  );
-
-				yy_cp = (yy_c_buf_p);
-				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
-				goto yy_match;
-
-			case EOB_ACT_LAST_MATCH:
-				(yy_c_buf_p) =
-				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
-
-				yy_current_state = yy_get_previous_state(  );
-
-				yy_cp = (yy_c_buf_p);
-				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
-				goto yy_find_action;
-			}
-		break;
-		}
-
-	default:
-		YY_FATAL_ERROR(
-			"fatal flex scanner internal error--no action found" );
-	} /* end of action switch */
-		} /* end of scanning one token */
-} /* end of Rose_Fortran_fixed_format_lex */
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- *	EOB_ACT_LAST_MATCH -
- *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- *	EOB_ACT_END_OF_FILE - end of file
- */
-static int yy_get_next_buffer (void)
-{
-    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
-	register char *source = (yytext_ptr);
-	register int number_to_move, i;
-	int ret_val;
-
-	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
-		YY_FATAL_ERROR(
-		"fatal flex scanner internal error--end of buffer missed" );
-
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
-		{ /* Don't try to fill the buffer, so this is an EOF. */
-		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
-			{
-			/* We matched a single character, the EOB, so
-			 * treat this as a final EOF.
-			 */
-			return EOB_ACT_END_OF_FILE;
-			}
-
-		else
-			{
-			/* We matched some text prior to the EOB, first
-			 * process it.
-			 */
-			return EOB_ACT_LAST_MATCH;
-			}
-		}
-
-	/* Try to read more data. */
-
-	/* First move last chars to start of buffer. */
-	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
-
-	for ( i = 0; i < number_to_move; ++i )
-		*(dest++) = *(source++);
-
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
-		/* don't do the read, it's not guaranteed to return an EOF,
-		 * just force an EOF
-		 */
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
-
-	else
-		{
-			int num_to_read =
-			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
-
-		while ( num_to_read <= 0 )
-			{ /* Not enough room in the buffer - grow it. */
-
-			/* just a shorter name for the current buffer */
-			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
-
-			int yy_c_buf_p_offset =
-				(int) ((yy_c_buf_p) - b->yy_ch_buf);
-
-			if ( b->yy_is_our_buffer )
-				{
-				int new_size = b->yy_buf_size * 2;
-
-				if ( new_size <= 0 )
-					b->yy_buf_size += b->yy_buf_size / 8;
-				else
-					b->yy_buf_size *= 2;
-
-				b->yy_ch_buf = (char *)
-					/* Include room in for 2 EOB chars. */
-					Rose_Fortran_fixed_format_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
-				}
-			else
-				/* Can't grow it, we don't own it. */
-				b->yy_ch_buf = 0;
-
-			if ( ! b->yy_ch_buf )
-				YY_FATAL_ERROR(
-				"fatal error - scanner input buffer overflow" );
-
-			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
-
-			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
-						number_to_move - 1;
-
-			}
-
-		if ( num_to_read > YY_READ_BUF_SIZE )
-			num_to_read = YY_READ_BUF_SIZE;
-
-		/* Read in more data. */
-		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
-			(yy_n_chars), (size_t) num_to_read );
-
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
-		}
-
-	if ( (yy_n_chars) == 0 )
-		{
-		if ( number_to_move == YY_MORE_ADJ )
-			{
-			ret_val = EOB_ACT_END_OF_FILE;
-			Rose_Fortran_fixed_format_restart(Rose_Fortran_fixed_format_in  );
-			}
-
-		else
-			{
-			ret_val = EOB_ACT_LAST_MATCH;
-			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
-				YY_BUFFER_EOF_PENDING;
-			}
-		}
-
-	else
-		ret_val = EOB_ACT_CONTINUE_SCAN;
-
-	if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
-		/* Extend the array by 50%, plus the number we really need. */
-		yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
-		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) Rose_Fortran_fixed_format_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
-		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
-			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
-	}
-
-	(yy_n_chars) += number_to_move;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
-
-	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
-
-	return ret_val;
-}
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-    static yy_state_type yy_get_previous_state (void)
-{
-	register yy_state_type yy_current_state;
-	register char *yy_cp;
-    
-	yy_current_state = (yy_start);
-	yy_current_state += YY_AT_BOL();
-
-	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
-		{
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
-		if ( yy_accept[yy_current_state] )
-			{
-			(yy_last_accepting_state) = yy_current_state;
-			(yy_last_accepting_cpos) = yy_cp;
-			}
-		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-			{
-			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 97 )
-				yy_c = yy_meta[(unsigned int) yy_c];
-			}
-		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-		}
-
-	return yy_current_state;
-}
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- *	next_state = yy_try_NUL_trans( current_state );
- */
-    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
-{
-	register int yy_is_jam;
-    	register char *yy_cp = (yy_c_buf_p);
-
-	register YY_CHAR yy_c = 1;
-	if ( yy_accept[yy_current_state] )
-		{
-		(yy_last_accepting_state) = yy_current_state;
-		(yy_last_accepting_cpos) = yy_cp;
-		}
-	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-		{
-		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 97 )
-			yy_c = yy_meta[(unsigned int) yy_c];
-		}
-	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 96);
-
-	return yy_is_jam ? 0 : yy_current_state;
-}
-
-    static void yyunput (int c, register char * yy_bp )
-{
-	register char *yy_cp;
-    
-    yy_cp = (yy_c_buf_p);
-
-	/* undo effects of setting up Rose_Fortran_fixed_format_text */
-	*yy_cp = (yy_hold_char);
-
-	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
-		{ /* need to shift things up to make room */
-		/* +2 for EOB chars. */
-		register int number_to_move = (yy_n_chars) + 2;
-		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
-					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
-		register char *source =
-				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
-
-		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
-			*--dest = *--source;
-
-		yy_cp += (int) (dest - source);
-		yy_bp += (int) (dest - source);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
-			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
-
-		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
-			YY_FATAL_ERROR( "flex scanner push-back overflow" );
-		}
-
-	*--yy_cp = (char) c;
-
-	(yytext_ptr) = yy_bp;
-	(yy_hold_char) = *yy_cp;
-	(yy_c_buf_p) = yy_cp;
-}
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-    static int yyinput (void)
-#else
-    static int input  (void)
-#endif
-
-{
-	int c;
-    
-	*(yy_c_buf_p) = (yy_hold_char);
-
-	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
-		{
-		/* yy_c_buf_p now points to the character we want to return.
-		 * If this occurs *before* the EOB characters, then it's a
-		 * valid NUL; if not, then we've hit the end of the buffer.
-		 */
-		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
-			/* This was really a NUL. */
-			*(yy_c_buf_p) = '\0';
-
-		else
-			{ /* need more input */
-			int offset = (yy_c_buf_p) - (yytext_ptr);
-			++(yy_c_buf_p);
-
-			switch ( yy_get_next_buffer(  ) )
-				{
-				case EOB_ACT_LAST_MATCH:
-					/* This happens because yy_g_n_b()
-					 * sees that we've accumulated a
-					 * token and flags that we need to
-					 * try matching the token before
-					 * proceeding.  But for input(),
-					 * there's no matching to consider.
-					 * So convert the EOB_ACT_LAST_MATCH
-					 * to EOB_ACT_END_OF_FILE.
-					 */
-
-					/* Reset buffer status. */
-					Rose_Fortran_fixed_format_restart(Rose_Fortran_fixed_format_in );
-
-					/*FALLTHROUGH*/
-
-				case EOB_ACT_END_OF_FILE:
-					{
-					if ( Rose_Fortran_fixed_format_wrap( ) )
-						return EOF;
-
-					if ( ! (yy_did_buffer_switch_on_eof) )
-						YY_NEW_FILE;
-#ifdef __cplusplus
-					return yyinput();
-#else
-					return input();
-#endif
-					}
-
-				case EOB_ACT_CONTINUE_SCAN:
-					(yy_c_buf_p) = (yytext_ptr) + offset;
-					break;
-				}
-			}
-		}
-
-	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
-	*(yy_c_buf_p) = '\0';	/* preserve Rose_Fortran_fixed_format_text */
-	(yy_hold_char) = *++(yy_c_buf_p);
-
-	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
-
-	return c;
-}
-#endif	/* ifndef YY_NO_INPUT */
-
-/** Immediately switch to a different input stream.
- * @param input_file A readable stream.
- * 
- * @note This function does not reset the start condition to @c INITIAL .
- */
-    void Rose_Fortran_fixed_format_restart  (FILE * input_file )
-{
-    
-	if ( ! YY_CURRENT_BUFFER ){
-        Rose_Fortran_fixed_format_ensure_buffer_stack ();
-		YY_CURRENT_BUFFER_LVALUE =
-            Rose_Fortran_fixed_format__create_buffer(Rose_Fortran_fixed_format_in,YY_BUF_SIZE );
-	}
-
-	Rose_Fortran_fixed_format__init_buffer(YY_CURRENT_BUFFER,input_file );
-	Rose_Fortran_fixed_format__load_buffer_state( );
-}
-
-/** Switch to a different input buffer.
- * @param new_buffer The new input buffer.
- * 
- */
-    void Rose_Fortran_fixed_format__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
-{
-    
-	/* TODO. We should be able to replace this entire function body
-	 * with
-	 *		Rose_Fortran_fixed_format_pop_buffer_state();
-	 *		Rose_Fortran_fixed_format_push_buffer_state(new_buffer);
-     */
-	Rose_Fortran_fixed_format_ensure_buffer_stack ();
-	if ( YY_CURRENT_BUFFER == new_buffer )
-		return;
-
-	if ( YY_CURRENT_BUFFER )
-		{
-		/* Flush out information for old buffer. */
-		*(yy_c_buf_p) = (yy_hold_char);
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
-		}
-
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-	Rose_Fortran_fixed_format__load_buffer_state( );
-
-	/* We don't actually know whether we did this switch during
-	 * EOF (Rose_Fortran_fixed_format_wrap()) processing, but the only time this flag
-	 * is looked at is after Rose_Fortran_fixed_format_wrap() is called, so it's safe
-	 * to go ahead and always set it.
-	 */
-	(yy_did_buffer_switch_on_eof) = 1;
-}
-
-static void Rose_Fortran_fixed_format__load_buffer_state  (void)
-{
-    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
-	Rose_Fortran_fixed_format_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
-	(yy_hold_char) = *(yy_c_buf_p);
-}
-
-/** Allocate and initialize an input buffer state.
- * @param file A readable stream.
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- * 
- * @return the allocated buffer state.
- */
-    YY_BUFFER_STATE Rose_Fortran_fixed_format__create_buffer  (FILE * file, int  size )
-{
-	YY_BUFFER_STATE b;
-    
-	b = (YY_BUFFER_STATE) Rose_Fortran_fixed_format_alloc(sizeof( struct yy_buffer_state )  );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in Rose_Fortran_fixed_format__create_buffer()" );
-
-	b->yy_buf_size = size;
-
-	/* yy_ch_buf has to be 2 characters longer than the size given because
-	 * we need to put in 2 end-of-buffer characters.
-	 */
-	b->yy_ch_buf = (char *) Rose_Fortran_fixed_format_alloc(b->yy_buf_size + 2  );
-	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in Rose_Fortran_fixed_format__create_buffer()" );
-
-	b->yy_is_our_buffer = 1;
-
-	Rose_Fortran_fixed_format__init_buffer(b,file );
-
-	return b;
-}
-
-/** Destroy the buffer.
- * @param b a buffer created with Rose_Fortran_fixed_format__create_buffer()
- * 
- */
-    void Rose_Fortran_fixed_format__delete_buffer (YY_BUFFER_STATE  b )
-{
-    
-	if ( ! b )
-		return;
-
-	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
-		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
-
-	if ( b->yy_is_our_buffer )
-		Rose_Fortran_fixed_format_free((void *) b->yy_ch_buf  );
-
-	Rose_Fortran_fixed_format_free((void *) b  );
-}
-
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-    
-/* Initializes or reinitializes a buffer.
- * This function is sometimes called more than once on the same buffer,
- * such as during a Rose_Fortran_fixed_format_restart() or at EOF.
- */
-    static void Rose_Fortran_fixed_format__init_buffer  (YY_BUFFER_STATE  b, FILE * file )
-
-{
-	int oerrno = errno;
-    
-	Rose_Fortran_fixed_format__flush_buffer(b );
-
-	b->yy_input_file = file;
-	b->yy_fill_buffer = 1;
-
-    /* If b is the current buffer, then Rose_Fortran_fixed_format__init_buffer was _probably_
-     * called from Rose_Fortran_fixed_format_restart() or through yy_get_next_buffer.
-     * In that case, we don't want to reset the lineno or column.
-     */
-    if (b != YY_CURRENT_BUFFER){
-        b->yy_bs_lineno = 1;
-        b->yy_bs_column = 0;
-    }
-
-        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-    
-	errno = oerrno;
-}
-
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- * 
- */
-    void Rose_Fortran_fixed_format__flush_buffer (YY_BUFFER_STATE  b )
-{
-    	if ( ! b )
-		return;
-
-	b->yy_n_chars = 0;
-
-	/* We always need two end-of-buffer characters.  The first causes
-	 * a transition to the end-of-buffer state.  The second causes
-	 * a jam in that state.
-	 */
-	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
-	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
-	b->yy_buf_pos = &b->yy_ch_buf[0];
-
-	b->yy_at_bol = 1;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	if ( b == YY_CURRENT_BUFFER )
-		Rose_Fortran_fixed_format__load_buffer_state( );
-}
-
-/** Pushes the new state onto the stack. The new state becomes
- *  the current state. This function will allocate the stack
- *  if necessary.
- *  @param new_buffer The new state.
- *  
- */
-void Rose_Fortran_fixed_format_push_buffer_state (YY_BUFFER_STATE new_buffer )
-{
-    	if (new_buffer == NULL)
-		return;
-
-	Rose_Fortran_fixed_format_ensure_buffer_stack();
-
-	/* This block is copied from Rose_Fortran_fixed_format__switch_to_buffer. */
-	if ( YY_CURRENT_BUFFER )
-		{
-		/* Flush out information for old buffer. */
-		*(yy_c_buf_p) = (yy_hold_char);
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
-		}
-
-	/* Only push if top exists. Otherwise, replace top. */
-	if (YY_CURRENT_BUFFER)
-		(yy_buffer_stack_top)++;
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-
-	/* copied from Rose_Fortran_fixed_format__switch_to_buffer. */
-	Rose_Fortran_fixed_format__load_buffer_state( );
-	(yy_did_buffer_switch_on_eof) = 1;
-}
-
-/** Removes and deletes the top of the stack, if present.
- *  The next element becomes the new top.
- *  
- */
-void Rose_Fortran_fixed_format_pop_buffer_state (void)
-{
-    	if (!YY_CURRENT_BUFFER)
-		return;
-
-	Rose_Fortran_fixed_format__delete_buffer(YY_CURRENT_BUFFER );
-	YY_CURRENT_BUFFER_LVALUE = NULL;
-	if ((yy_buffer_stack_top) > 0)
-		--(yy_buffer_stack_top);
-
-	if (YY_CURRENT_BUFFER) {
-		Rose_Fortran_fixed_format__load_buffer_state( );
-		(yy_did_buffer_switch_on_eof) = 1;
-	}
-}
-
-/* Allocates the stack if it does not exist.
- *  Guarantees space for at least one push.
- */
-static void Rose_Fortran_fixed_format_ensure_buffer_stack (void)
-{
-	int num_to_alloc;
-    
-	if (!(yy_buffer_stack)) {
-
-		/* First allocation is just for 2 elements, since we don't know if this
-		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
-		 * immediate realloc on the next call.
-         */
-		num_to_alloc = 1;
-		(yy_buffer_stack) = (struct yy_buffer_state**)Rose_Fortran_fixed_format_alloc
-								(num_to_alloc * sizeof(struct yy_buffer_state*)
-								);
-		if ( ! (yy_buffer_stack) )
-			YY_FATAL_ERROR( "out of dynamic memory in Rose_Fortran_fixed_format_ensure_buffer_stack()" );
-								  
-		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-				
-		(yy_buffer_stack_max) = num_to_alloc;
-		(yy_buffer_stack_top) = 0;
-		return;
-	}
-
-	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
-
-		/* Increase the buffer to prepare for a possible push. */
-		int grow_size = 8 /* arbitrary grow size */;
-
-		num_to_alloc = (yy_buffer_stack_max) + grow_size;
-		(yy_buffer_stack) = (struct yy_buffer_state**)Rose_Fortran_fixed_format_realloc
-								((yy_buffer_stack),
-								num_to_alloc * sizeof(struct yy_buffer_state*)
-								);
-		if ( ! (yy_buffer_stack) )
-			YY_FATAL_ERROR( "out of dynamic memory in Rose_Fortran_fixed_format_ensure_buffer_stack()" );
-
-		/* zero only the new slots.*/
-		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
-		(yy_buffer_stack_max) = num_to_alloc;
-	}
-}
-
-/** Setup the input buffer state to scan directly from a user-specified character buffer.
- * @param base the character buffer
- * @param size the size in bytes of the character buffer
- * 
- * @return the newly allocated buffer state object. 
- */
-YY_BUFFER_STATE Rose_Fortran_fixed_format__scan_buffer  (char * base, yy_size_t  size )
-{
-	YY_BUFFER_STATE b;
-    
-	if ( size < 2 ||
-	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
-	     base[size-1] != YY_END_OF_BUFFER_CHAR )
-		/* They forgot to leave room for the EOB's. */
-		return 0;
-
-	b = (YY_BUFFER_STATE) Rose_Fortran_fixed_format_alloc(sizeof( struct yy_buffer_state )  );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in Rose_Fortran_fixed_format__scan_buffer()" );
-
-	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
-	b->yy_buf_pos = b->yy_ch_buf = base;
-	b->yy_is_our_buffer = 0;
-	b->yy_input_file = 0;
-	b->yy_n_chars = b->yy_buf_size;
-	b->yy_is_interactive = 0;
-	b->yy_at_bol = 1;
-	b->yy_fill_buffer = 0;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	Rose_Fortran_fixed_format__switch_to_buffer(b  );
-
-	return b;
-}
-
-/** Setup the input buffer state to scan a string. The next call to Rose_Fortran_fixed_format_lex() will
- * scan from a @e copy of @a str.
- * @param yystr a NUL-terminated string to scan
- * 
- * @return the newly allocated buffer state object.
- * @note If you want to scan bytes that may contain NUL values, then use
- *       Rose_Fortran_fixed_format__scan_bytes() instead.
- */
-YY_BUFFER_STATE Rose_Fortran_fixed_format__scan_string (yyconst char * yystr )
-{
-    
-	return Rose_Fortran_fixed_format__scan_bytes(yystr,strlen(yystr) );
-}
-
-/** Setup the input buffer state to scan the given bytes. The next call to Rose_Fortran_fixed_format_lex() will
- * scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
- * 
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE Rose_Fortran_fixed_format__scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
-{
-	YY_BUFFER_STATE b;
-	char *buf;
-	yy_size_t n;
-	int i;
-    
-	/* Get memory for full buffer, including space for trailing EOB's. */
-	n = _yybytes_len + 2;
-	buf = (char *) Rose_Fortran_fixed_format_alloc(n  );
-	if ( ! buf )
-		YY_FATAL_ERROR( "out of dynamic memory in Rose_Fortran_fixed_format__scan_bytes()" );
-
-	for ( i = 0; i < _yybytes_len; ++i )
-		buf[i] = yybytes[i];
-
-	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
-
-	b = Rose_Fortran_fixed_format__scan_buffer(buf,n );
-	if ( ! b )
-		YY_FATAL_ERROR( "bad buffer in Rose_Fortran_fixed_format__scan_bytes()" );
-
-	/* It's okay to grow etc. this buffer, and we should throw it
-	 * away when we're done.
-	 */
-	b->yy_is_our_buffer = 1;
-
-	return b;
-}
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-static void yy_fatal_error (yyconst char* msg )
-{
-    	(void) fprintf( stderr, "%s\n", msg );
-	exit( YY_EXIT_FAILURE );
-}
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up Rose_Fortran_fixed_format_text. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		Rose_Fortran_fixed_format_text[Rose_Fortran_fixed_format_leng] = (yy_hold_char); \
-		(yy_c_buf_p) = Rose_Fortran_fixed_format_text + yyless_macro_arg; \
-		(yy_hold_char) = *(yy_c_buf_p); \
-		*(yy_c_buf_p) = '\0'; \
-		Rose_Fortran_fixed_format_leng = yyless_macro_arg; \
-		} \
-	while ( 0 )
-
-/* Accessor  methods (get/set functions) to struct members. */
-
-/** Get the current line number.
- * 
- */
-int Rose_Fortran_fixed_format_get_lineno  (void)
-{
-        
-    return Rose_Fortran_fixed_format_lineno;
-}
-
-/** Get the input stream.
- * 
- */
-FILE *Rose_Fortran_fixed_format_get_in  (void)
-{
-        return Rose_Fortran_fixed_format_in;
-}
-
-/** Get the output stream.
- * 
- */
-FILE *Rose_Fortran_fixed_format_get_out  (void)
-{
-        return Rose_Fortran_fixed_format_out;
-}
-
-/** Get the length of the current token.
- * 
- */
-int Rose_Fortran_fixed_format_get_leng  (void)
-{
-        return Rose_Fortran_fixed_format_leng;
-}
-
-/** Get the current token.
- * 
- */
-
-char *Rose_Fortran_fixed_format_get_text  (void)
-{
-        return Rose_Fortran_fixed_format_text;
-}
-
-/** Set the current line number.
- * @param line_number
- * 
- */
-void Rose_Fortran_fixed_format_set_lineno (int  line_number )
-{
-    
-    Rose_Fortran_fixed_format_lineno = line_number;
-}
-
-/** Set the input stream. This does not discard the current
- * input buffer.
- * @param in_str A readable stream.
- * 
- * @see Rose_Fortran_fixed_format__switch_to_buffer
- */
-void Rose_Fortran_fixed_format_set_in (FILE *  in_str )
-{
-        Rose_Fortran_fixed_format_in = in_str ;
-}
-
-void Rose_Fortran_fixed_format_set_out (FILE *  out_str )
-{
-        Rose_Fortran_fixed_format_out = out_str ;
-}
-
-int Rose_Fortran_fixed_format_get_debug  (void)
-{
-        return Rose_Fortran_fixed_format__flex_debug;
-}
-
-void Rose_Fortran_fixed_format_set_debug (int  bdebug )
-{
-        Rose_Fortran_fixed_format__flex_debug = bdebug ;
-}
-
-static int yy_init_globals (void)
-{
-        /* Initialization is the same as for the non-reentrant scanner.
-     * This function is called from Rose_Fortran_fixed_format_lex_destroy(), so don't allocate here.
-     */
-
-    (yy_buffer_stack) = 0;
-    (yy_buffer_stack_top) = 0;
-    (yy_buffer_stack_max) = 0;
-    (yy_c_buf_p) = (char *) 0;
-    (yy_init) = 0;
-    (yy_start) = 0;
-
-/* Defined in main.c */
-#ifdef YY_STDINIT
-    Rose_Fortran_fixed_format_in = stdin;
-    Rose_Fortran_fixed_format_out = stdout;
-#else
-    Rose_Fortran_fixed_format_in = (FILE *) 0;
-    Rose_Fortran_fixed_format_out = (FILE *) 0;
-#endif
-
-    /* For future reference: Set errno on error, since we are called by
-     * Rose_Fortran_fixed_format_lex_init()
-     */
-    return 0;
-}
-
-/* Rose_Fortran_fixed_format_lex_destroy is for both reentrant and non-reentrant scanners. */
-int Rose_Fortran_fixed_format_lex_destroy  (void)
-{
-    
-    /* Pop the buffer stack, destroying each element. */
-	while(YY_CURRENT_BUFFER){
-		Rose_Fortran_fixed_format__delete_buffer(YY_CURRENT_BUFFER  );
-		YY_CURRENT_BUFFER_LVALUE = NULL;
-		Rose_Fortran_fixed_format_pop_buffer_state();
-	}
-
-	/* Destroy the stack itself. */
-	Rose_Fortran_fixed_format_free((yy_buffer_stack) );
-	(yy_buffer_stack) = NULL;
-
-    /* Reset the globals. This is important in a non-reentrant scanner so the next time
-     * Rose_Fortran_fixed_format_lex() is called, initialization will occur. */
-    yy_init_globals( );
-
-    return 0;
-}
-
-/*
- * Internal utility routines.
- */
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
-{
-	register int i;
-	for ( i = 0; i < n; ++i )
-		s1[i] = s2[i];
-}
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
-{
-	register int n;
-	for ( n = 0; s[n]; ++n )
-		;
-
-	return n;
-}
-#endif
-
-void *Rose_Fortran_fixed_format_alloc (yy_size_t  size )
-{
-	return (void *) malloc( size );
-}
-
-void *Rose_Fortran_fixed_format_realloc  (void * ptr, yy_size_t  size )
-{
-	/* The cast to (char *) in the following accommodates both
-	 * implementations that use char* generic pointers, and those
-	 * that use void* generic pointers.  It works with the latter
-	 * because both ANSI C and C++ allow castless assignment from
-	 * any pointer type to void*, and deal with argument conversions
-	 * as though doing an assignment.
-	 */
-	return (void *) realloc( (char *) ptr, size );
-}
-
-void Rose_Fortran_fixed_format_free (void * ptr )
-{
-	free( (char *) ptr );	/* see Rose_Fortran_fixed_format_realloc() for (char *) cast */
-}
-
-#define YYTABLES_NAME "yytables"
-
-#line 446 "../../../../ROSE/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex"
-
-
-
-// static const int maxstacksize=500;
-// static int bracestack[maxstacksize];
-
-// static int top=0;
-// static void pushbracestack(int brace_no) { bracestack[top++]=brace_no; }
-// static int topbracestack() { if(top) return bracestack[top-1]; else return -1; }
-// static int popbracestack() { return bracestack[--top]; }
-// static bool isemptystack() { return top==0; }
-
-#if 0
-static int adjust_new_line_counter()
-{
-    return 1;
-}
-#endif
-#if 0
-static int num_of_newlines(char* s)
-{
-     int num = 0;
-     while(*s != '\0')
-        {
-          if(*s == '\n')
-               num++;
-          s++;
-        }
-     return num;
-}
-#endif
-
-// int getFortranFixedFormatPreprocessorDirectives( std::string fileName )
-LexTokenStreamTypePointer
-getFortranFixedFormatPreprocessorDirectives( std::string fileName )
-   {
-     FILE *fp = NULL; 
-    
-     ROSE_Fortran_fixed_format_token_stream_pointer = new LexTokenStreamType;
-     assert(ROSE_Fortran_fixed_format_token_stream_pointer != NULL);
-
-     globalFileName = fileName;
-
-  // printf ("Opening Fixed Format Fortran file: %s \n",fileName.c_str());
-
-     if (fileName.empty() == false) 
-        {
-          fp = fopen(fileName.c_str(), "r"); 
-          if (fp) 
-             {
-            // DQ (1/22/2008): I output a comment here to detect where extra LF are output to either cout or cerr as part of the lex phase.
-            // I have not been able to figure out why or where these are output yet (see test2007_189.f for the worst case of this).
-               printf ("In getFortranFixedFormatPreprocessorDirectives(): opened file %s for token stream processing \n",fileName.c_str()); 
-
-            // exit(0);
-               Rose_Fortran_fixed_format_in = fp; 
-               Rose_Fortran_fixed_format_lex(); 
-            /*
-               char s[100];
-               while(fgets(s, 100, fp))
-                  {
-                    if((s[0] == 'C') || (s[0] == 'c'))
-                       {
-                         printf("The comment that is detected is %s\n", s);
-                       }
-                      else
-                       { 
-                         printf("calling the scanner on string '%s'\n", s); 
-                         Rose_Fortran_fixed_format__scan_string(s);
-                         Rose_Fortran_fixed_format__delete_buffer(YY_CURRENT_BUFFER);
-                       }
-                 // printf("Not calling the Rose_Fortran_fixed_format_lex()\n");
-                 // Rose_Fortran_fixed_format__scan_bytes(s,6);
-                  }
-            */
-               fclose(fp);
-               printf ("In getFortranFixedFormatPreprocessorDirectives(): closed file %s for token stream processing \n",fileName.c_str()); 
-             } 
-            else 
-             {
-               printf ("Error: can't find the requested file (%s) \n",fileName.c_str()); 
-               assert(false);
-             }
-        }
-
-     return ROSE_Fortran_fixed_format_token_stream_pointer;
-   }
-
-static void clean_up_stream()
-{
-
-    //
-    //This "rudimentary" post processing of the token stream helps in correct identification of keywords.
-
-    //int e g e r 
-    //is a sequence of identifiers
-    //recognize the token_ids and map them.
-    //If the tokens are 
-
-
-#if 0
-    for(SE_ITR ii = ROSE_Fortran_fixed_format_token_stream.begin(); ii != ROSE_Fortran_fixed_format_token_stream.end(); ii++)
-    {
-        if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_COMMENTS)
-        { 
-            cout<<"## COMMENT -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        }
-        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_STRING_LITERALS)
-        {
-            cout<<"## STRING_LIT -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        }
-        else if(((*ii)->p_tok_elem->token_id > 2) && ((*ii)->p_tok_elem->token_id < 67))
-        {
-            cout<<"## KEYWORD -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        } 
-        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_IDENTIFIER)
-        {
-            cout<<"## IDENTIFIER -->";
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        } 
-        else
-        {
-            cout<<"## ????Unrecognized element in the token stream##"; 
-        }
-        cout<<"\n"; 
- 
-    }
-#endif
-}
-
-#if 0
-int main(int argc, char *argv[])
-{
-    if(argc == 1) 
-    {   //The "default" for now
-        getFortranFixedFormatPreprocessorDirectives("triangle-fixed.f77");
-    }
-    else
-    {
-        getFortranFixedFormatPreprocessorDirectives(argv[1]);
-    }
-
-    clean_up_stream();
-
-    printf("*****************here is the stream *************\n"); 
-    for(SE_ITR ii = ROSE_Fortran_fixed_format_token_stream.begin(); ii != ROSE_Fortran_fixed_format_token_stream.end(); ii++)
-    {
-        if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_COMMENTS)
-        { 
-            cout<<"## COMMENT -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        }
-        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_STRING_LITERALS)
-        {
-            cout<<"## STRING_LIT -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        }
-        else if(((*ii)->p_tok_elem->token_id > 2) && ((*ii)->p_tok_elem->token_id < 67))
-        {
-            cout<<"## KEYWORD -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        } 
-        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_IDENTIFIER)
-        {
-            cout<<"## IDENTIFIER -->";
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        } 
-        else
-        {
-            cout<<"## ????Unrecognized element in the token stream##"; 
-        }
-        cout<<"\n"; 
- 
-    }
-    printf("*****************the stream is over*************\n"); 
-
-    return 1;
-}
-#endif
-
-// }//This ends the namespace Rose_Fortran_fixed_format_namespace
-
-

Deleted: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.lex	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,645 +0,0 @@
-%option noyywrap
-%{
-/* 
-Version 0.2.1 of FORTRAN scanner.
-03-09-2007: Written by Ramakrishna Upadrasta and Dan Quinlan.
-
-In an input free formatted FORTRAN file, this scanner recognizes the following
-the ROSE sequence point in a FORTRAN file
-     comments (beginning with ! and extendig till the end of the line)
-     string literals (enclosed by single quotes '')
-     Keywords (the list is provided in this code)
-*/
-
-
-/*
--------------------------------------------------------------------------------------
-New in the current release:
-    Better data structures for the keywords
-    scripts to generate the header files automatically
-    preliminary macro processing
--------------------------------------------------------------------------------------
-*/
-
-/*
--------------------------------------------------------------------------------------
-Acknowledgements:
--------------------------------------------------------------------------------------
-The authors (Dan and Rama) looked at the source codes of GFORTRAN as well as G95. 
-We gratefully acknowledge the authors of GFORTRAN and G95.
-*/
-
-/*
--------------------------------------------------------------------------------------
-Limitations: 
--------------------------------------------------------------------------------------
-The authors (Rama and Dan) recognize many of the limitations. 
-They will be tabulated later.
-*/
-
-
-
-/*
-There are three scanners in the ROSE frontend. One for C/C++, two for fixed and free 
-format FORTRAN languages. So that the flex generated C code and definitions (yylex, 
-yytext, etc.) of these does not interfere with any other, we are adding 
-     the prefix 'Rose_Fortran_C_Cxx_'        for the C/C++ scanner,
-     the prefix 'Rose_Fortran_Fixed_Format_' for the Fixed Format FORTRAN scanner and
-     the prefix 'Rose_Fortran_Free_Format_'  for the Free Format FORTRAN scanner
-by using the -P<prefix options>
-Note: We could have done this in an arguably more elegant way by changing the individual uses of these 
-functions/variables.
-*/
-
-
-#define yytext Rose_Fortran_fixed_format_text
-#define yylex Rose_Fortran_fixed_format_lex 
-
-
-#include <iostream>
-#include <stdio.h>
-#include <ctype.h>
-#include <string>
-#include <list>
-
-#include "rose.h"
-
-using namespace std;
-
-// namespace Rose_Fortran_fixed_format_namespace {
-
-#include "general_token_defs.h"
-#include "./rose_fortran_token_maps.h"
-
-#if 0
-// These are now defined in general_defs.h
-struct file_pos_info
-{
-    int line_num;
-    int column_num;
-};
-
-struct stream_element
-{ 
-    struct token_element * p_tok_elem;
-    struct file_pos_info beginning_fpi;
-    struct file_pos_info ending_fpi;
-};
-#endif
-
-
-LexTokenStreamTypePointer ROSE_Fortran_fixed_format_token_stream_pointer = NULL;
-typedef LexTokenStreamType::iterator SE_ITR;
-
-static struct file_pos_info curr_beginning;
-
-//Operators
-//This includes the "new" as well as the "old" operators
-static token_element ROSE_Fortran_Operator_map[] = 
-{
-      {"+",       SgToken::FORTRAN_INTRINSIC_PLUS},            /*   GFORTRAN/G95 equivalent is INTRINSIC_PLUS      */
-      {"-",       SgToken::FORTRAN_INTRINSIC_MINUS},           /*   GFORTRAN/G95 equivalent is INTRINSIC_MINUS     */
-      {"**",      SgToken::FORTRAN_INTRINSIC_POWER},           /*   GFORTRAN/G95 equivalent is INTRINSIC_POWER     */
-      {"//",      SgToken::FORTRAN_INTRINSIC_CONCAT},          /*   GFORTRAN/G95 equivalent is INTRINSIC_CONCAT    */
-      {"*",       SgToken::FORTRAN_INTRINSIC_TIMES},           /*   GFORTRAN/G95 equivalent is INTRINSIC_TIMES     */
-      {"/",       SgToken::FORTRAN_INTRINSIC_DIVIDE},          /*   GFORTRAN/G95 equivalent is INTRINSIC_DIVIDE    */
-      {".and.",   SgToken::FORTRAN_INTRINSIC_AND},             /*   GFORTRAN/G95 equivalent is INTRINSIC_AND       */
-      {".or.",    SgToken::FORTRAN_INTRINSIC_OR},              /*   GFORTRAN/G95 equivalent is INTRINSIC_OR        */
-      {".eqv.",   SgToken::FORTRAN_INTRINSIC_EQV},             /*   GFORTRAN/G95 equivalent is INTRINSIC_EQV       */
-      {".neqv.",  SgToken::FORTRAN_INTRINSIC_NEQV},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
-      //{".true.",  SgToken::FORTRAN_TRUE},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
-      //{".false.",  SgToken::FORTRAN_FALSE},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
-      {"==",      SgToken::FORTRAN_INTRINSIC_EQ},              /*   GFORTRAN/G95 equivalent is INTRINSIC_EQ        */
-      {"/=",      SgToken::FORTRAN_INTRINSIC_NE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_NE        */
-      {">=",      SgToken::FORTRAN_INTRINSIC_GE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_GE        */
-      {"<=",      SgToken::FORTRAN_INTRINSIC_LE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_LE        */
-      {"<",       SgToken::FORTRAN_INTRINSIC_LT},              /*   GFORTRAN/G95 equivalent is INTRINSIC_LT        */
-      {">",       SgToken::FORTRAN_INTRINSIC_GT},              /*   GFORTRAN/G95 equivalent is INTRINSIC_GT        */
-      {".not.",   SgToken::FORTRAN_INTRINSIC_NOT},             /*   GFORTRAN/G95 equivalent is INTRINSIC_NOT       */
-      {".eq.",    SgToken::FORTRAN_INTRINSIC_OLDEQ},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDEQ     */
-      {".ne.",    SgToken::FORTRAN_INTRINSIC_OLDNE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDNE     */
-      {".ge.",    SgToken::FORTRAN_INTRINSIC_OLDGE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDGE     */
-      {".le.",    SgToken::FORTRAN_INTRINSIC_OLDLE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDLE     */
-      {".lt.",    SgToken::FORTRAN_INTRINSIC_OLDLT},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDLT     */
-      {".gt.",    SgToken::FORTRAN_INTRINSIC_OLDGT}            /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDGT     */
-};
-
-
-//We know that this is a magic number. 
-//We also know how to fix it.
-#define NUM_KEYWORDS 67
-
-//returns -1 if the string is not a keyword
-//otherwise returns the token ID
-static int identify_if_keyword(string str)
-{
-    //In FORTRAN, the identifiers are case insensitive.
-    //So, variable 'ArEa' is the same as 'aReA'
-
-    string lowered_str;
-    for(unsigned int i = 0; i < strlen(str.c_str()); i++)
-    {
-        lowered_str += tolower(char((str.c_str())[i]));
-    }
-
-    //printf("got called with %s. Converted to %s\n", str.c_str(), lowered_str.c_str());
-    for(int i = 0; i < NUM_KEYWORDS; i++)
-    {
-        if(lowered_str == SgToken::ROSE_Fortran_keyword_map[i].token_lexeme)
-        {
-            return (SgToken::ROSE_Fortran_keyword_map[i].token_id);
-        }
-    }
-    return -1;
-}
-
-//We know that this is a magic number. 
-//It will be fixed.
-#define NUM_OPERATORS 23
-
-#if 0
-static int identify_operator_matching(string str)
-{
-    //printf("got called with %s. \n", str.c_str());
-
-    for(int i = 0; i < NUM_OPERATORS; i++)
-    {
-        if(str == ROSE_Fortran_Operator_map[i].token_lexeme)
-        {
-            return (ROSE_Fortran_Operator_map[i].token_id);
-        }
-    }
-    return -1;
-}
-#endif
-
-static void process_operator(string op) 
-{
-
-}
-
-
-//This could be handled in a fashion better than a MACRO, but for now this will work
-/*
-#define process_operator(op) {  \
-    token_element *p_tok_elem = new token_element;  \
-    p_tok_elem->token_lexeme = yytext; \
-    int rr = identify_if_keyword(yytext); \
-    stream_element *p_se = new stream_element;  \
-    p_se->p_tok_elem = p_tok_elem; \
-    p_se->beginning_fpi.line_num = line_no; \
-    p_se->beginning_fpi.column_num = column_no; \
-    column_no+=strlen(yytext); \
-    p_se->ending_fpi.line_num = line_no; \
-    p_se->ending_fpi.column_num = column_no-1; \
-    ROSE_Fortran_fixed_format_token_stream.push_back(p_se);  \
-} \
-
-*/
-
-static void process_operator(string op);
-
-#define YY_NO_UNPUT
-
-// static int i = 0;
-static std::string currentBuffer;
-
-// DQ (4/19/2006):
-// Store the name of the current file so that we can generate Sg_File_Info objects
-// for each comment.  Later we might want starting and ending fileInfo for each 
-// comments and CPP directive.
-static std::string globalFileName;
-
-#define FORTRAN_LEXICAL_SUPPORT 0
-
-//struct matching_construct
-// static int braces_no=0;
-// static int brace_counting_on=0;
-
-// static int topbracestack();
-// static void pushbracestack(int);
-// static int popbracestack();
-// static bool isemptystack();
-
-// static int num_of_newlines(char*);
-// static int adjust_new_line_counter();
-
-using namespace std;
-
-
-%}
-
-whitespacenl                  [\t\n ]+
-whitespace                    [\t ]+
-alphanum                      [0-9A-Za-z]  
-
-lineprefix                   ^{whitespace}*"#"{whitespace}*
-macrokeyword                 "include"|"define"|"undef"|"line"|"error"|"warning"|"if"|"ifdef"|"ifndef"|"elif"|"else"|"endif"
-
-mlinkagespecification        ^{whitespace}*"extern"{whitespace}*(("\"C\"")|("\"C++\"")){whitespacenl}*"{"
-
-%s NORMAL FORT_COMMENT STRING_LIT MACRO REST_OF_LINE
-%%
-
-%{
-#undef Rose_Fortran_Fixed_Format_wrap
-          int line_no = 1;
-          int start_line_no = line_no;
-          int column_no = 1;
-          int start_column_no = column_no;
-          BEGIN NORMAL;
-%}
-<NORMAL>^C.*\n    {
-                    start_line_no=line_no; 
-                    start_column_no=column_no; 
-                    curr_beginning.line_num = line_no;
-                    curr_beginning.column_num = column_no;
-                    column_no+=1; 
-                    currentBuffer = yytext; 
-                 // printf("The comment string is as follows: %s\n", yytext);
-                 // BEGIN FORT_COMMENT; 
-               }
-<NORMAL>[^C]....  {
-                    start_line_no=line_no; 
-                    start_column_no=column_no; 
-                    curr_beginning.line_num = line_no;
-                    curr_beginning.column_num = column_no;
-                    column_no+=1; 
-                    currentBuffer = yytext; 
-                 // printf("The non comment line is %s\n", yytext);
-                    BEGIN REST_OF_LINE;
-                 // BEGIN FORT_COMMENT; 
-               }
-        /*
-<REST_OF_LINE>"!"    {
-                    start_line_no=line_no; 
-                    start_column_no=column_no; 
-                    curr_beginning.line_num = line_no;
-                    curr_beginning.column_num = column_no;
-                    column_no+=1; 
-                    currentBuffer = yytext; 
-                    BEGIN FORT_COMMENT; 
-               }
-<REST_OF_LINE>"'"    {
-                    //This begins a STRING LITERAL
-                    start_line_no=line_no; 
-                    start_column_no=column_no; 
-                    curr_beginning.line_num = line_no;
-                    curr_beginning.column_num = column_no;
-                    column_no+=1; 
-                    currentBuffer = yytext; 
-                    BEGIN STRING_LIT;
-               }
-<REST_OF_LINE>\n                     { printf("in REST_OF_LINE\n"); line_no++; column_no=1; BEGIN NORMAL; } 
-                                    */
-<REST_OF_LINE>[a-zA-Z_][a-zA-Z0-9_]*       { 
-                                          
-                                          token_element *p_tok_elem = new token_element; 
-                                          p_tok_elem->token_lexeme = yytext; 
-
-                                          int is_keyword = identify_if_keyword(yytext); 
-                                          //found a keyword?
-                                          if(is_keyword != -1)
-                                          {
-                                              //printf("%s is a keyword\n", yytext); 
-                                              p_tok_elem->token_id = is_keyword; 
-                                          }
-                                          else
-                                          {
-                                              //printf("%s is not a keyword\n", yytext); 
-                                              p_tok_elem->token_id = SgToken::FORTRAN_IDENTIFIER;
-                                          }
-                                          
-                                          stream_element *p_se = new stream_element; 
-                                          p_se->p_tok_elem = p_tok_elem; 
-                                          
-                                          p_se->beginning_fpi.line_num = line_no;
-                                          p_se->beginning_fpi.column_num = column_no;
-                                          column_no+=strlen(yytext); 
-                                          p_se->ending_fpi.line_num = line_no; 
-                                          p_se->ending_fpi.column_num = column_no-1; 
-                                          //push the element onto the token stream
-                                          ROSE_Fortran_fixed_format_token_stream_pointer->push_back(p_se); 
-                                    }
-<REST_OF_LINE>"+"        {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>"-"        {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>"**"       {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>"//"       {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>"*"        {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>"/"        {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>".and."    {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>".or."     {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>".eqv."    {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>".neqv."   {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>"=="       {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>"/="       {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>">="       {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>"<="       {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>"<"        {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>">"        {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>".not."    {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>".eq."     {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>".ne."     {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>".ge."     {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>".le."     {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>".lt."     {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>".gt."     {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>".true."     {process_operator(yytext);column_no+=strlen(yytext);} 
-<REST_OF_LINE>".false."     {process_operator(yytext);column_no+=strlen(yytext);}
-<REST_OF_LINE>";"        {//Do stuff to store semi colons
-                          //process_operator(yytext);
-                           column_no+=strlen(yytext);}
-<REST_OF_LINE>","        {//Do stuff to store commas
-                          //process_operator(yytext);
-                           column_no+=strlen(yytext);}
-<REST_OF_LINE>"::"       {//Do stuff to store colons
-                           //process_operator(yytext);
-                           column_no+=strlen(yytext);
-}
-<REST_OF_LINE>^[:blank:]*\n          {
-                                       //According to the STD, a line which has whitespaces is a comment line
-                                       //We will store it
-                                       printf("came across a blank line\n");
-                                       currentBuffer += yytext;
-
-                                       token_element *p_tok_elem = new token_element;
-                                       p_tok_elem->token_lexeme = currentBuffer;
-                                       p_tok_elem->token_id = SgToken::FORTRAN_COMMENTS;
-           
-                                       stream_element *p_se = new stream_element;
-                                       p_se->p_tok_elem = p_tok_elem;
-
-                                       p_se->beginning_fpi.line_num = line_no; 
-                                       p_se->beginning_fpi.column_num = column_no;
-
-                                       p_se->ending_fpi.line_num = line_no;
-                                       p_se->ending_fpi.column_num = column_no;
-                                       ROSE_Fortran_fixed_format_token_stream_pointer->push_back(p_se);
-
-                                       line_no++; column_no=1;
-                                  }
-<NORMAL>.               {
-                        // printf("in <normal>.\n");
-                           column_no++;
-}
-                                  /*
-<STRING_LIT>[^']        {
-                            column_no++; 
-                            currentBuffer += yytext;
-                        }
-<STRING_LIT>''          {
-                            printf("Fixed format\n");
-                            column_no+=2; 
-                            currentBuffer += yytext;
-                        }
-<STRING_LIT>"'"         { 
-                            //This ends the STRING LITERALS
-                            currentBuffer += yytext;
-                            //printf("\nthe literal string is %s\n", currentBuffer.c_str());
-                            //printf("ending in (%d, %d) \n", line_no, column_no);
-
-                            adjust_new_line_counter();
-
-                            token_element *p_tok_elem = new token_element;
-                            p_tok_elem->token_lexeme = currentBuffer;
-                            p_tok_elem->token_id = SgToken::FORTRAN_STRING_LITERALS;
-
-                            stream_element *p_se = new stream_element;
-                            p_se->p_tok_elem = p_tok_elem;
-
-                            p_se->beginning_fpi = curr_beginning;
-                            p_se->ending_fpi.line_num = line_no;
-                            p_se->ending_fpi.column_num = column_no;
-
-                            ROSE_Fortran_fixed_format_token_stream.push_back(p_se);
-
-                            column_no++; 
-                            BEGIN NORMAL;
-                       }
-                      */
-
-<REST_OF_LINE>\n       { 
-                            //This is also a comment
-                            currentBuffer += yytext;
-                            //printf("this ends the comment string is %s", currentBuffer.c_str());
-
-                            /* This was commented out by Rama, as it should be, since it does not work...
-                            token_element *p_tok_elem = new token_element;
-                            p_tok_elem->token_lexeme = currentBuffer;
-                            p_tok_elem->token_id = SgToken::FORTRAN_COMMENTS;
-
-                            stream_element *p_se = new stream_element;
-                            p_se->p_tok_elem = p_tok_elem;
-                            p_se->beginning_fpi = curr_beginning;
-                            p_se->ending_fpi.line_num = line_no;
-                            p_se->ending_fpi.column_num = column_no;
-                            ROSE_Fortran_fixed_format_token_stream_pointer->push_back(p_se);
-                            This was comment out by Rama */
-
-                            line_no++; column_no=1; 
-                            BEGIN NORMAL;
-                      }
-<REST_OF_LINE>.       { 
-                            column_no++; 
-                            currentBuffer += yytext;
-                      }
-%%
-
-// static const int maxstacksize=500;
-// static int bracestack[maxstacksize];
-
-// static int top=0;
-// static void pushbracestack(int brace_no) { bracestack[top++]=brace_no; }
-// static int topbracestack() { if(top) return bracestack[top-1]; else return -1; }
-// static int popbracestack() { return bracestack[--top]; }
-// static bool isemptystack() { return top==0; }
-
-#if 0
-static int adjust_new_line_counter()
-{
-    return 1;
-}
-#endif
-#if 0
-static int num_of_newlines(char* s)
-{
-     int num = 0;
-     while(*s != '\0')
-        {
-          if(*s == '\n')
-               num++;
-          s++;
-        }
-     return num;
-}
-#endif
-
-// int getFortranFixedFormatPreprocessorDirectives( std::string fileName )
-LexTokenStreamTypePointer
-getFortranFixedFormatPreprocessorDirectives( std::string fileName )
-   {
-     FILE *fp = NULL; 
-    
-     ROSE_Fortran_fixed_format_token_stream_pointer = new LexTokenStreamType;
-     assert(ROSE_Fortran_fixed_format_token_stream_pointer != NULL);
-
-     globalFileName = fileName;
-
-  // printf ("Opening Fixed Format Fortran file: %s \n",fileName.c_str());
-
-     if (fileName.empty() == false) 
-        {
-          fp = fopen(fileName.c_str(), "r"); 
-          if (fp) 
-             {
-            // DQ (1/22/2008): I output a comment here to detect where extra LF are output to either cout or cerr as part of the lex phase.
-            // I have not been able to figure out why or where these are output yet (see test2007_189.f for the worst case of this).
-               printf ("In getFortranFixedFormatPreprocessorDirectives(): opened file %s for token stream processing \n",fileName.c_str()); 
-
-            // exit(0);
-               yyin = fp; 
-               yylex(); 
-            /*
-               char s[100];
-               while(fgets(s, 100, fp))
-                  {
-                    if((s[0] == 'C') || (s[0] == 'c'))
-                       {
-                         printf("The comment that is detected is %s\n", s);
-                       }
-                      else
-                       { 
-                         printf("calling the scanner on string '%s'\n", s); 
-                         yy_scan_string(s);
-                         yy_delete_buffer(YY_CURRENT_BUFFER);
-                       }
-                 // printf("Not calling the yylex()\n");
-                 // yy_scan_bytes(s,6);
-                  }
-            */
-               fclose(fp);
-               printf ("In getFortranFixedFormatPreprocessorDirectives(): closed file %s for token stream processing \n",fileName.c_str()); 
-             } 
-            else 
-             {
-               printf ("Error: can't find the requested file (%s) \n",fileName.c_str()); 
-               assert(false);
-             }
-        }
-
-     return ROSE_Fortran_fixed_format_token_stream_pointer;
-   }
-
-static void clean_up_stream()
-{
-
-    //
-    //This "rudimentary" post processing of the token stream helps in correct identification of keywords.
-
-    //int e g e r 
-    //is a sequence of identifiers
-    //recognize the token_ids and map them.
-    //If the tokens are 
-
-
-#if 0
-    for(SE_ITR ii = ROSE_Fortran_fixed_format_token_stream.begin(); ii != ROSE_Fortran_fixed_format_token_stream.end(); ii++)
-    {
-        if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_COMMENTS)
-        { 
-            cout<<"## COMMENT -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        }
-        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_STRING_LITERALS)
-        {
-            cout<<"## STRING_LIT -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        }
-        else if(((*ii)->p_tok_elem->token_id > 2) && ((*ii)->p_tok_elem->token_id < 67))
-        {
-            cout<<"## KEYWORD -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        } 
-        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_IDENTIFIER)
-        {
-            cout<<"## IDENTIFIER -->";
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        } 
-        else
-        {
-            cout<<"## ????Unrecognized element in the token stream##"; 
-        }
-        cout<<"\n"; 
- 
-    }
-#endif
-}
-
-#if 0
-int main(int argc, char *argv[])
-{
-    if(argc == 1) 
-    {   //The "default" for now
-        getFortranFixedFormatPreprocessorDirectives("triangle-fixed.f77");
-    }
-    else
-    {
-        getFortranFixedFormatPreprocessorDirectives(argv[1]);
-    }
-
-    clean_up_stream();
-
-    printf("*****************here is the stream *************\n"); 
-    for(SE_ITR ii = ROSE_Fortran_fixed_format_token_stream.begin(); ii != ROSE_Fortran_fixed_format_token_stream.end(); ii++)
-    {
-        if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_COMMENTS)
-        { 
-            cout<<"## COMMENT -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        }
-        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_STRING_LITERALS)
-        {
-            cout<<"## STRING_LIT -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        }
-        else if(((*ii)->p_tok_elem->token_id > 2) && ((*ii)->p_tok_elem->token_id < 67))
-        {
-            cout<<"## KEYWORD -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        } 
-        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_IDENTIFIER)
-        {
-            cout<<"## IDENTIFIER -->";
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        } 
-        else
-        {
-            cout<<"## ????Unrecognized element in the token stream##"; 
-        }
-        cout<<"\n"; 
- 
-    }
-    printf("*****************the stream is over*************\n"); 
-
-    return 1;
-}
-#endif
-
-// }//This ends the namespace Rose_Fortran_fixed_format_namespace
-

Copied: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.ll (from rev 128, trunk/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.ll)
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.ll	                        (rev 0)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran-fixed.ll	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,647 @@
+%option noyywrap
+%option prefix="Rose_Fortran_fixed_format_"
+%option outfile="lex.yy.c"
+%{
+/* 
+Version 0.2.1 of FORTRAN scanner.
+03-09-2007: Written by Ramakrishna Upadrasta and Dan Quinlan.
+
+In an input free formatted FORTRAN file, this scanner recognizes the following
+the ROSE sequence point in a FORTRAN file
+     comments (beginning with ! and extendig till the end of the line)
+     string literals (enclosed by single quotes '')
+     Keywords (the list is provided in this code)
+*/
+
+
+/*
+-------------------------------------------------------------------------------------
+New in the current release:
+    Better data structures for the keywords
+    scripts to generate the header files automatically
+    preliminary macro processing
+-------------------------------------------------------------------------------------
+*/
+
+/*
+-------------------------------------------------------------------------------------
+Acknowledgements:
+-------------------------------------------------------------------------------------
+The authors (Dan and Rama) looked at the source codes of GFORTRAN as well as G95. 
+We gratefully acknowledge the authors of GFORTRAN and G95.
+*/
+
+/*
+-------------------------------------------------------------------------------------
+Limitations: 
+-------------------------------------------------------------------------------------
+The authors (Rama and Dan) recognize many of the limitations. 
+They will be tabulated later.
+*/
+
+
+
+/*
+There are three scanners in the ROSE frontend. One for C/C++, two for fixed and free 
+format FORTRAN languages. So that the flex generated C code and definitions (yylex, 
+yytext, etc.) of these does not interfere with any other, we are adding 
+     the prefix 'Rose_Fortran_C_Cxx_'        for the C/C++ scanner,
+     the prefix 'Rose_Fortran_Fixed_Format_' for the Fixed Format FORTRAN scanner and
+     the prefix 'Rose_Fortran_Free_Format_'  for the Free Format FORTRAN scanner
+by using the -P<prefix options>
+Note: We could have done this in an arguably more elegant way by changing the individual uses of these 
+functions/variables.
+*/
+
+
+#define yytext Rose_Fortran_fixed_format_text
+#define yylex Rose_Fortran_fixed_format_lex 
+
+
+#include <iostream>
+#include <stdio.h>
+#include <ctype.h>
+#include <string>
+#include <list>
+
+#include "rose.h"
+
+using namespace std;
+
+// namespace Rose_Fortran_fixed_format_namespace {
+
+#include "general_token_defs.h"
+#include "./rose_fortran_token_maps.h"
+
+#if 0
+// These are now defined in general_defs.h
+struct file_pos_info
+{
+    int line_num;
+    int column_num;
+};
+
+struct stream_element
+{ 
+    struct token_element * p_tok_elem;
+    struct file_pos_info beginning_fpi;
+    struct file_pos_info ending_fpi;
+};
+#endif
+
+
+LexTokenStreamTypePointer ROSE_Fortran_fixed_format_token_stream_pointer = NULL;
+typedef LexTokenStreamType::iterator SE_ITR;
+
+static struct file_pos_info curr_beginning;
+
+//Operators
+//This includes the "new" as well as the "old" operators
+static token_element ROSE_Fortran_Operator_map[] = 
+{
+      {"+",       SgToken::FORTRAN_INTRINSIC_PLUS},            /*   GFORTRAN/G95 equivalent is INTRINSIC_PLUS      */
+      {"-",       SgToken::FORTRAN_INTRINSIC_MINUS},           /*   GFORTRAN/G95 equivalent is INTRINSIC_MINUS     */
+      {"**",      SgToken::FORTRAN_INTRINSIC_POWER},           /*   GFORTRAN/G95 equivalent is INTRINSIC_POWER     */
+      {"//",      SgToken::FORTRAN_INTRINSIC_CONCAT},          /*   GFORTRAN/G95 equivalent is INTRINSIC_CONCAT    */
+      {"*",       SgToken::FORTRAN_INTRINSIC_TIMES},           /*   GFORTRAN/G95 equivalent is INTRINSIC_TIMES     */
+      {"/",       SgToken::FORTRAN_INTRINSIC_DIVIDE},          /*   GFORTRAN/G95 equivalent is INTRINSIC_DIVIDE    */
+      {".and.",   SgToken::FORTRAN_INTRINSIC_AND},             /*   GFORTRAN/G95 equivalent is INTRINSIC_AND       */
+      {".or.",    SgToken::FORTRAN_INTRINSIC_OR},              /*   GFORTRAN/G95 equivalent is INTRINSIC_OR        */
+      {".eqv.",   SgToken::FORTRAN_INTRINSIC_EQV},             /*   GFORTRAN/G95 equivalent is INTRINSIC_EQV       */
+      {".neqv.",  SgToken::FORTRAN_INTRINSIC_NEQV},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
+      //{".true.",  SgToken::FORTRAN_TRUE},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
+      //{".false.",  SgToken::FORTRAN_FALSE},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
+      {"==",      SgToken::FORTRAN_INTRINSIC_EQ},              /*   GFORTRAN/G95 equivalent is INTRINSIC_EQ        */
+      {"/=",      SgToken::FORTRAN_INTRINSIC_NE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_NE        */
+      {">=",      SgToken::FORTRAN_INTRINSIC_GE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_GE        */
+      {"<=",      SgToken::FORTRAN_INTRINSIC_LE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_LE        */
+      {"<",       SgToken::FORTRAN_INTRINSIC_LT},              /*   GFORTRAN/G95 equivalent is INTRINSIC_LT        */
+      {">",       SgToken::FORTRAN_INTRINSIC_GT},              /*   GFORTRAN/G95 equivalent is INTRINSIC_GT        */
+      {".not.",   SgToken::FORTRAN_INTRINSIC_NOT},             /*   GFORTRAN/G95 equivalent is INTRINSIC_NOT       */
+      {".eq.",    SgToken::FORTRAN_INTRINSIC_OLDEQ},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDEQ     */
+      {".ne.",    SgToken::FORTRAN_INTRINSIC_OLDNE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDNE     */
+      {".ge.",    SgToken::FORTRAN_INTRINSIC_OLDGE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDGE     */
+      {".le.",    SgToken::FORTRAN_INTRINSIC_OLDLE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDLE     */
+      {".lt.",    SgToken::FORTRAN_INTRINSIC_OLDLT},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDLT     */
+      {".gt.",    SgToken::FORTRAN_INTRINSIC_OLDGT}            /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDGT     */
+};
+
+
+//We know that this is a magic number. 
+//We also know how to fix it.
+#define NUM_KEYWORDS 67
+
+//returns -1 if the string is not a keyword
+//otherwise returns the token ID
+static int identify_if_keyword(string str)
+{
+    //In FORTRAN, the identifiers are case insensitive.
+    //So, variable 'ArEa' is the same as 'aReA'
+
+    string lowered_str;
+    for(unsigned int i = 0; i < strlen(str.c_str()); i++)
+    {
+        lowered_str += tolower(char((str.c_str())[i]));
+    }
+
+    //printf("got called with %s. Converted to %s\n", str.c_str(), lowered_str.c_str());
+    for(int i = 0; i < NUM_KEYWORDS; i++)
+    {
+        if(lowered_str == SgToken::ROSE_Fortran_keyword_map[i].token_lexeme)
+        {
+            return (SgToken::ROSE_Fortran_keyword_map[i].token_id);
+        }
+    }
+    return -1;
+}
+
+//We know that this is a magic number. 
+//It will be fixed.
+#define NUM_OPERATORS 23
+
+#if 0
+static int identify_operator_matching(string str)
+{
+    //printf("got called with %s. \n", str.c_str());
+
+    for(int i = 0; i < NUM_OPERATORS; i++)
+    {
+        if(str == ROSE_Fortran_Operator_map[i].token_lexeme)
+        {
+            return (ROSE_Fortran_Operator_map[i].token_id);
+        }
+    }
+    return -1;
+}
+#endif
+
+static void process_operator(string op) 
+{
+
+}
+
+
+//This could be handled in a fashion better than a MACRO, but for now this will work
+/*
+#define process_operator(op) {  \
+    token_element *p_tok_elem = new token_element;  \
+    p_tok_elem->token_lexeme = yytext; \
+    int rr = identify_if_keyword(yytext); \
+    stream_element *p_se = new stream_element;  \
+    p_se->p_tok_elem = p_tok_elem; \
+    p_se->beginning_fpi.line_num = line_no; \
+    p_se->beginning_fpi.column_num = column_no; \
+    column_no+=strlen(yytext); \
+    p_se->ending_fpi.line_num = line_no; \
+    p_se->ending_fpi.column_num = column_no-1; \
+    ROSE_Fortran_fixed_format_token_stream.push_back(p_se);  \
+} \
+
+*/
+
+static void process_operator(string op);
+
+#define YY_NO_UNPUT
+
+// static int i = 0;
+static std::string currentBuffer;
+
+// DQ (4/19/2006):
+// Store the name of the current file so that we can generate Sg_File_Info objects
+// for each comment.  Later we might want starting and ending fileInfo for each 
+// comments and CPP directive.
+static std::string globalFileName;
+
+#define FORTRAN_LEXICAL_SUPPORT 0
+
+//struct matching_construct
+// static int braces_no=0;
+// static int brace_counting_on=0;
+
+// static int topbracestack();
+// static void pushbracestack(int);
+// static int popbracestack();
+// static bool isemptystack();
+
+// static int num_of_newlines(char*);
+// static int adjust_new_line_counter();
+
+using namespace std;
+
+
+%}
+
+whitespacenl                  [\t\n ]+
+whitespace                    [\t ]+
+alphanum                      [0-9A-Za-z]  
+
+lineprefix                   ^{whitespace}*"#"{whitespace}*
+macrokeyword                 "include"|"define"|"undef"|"line"|"error"|"warning"|"if"|"ifdef"|"ifndef"|"elif"|"else"|"endif"
+
+mlinkagespecification        ^{whitespace}*"extern"{whitespace}*(("\"C\"")|("\"C++\"")){whitespacenl}*"{"
+
+%s NORMAL FORT_COMMENT STRING_LIT MACRO REST_OF_LINE
+%%
+
+%{
+#undef Rose_Fortran_Fixed_Format_wrap
+          int line_no = 1;
+          int start_line_no = line_no;
+          int column_no = 1;
+          int start_column_no = column_no;
+          BEGIN NORMAL;
+%}
+<NORMAL>^C.*\n    {
+                    start_line_no=line_no; 
+                    start_column_no=column_no; 
+                    curr_beginning.line_num = line_no;
+                    curr_beginning.column_num = column_no;
+                    column_no+=1; 
+                    currentBuffer = yytext; 
+                 // printf("The comment string is as follows: %s\n", yytext);
+                 // BEGIN FORT_COMMENT; 
+               }
+<NORMAL>[^C]....  {
+                    start_line_no=line_no; 
+                    start_column_no=column_no; 
+                    curr_beginning.line_num = line_no;
+                    curr_beginning.column_num = column_no;
+                    column_no+=1; 
+                    currentBuffer = yytext; 
+                 // printf("The non comment line is %s\n", yytext);
+                    BEGIN REST_OF_LINE;
+                 // BEGIN FORT_COMMENT; 
+               }
+        /*
+<REST_OF_LINE>"!"    {
+                    start_line_no=line_no; 
+                    start_column_no=column_no; 
+                    curr_beginning.line_num = line_no;
+                    curr_beginning.column_num = column_no;
+                    column_no+=1; 
+                    currentBuffer = yytext; 
+                    BEGIN FORT_COMMENT; 
+               }
+<REST_OF_LINE>"'"    {
+                    //This begins a STRING LITERAL
+                    start_line_no=line_no; 
+                    start_column_no=column_no; 
+                    curr_beginning.line_num = line_no;
+                    curr_beginning.column_num = column_no;
+                    column_no+=1; 
+                    currentBuffer = yytext; 
+                    BEGIN STRING_LIT;
+               }
+<REST_OF_LINE>\n                     { printf("in REST_OF_LINE\n"); line_no++; column_no=1; BEGIN NORMAL; } 
+                                    */
+<REST_OF_LINE>[a-zA-Z_][a-zA-Z0-9_]*       { 
+                                          
+                                          token_element *p_tok_elem = new token_element; 
+                                          p_tok_elem->token_lexeme = yytext; 
+
+                                          int is_keyword = identify_if_keyword(yytext); 
+                                          //found a keyword?
+                                          if(is_keyword != -1)
+                                          {
+                                              //printf("%s is a keyword\n", yytext); 
+                                              p_tok_elem->token_id = is_keyword; 
+                                          }
+                                          else
+                                          {
+                                              //printf("%s is not a keyword\n", yytext); 
+                                              p_tok_elem->token_id = SgToken::FORTRAN_IDENTIFIER;
+                                          }
+                                          
+                                          stream_element *p_se = new stream_element; 
+                                          p_se->p_tok_elem = p_tok_elem; 
+                                          
+                                          p_se->beginning_fpi.line_num = line_no;
+                                          p_se->beginning_fpi.column_num = column_no;
+                                          column_no+=strlen(yytext); 
+                                          p_se->ending_fpi.line_num = line_no; 
+                                          p_se->ending_fpi.column_num = column_no-1; 
+                                          //push the element onto the token stream
+                                          ROSE_Fortran_fixed_format_token_stream_pointer->push_back(p_se); 
+                                    }
+<REST_OF_LINE>"+"        {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>"-"        {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>"**"       {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>"//"       {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>"*"        {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>"/"        {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>".and."    {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>".or."     {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>".eqv."    {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>".neqv."   {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>"=="       {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>"/="       {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>">="       {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>"<="       {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>"<"        {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>">"        {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>".not."    {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>".eq."     {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>".ne."     {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>".ge."     {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>".le."     {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>".lt."     {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>".gt."     {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>".true."     {process_operator(yytext);column_no+=strlen(yytext);} 
+<REST_OF_LINE>".false."     {process_operator(yytext);column_no+=strlen(yytext);}
+<REST_OF_LINE>";"        {//Do stuff to store semi colons
+                          //process_operator(yytext);
+                           column_no+=strlen(yytext);}
+<REST_OF_LINE>","        {//Do stuff to store commas
+                          //process_operator(yytext);
+                           column_no+=strlen(yytext);}
+<REST_OF_LINE>"::"       {//Do stuff to store colons
+                           //process_operator(yytext);
+                           column_no+=strlen(yytext);
+}
+<REST_OF_LINE>^[:blank:]*\n          {
+                                       //According to the STD, a line which has whitespaces is a comment line
+                                       //We will store it
+                                       printf("came across a blank line\n");
+                                       currentBuffer += yytext;
+
+                                       token_element *p_tok_elem = new token_element;
+                                       p_tok_elem->token_lexeme = currentBuffer;
+                                       p_tok_elem->token_id = SgToken::FORTRAN_COMMENTS;
+           
+                                       stream_element *p_se = new stream_element;
+                                       p_se->p_tok_elem = p_tok_elem;
+
+                                       p_se->beginning_fpi.line_num = line_no; 
+                                       p_se->beginning_fpi.column_num = column_no;
+
+                                       p_se->ending_fpi.line_num = line_no;
+                                       p_se->ending_fpi.column_num = column_no;
+                                       ROSE_Fortran_fixed_format_token_stream_pointer->push_back(p_se);
+
+                                       line_no++; column_no=1;
+                                  }
+<NORMAL>.               {
+                        // printf("in <normal>.\n");
+                           column_no++;
+}
+                                  /*
+<STRING_LIT>[^']        {
+                            column_no++; 
+                            currentBuffer += yytext;
+                        }
+<STRING_LIT>''          {
+                            printf("Fixed format\n");
+                            column_no+=2; 
+                            currentBuffer += yytext;
+                        }
+<STRING_LIT>"'"         { 
+                            //This ends the STRING LITERALS
+                            currentBuffer += yytext;
+                            //printf("\nthe literal string is %s\n", currentBuffer.c_str());
+                            //printf("ending in (%d, %d) \n", line_no, column_no);
+
+                            adjust_new_line_counter();
+
+                            token_element *p_tok_elem = new token_element;
+                            p_tok_elem->token_lexeme = currentBuffer;
+                            p_tok_elem->token_id = SgToken::FORTRAN_STRING_LITERALS;
+
+                            stream_element *p_se = new stream_element;
+                            p_se->p_tok_elem = p_tok_elem;
+
+                            p_se->beginning_fpi = curr_beginning;
+                            p_se->ending_fpi.line_num = line_no;
+                            p_se->ending_fpi.column_num = column_no;
+
+                            ROSE_Fortran_fixed_format_token_stream.push_back(p_se);
+
+                            column_no++; 
+                            BEGIN NORMAL;
+                       }
+                      */
+
+<REST_OF_LINE>\n       { 
+                            //This is also a comment
+                            currentBuffer += yytext;
+                            //printf("this ends the comment string is %s", currentBuffer.c_str());
+
+                            /* This was commented out by Rama, as it should be, since it does not work...
+                            token_element *p_tok_elem = new token_element;
+                            p_tok_elem->token_lexeme = currentBuffer;
+                            p_tok_elem->token_id = SgToken::FORTRAN_COMMENTS;
+
+                            stream_element *p_se = new stream_element;
+                            p_se->p_tok_elem = p_tok_elem;
+                            p_se->beginning_fpi = curr_beginning;
+                            p_se->ending_fpi.line_num = line_no;
+                            p_se->ending_fpi.column_num = column_no;
+                            ROSE_Fortran_fixed_format_token_stream_pointer->push_back(p_se);
+                            This was comment out by Rama */
+
+                            line_no++; column_no=1; 
+                            BEGIN NORMAL;
+                      }
+<REST_OF_LINE>.       { 
+                            column_no++; 
+                            currentBuffer += yytext;
+                      }
+%%
+
+// static const int maxstacksize=500;
+// static int bracestack[maxstacksize];
+
+// static int top=0;
+// static void pushbracestack(int brace_no) { bracestack[top++]=brace_no; }
+// static int topbracestack() { if(top) return bracestack[top-1]; else return -1; }
+// static int popbracestack() { return bracestack[--top]; }
+// static bool isemptystack() { return top==0; }
+
+#if 0
+static int adjust_new_line_counter()
+{
+    return 1;
+}
+#endif
+#if 0
+static int num_of_newlines(char* s)
+{
+     int num = 0;
+     while(*s != '\0')
+        {
+          if(*s == '\n')
+               num++;
+          s++;
+        }
+     return num;
+}
+#endif
+
+// int getFortranFixedFormatPreprocessorDirectives( std::string fileName )
+LexTokenStreamTypePointer
+getFortranFixedFormatPreprocessorDirectives( std::string fileName )
+   {
+     FILE *fp = NULL; 
+    
+     ROSE_Fortran_fixed_format_token_stream_pointer = new LexTokenStreamType;
+     assert(ROSE_Fortran_fixed_format_token_stream_pointer != NULL);
+
+     globalFileName = fileName;
+
+  // printf ("Opening Fixed Format Fortran file: %s \n",fileName.c_str());
+
+     if (fileName.empty() == false) 
+        {
+          fp = fopen(fileName.c_str(), "r"); 
+          if (fp) 
+             {
+            // DQ (1/22/2008): I output a comment here to detect where extra LF are output to either cout or cerr as part of the lex phase.
+            // I have not been able to figure out why or where these are output yet (see test2007_189.f for the worst case of this).
+            // printf ("In getFortranFixedFormatPreprocessorDirectives(): opened file %s for token stream processing \n",fileName.c_str()); 
+
+            // exit(0);
+               yyin = fp; 
+               yylex(); 
+            /*
+               char s[100];
+               while(fgets(s, 100, fp))
+                  {
+                    if((s[0] == 'C') || (s[0] == 'c'))
+                       {
+                         printf("The comment that is detected is %s\n", s);
+                       }
+                      else
+                       { 
+                         printf("calling the scanner on string '%s'\n", s); 
+                         yy_scan_string(s);
+                         yy_delete_buffer(YY_CURRENT_BUFFER);
+                       }
+                 // printf("Not calling the yylex()\n");
+                 // yy_scan_bytes(s,6);
+                  }
+            */
+               fclose(fp);
+            // printf ("In getFortranFixedFormatPreprocessorDirectives(): closed file %s for token stream processing \n",fileName.c_str()); 
+             }
+            else 
+             {
+               printf ("Error: can't find the requested file (%s) \n",fileName.c_str()); 
+               assert(false);
+             }
+        }
+
+     return ROSE_Fortran_fixed_format_token_stream_pointer;
+   }
+
+static void clean_up_stream()
+{
+
+    //
+    //This "rudimentary" post processing of the token stream helps in correct identification of keywords.
+
+    //int e g e r 
+    //is a sequence of identifiers
+    //recognize the token_ids and map them.
+    //If the tokens are 
+
+
+#if 0
+    for(SE_ITR ii = ROSE_Fortran_fixed_format_token_stream.begin(); ii != ROSE_Fortran_fixed_format_token_stream.end(); ii++)
+    {
+        if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_COMMENTS)
+        { 
+            cout<<"## COMMENT -->"; 
+            cout<<(*ii)->p_tok_elem->token_lexeme; 
+            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
+                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
+        }
+        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_STRING_LITERALS)
+        {
+            cout<<"## STRING_LIT -->"; 
+            cout<<(*ii)->p_tok_elem->token_lexeme; 
+            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
+                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
+        }
+        else if(((*ii)->p_tok_elem->token_id > 2) && ((*ii)->p_tok_elem->token_id < 67))
+        {
+            cout<<"## KEYWORD -->"; 
+            cout<<(*ii)->p_tok_elem->token_lexeme; 
+            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
+                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
+        } 
+        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_IDENTIFIER)
+        {
+            cout<<"## IDENTIFIER -->";
+            cout<<(*ii)->p_tok_elem->token_lexeme; 
+            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
+                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
+        } 
+        else
+        {
+            cout<<"## ????Unrecognized element in the token stream##"; 
+        }
+        cout<<"\n"; 
+ 
+    }
+#endif
+}
+
+#if 0
+int main(int argc, char *argv[])
+{
+    if(argc == 1) 
+    {   //The "default" for now
+        getFortranFixedFormatPreprocessorDirectives("triangle-fixed.f77");
+    }
+    else
+    {
+        getFortranFixedFormatPreprocessorDirectives(argv[1]);
+    }
+
+    clean_up_stream();
+
+    printf("*****************here is the stream *************\n"); 
+    for(SE_ITR ii = ROSE_Fortran_fixed_format_token_stream.begin(); ii != ROSE_Fortran_fixed_format_token_stream.end(); ii++)
+    {
+        if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_COMMENTS)
+        { 
+            cout<<"## COMMENT -->"; 
+            cout<<(*ii)->p_tok_elem->token_lexeme; 
+            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
+                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
+        }
+        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_STRING_LITERALS)
+        {
+            cout<<"## STRING_LIT -->"; 
+            cout<<(*ii)->p_tok_elem->token_lexeme; 
+            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
+                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
+        }
+        else if(((*ii)->p_tok_elem->token_id > 2) && ((*ii)->p_tok_elem->token_id < 67))
+        {
+            cout<<"## KEYWORD -->"; 
+            cout<<(*ii)->p_tok_elem->token_lexeme; 
+            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
+                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
+        } 
+        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_IDENTIFIER)
+        {
+            cout<<"## IDENTIFIER -->";
+            cout<<(*ii)->p_tok_elem->token_lexeme; 
+            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
+                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
+        } 
+        else
+        {
+            cout<<"## ????Unrecognized element in the token stream##"; 
+        }
+        cout<<"\n"; 
+ 
+    }
+    printf("*****************the stream is over*************\n"); 
+
+    return 1;
+}
+#endif
+
+// }//This ends the namespace Rose_Fortran_fixed_format_namespace
+

Deleted: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.C
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,2330 +0,0 @@
-#define yy_create_buffer Rose_Fortran_free_format__create_buffer
-#define yy_delete_buffer Rose_Fortran_free_format__delete_buffer
-#define yy_scan_buffer Rose_Fortran_free_format__scan_buffer
-#define yy_scan_string Rose_Fortran_free_format__scan_string
-#define yy_scan_bytes Rose_Fortran_free_format__scan_bytes
-#define yy_flex_debug Rose_Fortran_free_format__flex_debug
-#define yy_init_buffer Rose_Fortran_free_format__init_buffer
-#define yy_flush_buffer Rose_Fortran_free_format__flush_buffer
-#define yy_load_buffer_state Rose_Fortran_free_format__load_buffer_state
-#define yy_switch_to_buffer Rose_Fortran_free_format__switch_to_buffer
-#define yyin Rose_Fortran_free_format_in
-#define yyleng Rose_Fortran_free_format_leng
-#define yylex Rose_Fortran_free_format_lex
-#define yyout Rose_Fortran_free_format_out
-#define yyrestart Rose_Fortran_free_format_restart
-#define yytext Rose_Fortran_free_format_text
-
-#line 19 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.C"
-/* A lexical scanner generated by flex */
-
-/* Scanner skeleton version:
- * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
- */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-
-#include <stdio.h>
-#include <unistd.h>
-
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
-#include <stdlib.h>
-
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else	/* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_PROTOS
-#define YY_USE_CONST
-
-#endif	/* __STDC__ */
-#endif	/* ! __cplusplus */
-
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include <io.h>
-#include <stdlib.h>
-#define YY_USE_CONST
-#define YY_USE_PROTOS
-#endif
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index.  If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition.  This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.  The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START ((yy_start - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#define YY_BUF_SIZE 16384
-
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-
-extern int yyleng;
-extern FILE *yyin, *yyout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator).  This
- * avoids problems with code like:
- *
- * 	if ( condition_holds )
- *		yyless( 5 );
- *	else
- *		do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		*yy_cp = yy_hold_char; \
-		YY_RESTORE_YY_MORE_OFFSET \
-		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
-		} \
-	while ( 0 )
-
-#define unput(c) yyunput( c, yytext_ptr )
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-typedef unsigned int yy_size_t;
-
-
-struct yy_buffer_state
-	{
-	FILE *yy_input_file;
-
-	char *yy_ch_buf;		/* input buffer */
-	char *yy_buf_pos;		/* current position in input buffer */
-
-	/* Size of input buffer in bytes, not including room for EOB
-	 * characters.
-	 */
-	yy_size_t yy_buf_size;
-
-	/* Number of characters read into yy_ch_buf, not including EOB
-	 * characters.
-	 */
-	int yy_n_chars;
-
-	/* Whether we "own" the buffer - i.e., we know we created it,
-	 * and can realloc() it to grow it, and should free() it to
-	 * delete it.
-	 */
-	int yy_is_our_buffer;
-
-	/* Whether this is an "interactive" input source; if so, and
-	 * if we're using stdio for input, then we want to use getc()
-	 * instead of fread(), to make sure we stop fetching input after
-	 * each newline.
-	 */
-	int yy_is_interactive;
-
-	/* Whether we're considered to be at the beginning of a line.
-	 * If so, '^' rules will be active on the next match, otherwise
-	 * not.
-	 */
-	int yy_at_bol;
-
-	/* Whether to try to fill the input buffer when we reach the
-	 * end of it.
-	 */
-	int yy_fill_buffer;
-
-	int yy_buffer_status;
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
-	/* When an EOF's been seen but there's still some text to process
-	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
-	 * shouldn't try reading from the input source any more.  We might
-	 * still have a bunch of tokens to match, though, because of
-	 * possible backing-up.
-	 *
-	 * When we actually see the EOF, we change the status to "new"
-	 * (via yyrestart()), so that the user can continue scanning by
-	 * just pointing yyin at a new input file.
-	 */
-#define YY_BUFFER_EOF_PENDING 2
-	};
-
-static YY_BUFFER_STATE yy_current_buffer = 0;
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- */
-#define YY_CURRENT_BUFFER yy_current_buffer
-
-
-/* yy_hold_char holds the character lost when yytext is formed. */
-static char yy_hold_char;
-
-static int yy_n_chars;		/* number of characters read into yy_ch_buf */
-
-
-int yyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1;		/* whether we need to initialize */
-static int yy_start = 0;	/* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin.  A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void yyrestart YY_PROTO(( FILE *input_file ));
-
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
-
-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
-
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
-static void yy_flex_free YY_PROTO(( void * ));
-
-#define yy_new_buffer yy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_is_interactive = is_interactive; \
-	}
-
-#define yy_set_bol(at_bol) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_at_bol = at_bol; \
-	}
-
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
-
-#define yywrap() 1
-#define YY_SKIP_YYWRAP
-typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-typedef int yy_state_type;
-extern char *yytext;
-#define yytext_ptr yytext
-
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
-	yytext_ptr = yy_bp; \
-	yyleng = (int) (yy_cp - yy_bp); \
-	yy_hold_char = *yy_cp; \
-	*yy_cp = '\0'; \
-	yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 40
-#define YY_END_OF_BUFFER 41
-static yyconst short int yy_accept[107] =
-    {   0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-       41,   40,   34,    4,    2,    3,   10,    6,   32,    7,
-       34,   11,   34,   31,   20,   34,   21,    5,   34,    5,
-       39,   38,   35,   37,    8,    0,    0,    0,    0,    0,
-        0,    0,    0,    9,   17,   33,   19,   16,   18,    5,
-        0,    0,    5,   36,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    5,    0,   23,    0,
-        0,   25,   28,   26,   27,   24,    0,    0,   13,    0,
-        0,    5,   12,   14,    0,    0,   22,    0,    0,    5,
-        0,   15,   29,    0,    5,   30,    0,    0,    0,    0,
-
-        0,    0,    0,    1,    0,    0
-    } ;
-
-static yyconst int yy_ec[256] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    4,    5,    1,    1,    1,    1,    6,    1,
-        1,    7,    8,    9,   10,   11,   12,   13,   13,   13,
-       13,   13,   13,   13,   13,   13,   13,   14,   15,   16,
-       17,   18,    1,    1,   19,   19,   20,   19,   19,   19,
-       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
-       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
-        1,    1,    1,    1,   19,    1,   21,   19,   19,   22,
-
-       23,   24,   25,   19,   19,   19,   19,   26,   19,   27,
-       28,   19,   29,   30,   31,   32,   33,   34,   19,   35,
-       19,   19,   36,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1
-    } ;
-
-static yyconst int yy_meta[37] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    2,    1,    1,    1,    1,    1,    2,    2,
-        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
-        2,    2,    2,    2,    2,    1
-    } ;
-
-static yyconst short int yy_base[111] =
-    {   0,
-        0,    0,    0,   35,  128,  127,  123,  122,    0,    0,
-      127,  132,  132,  132,  132,  132,  119,  132,  132,  132,
-       38,   26,  111,  132,  107,  106,  105,    0,   37,   86,
-      132,  132,  132,  114,  132,   92,   89,   96,   17,   18,
-       19,   86,   78,  132,  132,  132,  132,  132,  132,    0,
-       44,   72,   73,  132,   82,   34,   77,   91,   90,   89,
-       88,   40,   66,   86,   63,   63,   71,   82,  132,   81,
-       60,  132,  132,  132,  132,  132,   56,   78,  132,   65,
-       64,   56,  132,  132,   62,   73,  132,   72,   52,   54,
-       69,  132,  132,   52,   50,  132,   51,   52,   58,   66,
-
-       70,   69,   73,  132,   43,  132,  109,  111,  113,   42
-    } ;
-
-static yyconst short int yy_def[111] =
-    {   0,
-      107,  107,  106,    3,  108,  108,  109,  109,  107,  107,
-      106,  106,  106,  106,  106,  106,  106,  106,  106,  106,
-      106,  106,  106,  106,  106,  106,  106,  110,  106,  110,
-      106,  106,  106,  106,  106,  106,  106,  106,  106,  106,
-      106,  106,  106,  106,  106,  106,  106,  106,  106,  110,
-      106,  106,  110,  106,  106,  106,  106,  106,  106,  106,
-      106,  106,  106,  106,  106,  106,  110,  106,  106,  106,
-      106,  106,  106,  106,  106,  106,  106,  106,  106,  106,
-      106,  110,  106,  106,  106,  106,  106,  106,  106,  110,
-      106,  106,  106,  106,  110,  106,  106,  106,  106,  106,
-
-      106,  106,  106,  106,  106,    0,  106,  106,  106,  106
-    } ;
-
-static yyconst short int yy_nxt[169] =
-    {   0,
-       13,   13,   14,   15,   13,   16,   17,   18,   19,   20,
-       21,   22,   13,   23,   24,   25,   26,   27,   28,   28,
-       28,   28,   28,   28,   28,   28,   28,   28,   28,   28,
-       28,   28,   28,   28,   28,   13,   29,   44,   51,   58,
-       60,   62,   45,   50,   69,   51,   63,  101,   59,   61,
-       76,   98,   98,   98,   99,   99,   99,   30,   36,   52,
-       37,   38,   39,   40,   41,   42,   52,   70,   77,   43,
-      101,  103,  103,  102,  103,  103,  105,  100,   97,   96,
-       95,   94,   93,   92,   91,   90,   89,   88,   87,   86,
-       85,   84,   83,   82,   81,   80,   79,   78,   75,   74,
-
-       73,   72,   71,   68,   67,  104,   66,   65,  104,   12,
-       12,   31,   31,   33,   33,   64,   57,   56,   55,   54,
-       53,   49,   48,   47,   46,   35,  106,   34,   34,   32,
-       32,   11,  106,  106,  106,  106,  106,  106,  106,  106,
-      106,  106,  106,  106,  106,  106,  106,  106,  106,  106,
-      106,  106,  106,  106,  106,  106,  106,  106,  106,  106,
-      106,  106,  106,  106,  106,  106,  106,  106
-    } ;
-
-static yyconst short int yy_chk[169] =
-    {   0,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    4,   22,   29,   39,
-       40,   41,   22,  110,   56,   51,   41,  105,   39,   40,
-       62,   95,   97,   98,   95,   97,   98,    4,   21,   29,
-       21,   21,   21,   21,   21,   21,   51,   56,   62,   21,
-      100,  101,  101,  100,  103,  103,  102,   99,   94,   91,
-       90,   89,   88,   86,   85,   82,   81,   80,   78,   77,
-       71,   70,   68,   67,   66,   65,   64,   63,   61,   60,
-
-       59,   58,   57,   55,   53,  101,   52,   43,  103,  107,
-      107,  108,  108,  109,  109,   42,   38,   37,   36,   34,
-       30,   27,   26,   25,   23,   17,   11,    8,    7,    6,
-        5,  106,  106,  106,  106,  106,  106,  106,  106,  106,
-      106,  106,  106,  106,  106,  106,  106,  106,  106,  106,
-      106,  106,  106,  106,  106,  106,  106,  106,  106,  106,
-      106,  106,  106,  106,  106,  106,  106,  106
-    } ;
-
-static yy_state_type yy_last_accepting_state;
-static char *yy_last_accepting_cpos;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-#define INITIAL 0
-#line 3 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-/* 
-Version 0.2.1 of FORTRAN scanner.
-03-09-2007: Written by Ramakrishna Upadrasta and Dan Quinlan.
-
-In an input free formatted FORTRAN file, this scanner recognizes the following
-the ROSE sequence point in a FORTRAN file
-     comments (beginning with ! and extendig till the end of the line)
-     string literals (enclosed by single quotes '')
-     Keywords (the list is provided in this code)
-*/
-
-
-/*
--------------------------------------------------------------------------------------
-New in the current release:
-    Better data structures for the keywords
-    scripts to generate the header files automatically
-    preliminary macro processing
--------------------------------------------------------------------------------------
-*/
-
-/*
--------------------------------------------------------------------------------------
-Acknowledgements:
--------------------------------------------------------------------------------------
-The authors (Dan and Rama) looked at the source codes of GFORTRAN as well as G95. 
-We gratefully acknowledge the authors of GFORTRAN and G95.
-*/
-
-/*
--------------------------------------------------------------------------------------
-Limitations: 
--------------------------------------------------------------------------------------
-The authors (Rama and Dan) recognize many of the limitations. 
-They will be tabulated later.
-*/
-
-/*
-There are three scanners in the ROSE frontend. One for C/C++, two for fixed and free 
-format FORTRAN languages. So that the flex generated C code and definitions (yylex, 
-yytext, etc.) of these does not interfere with any other, we are adding 
-     the prefix 'Rose_Fortran_C_Cxx_'        for the C/C++ scanner,
-     the prefix 'Rose_Fortran_Fixed_Format_' for the Fixed Format FORTRAN scanner and
-     the prefix 'Rose_Fortran_Free_Format_'  for the Free Format FORTRAN scanner
-by using the -P<prefix options>
-Note: We could have done this in an arguably more elegant way by changing the individual uses of these 
-functions/variables.
-*/
-#define yytext Rose_Fortran_free_format_text
-#define yylex Rose_Fortran_free_format_lex 
-
-
-
-
-
-#include <iostream>
-#include <stdio.h>
-#include <ctype.h>
-#include <string>
-#include <list>
-
-#include "rose.h"
-
-using namespace std;
-
-// namespace Rose_Fortran_free_format_namespace {
-
-#include "general_token_defs.h"
-#include "./rose_fortran_token_maps.h"
-
-#if 0
-// These are now defined in general_defs.h
-struct file_pos_info
-{
-    int line_num;
-    int column_num;
-};
-
-struct stream_element
-{ 
-    struct token_element * p_tok_elem;
-    struct file_pos_info beginning_fpi;
-    struct file_pos_info ending_fpi;
-};
-#endif
-
-// DQ (1/21/2008): Modified this to be a pointer so it could be built and returned to ROSE.
-LexTokenStreamTypePointer ROSE_Fortran_free_format_token_stream_pointer = NULL;
-
-typedef LexTokenStreamType::iterator SE_ITR;
-
-static struct file_pos_info curr_beginning;
-
-//Operators
-//This includes the "new" as well as the "old" operators
-token_element ROSE_Fortran_Operator_map[] = 
-{
-      {"+",       SgToken::FORTRAN_INTRINSIC_PLUS},            /*   GFORTRAN/G95 equivalent is INTRINSIC_PLUS      */
-      {"-",       SgToken::FORTRAN_INTRINSIC_MINUS},           /*   GFORTRAN/G95 equivalent is INTRINSIC_MINUS     */
-      {"**",      SgToken::FORTRAN_INTRINSIC_POWER},           /*   GFORTRAN/G95 equivalent is INTRINSIC_POWER     */
-      {"//",      SgToken::FORTRAN_INTRINSIC_CONCAT},          /*   GFORTRAN/G95 equivalent is INTRINSIC_CONCAT    */
-      {"*",       SgToken::FORTRAN_INTRINSIC_TIMES},           /*   GFORTRAN/G95 equivalent is INTRINSIC_TIMES     */
-      {"/",       SgToken::FORTRAN_INTRINSIC_DIVIDE},          /*   GFORTRAN/G95 equivalent is INTRINSIC_DIVIDE    */
-      {".and.",   SgToken::FORTRAN_INTRINSIC_AND},             /*   GFORTRAN/G95 equivalent is INTRINSIC_AND       */
-      {".or.",    SgToken::FORTRAN_INTRINSIC_OR},              /*   GFORTRAN/G95 equivalent is INTRINSIC_OR        */
-      {".eqv.",   SgToken::FORTRAN_INTRINSIC_EQV},             /*   GFORTRAN/G95 equivalent is INTRINSIC_EQV       */
-      {".neqv.",  SgToken::FORTRAN_INTRINSIC_NEQV},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
-      //{".true.",  SgToken::FORTRAN_TRUE},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
-      //{".false.",  SgToken::FORTRAN_FALSE},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
-      {"==",      SgToken::FORTRAN_INTRINSIC_EQ},              /*   GFORTRAN/G95 equivalent is INTRINSIC_EQ        */
-      {"/=",      SgToken::FORTRAN_INTRINSIC_NE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_NE        */
-      {">=",      SgToken::FORTRAN_INTRINSIC_GE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_GE        */
-      {"<=",      SgToken::FORTRAN_INTRINSIC_LE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_LE        */
-      {"<",       SgToken::FORTRAN_INTRINSIC_LT},              /*   GFORTRAN/G95 equivalent is INTRINSIC_LT        */
-      {">",       SgToken::FORTRAN_INTRINSIC_GT},              /*   GFORTRAN/G95 equivalent is INTRINSIC_GT        */
-      {".not.",   SgToken::FORTRAN_INTRINSIC_NOT},             /*   GFORTRAN/G95 equivalent is INTRINSIC_NOT       */
-      {".eq.",    SgToken::FORTRAN_INTRINSIC_OLDEQ},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDEQ     */
-      {".ne.",    SgToken::FORTRAN_INTRINSIC_OLDNE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDNE     */
-      {".ge.",    SgToken::FORTRAN_INTRINSIC_OLDGE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDGE     */
-      {".le.",    SgToken::FORTRAN_INTRINSIC_OLDLE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDLE     */
-      {".lt.",    SgToken::FORTRAN_INTRINSIC_OLDLT},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDLT     */
-      {".gt.",    SgToken::FORTRAN_INTRINSIC_OLDGT}            /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDGT     */
-};
-
-
-//We know that this is a magic number. 
-//We also know how to fix it.
-#define NUM_KEYWORDS 67
-
-//returns -1 if the string is not a keyword
-//otherwise returns the token ID
-static int identify_if_keyword(string str)
-{
-    //In FORTRAN, the identifiers are case insensitive.
-    //So, variable 'ArEa' is the same as 'aReA'
-
-    string lowered_str;
-    for(unsigned int i = 0; i < strlen(str.c_str()); i++)
-    {
-        lowered_str += (unsigned char)tolower(char((str.c_str())[i]));
-    }
-
-    //printf("got called with %s. Converted to %s\n", str.c_str(), lowered_str.c_str());
-    for(int i = 0; i < NUM_KEYWORDS; i++)
-    {
-        if(lowered_str == ROSE_Fortran_keyword_map[i].token_lexeme)
-        {
-            return (ROSE_Fortran_keyword_map[i].token_id);
-        }
-    }
-    return -1;
-}
-
-//We know that this is a magic number. 
-//It will be fixed.
-#define NUM_OPERATORS 23
-
-#if 0
-static int identify_operator_matching(string str)
-{
-    //printf("got called with %s. \n", str.c_str());
-
-    for(int i = 0; i < NUM_OPERATORS; i++)
-    {
-        if(str == ROSE_Fortran_Operator_map[i].token_lexeme)
-        {
-            return (ROSE_Fortran_Operator_map[i].token_id);
-        }
-    }
-    return -1;
-}
-#endif
-
-static void process_operator(string op) 
-{
-
-}
-
-
-//This could be handled in a fashion better than a MACRO, but for now this will work
-/*
-#define process_operator(op) {  \
-    token_element *p_tok_elem = new token_element;  \
-    p_tok_elem->token_lexeme = yytext; \
-    int rr = identify_if_keyword(yytext); \
-    stream_element *p_se = new stream_element;  \
-    p_se->p_tok_elem = p_tok_elem; \
-    p_se->beginning_fpi.line_num = line_no; \
-    p_se->beginning_fpi.column_num = column_no; \
-    column_no+=strlen(yytext); \
-    p_se->ending_fpi.line_num = line_no; \
-    p_se->ending_fpi.column_num = column_no-1; \
-    ROSE_Fortran_free_format_token_stream.push_back(p_se);  \
-} \
-
-*/
-
-static void process_operator(string op);
-
-#define YY_NO_UNPUT
-
-// static int i = 0;
-static std::string currentBuffer;
-
-// DQ (4/19/2006):
-// Store the name of the current file so that we can generate Sg_File_Info objects
-// for each comment.  Later we might want starting and ending fileInfo for each 
-// comments and CPP directive.
-static std::string globalFileName;
-
-#define FORTRAN_LEXICAL_SUPPORT 0
-
-//struct matching_construct
-static int braces_no=0;
-// static int brace_counting_on=0;
-
-// static int topbracestack();
-static void pushbracestack(int);
-// static int popbracestack();
-// static bool isemptystack();
-
-static int num_of_newlines(char*);
-static int adjust_new_line_counter();
-
-using namespace std;
-//#undef yywrap
-
-
-#define NORMAL 1
-#define FORT_COMMENT 2
-#define STRING_LIT 3
-#define MACRO 4
- 
-#line 688 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.C"
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
-#else
-extern int yywrap YY_PROTO(( void ));
-#endif
-#endif
-
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
-#endif
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
-#endif
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
-#else
-static int input YY_PROTO(( void ));
-#endif
-#endif
-
-#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
-#endif
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
-#endif
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
-#endif
-
-#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
-#endif
-
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines.  This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
-#endif
-
-/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-	if ( yy_current_buffer->yy_is_interactive ) \
-		{ \
-		int c = '*', n; \
-		for ( n = 0; n < max_size && \
-			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
-			buf[n] = (char) c; \
-		if ( c == '\n' ) \
-			buf[n++] = (char) c; \
-		if ( c == EOF && ferror( yyin ) ) \
-			YY_FATAL_ERROR( "input in flex scanner failed" ); \
-		result = n; \
-		} \
-	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
-		  && ferror( yyin ) ) \
-		YY_FATAL_ERROR( "input in flex scanner failed" );
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL int yylex YY_PROTO(( void ))
-#endif
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
-	if ( yyleng > 0 ) \
-		yy_current_buffer->yy_at_bol = \
-				(yytext[yyleng - 1] == '\n'); \
-	YY_USER_ACTION
-
-YY_DECL
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp = NULL, *yy_bp = NULL;
-	register int yy_act;
-
-#line 243 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-
-
-
-#undef Rose_Fortran_Free_Format_wrap
-          int line_no = 1;
-          int start_line_no = line_no;
-          int column_no = 1;
-          int start_column_no = column_no;
-          BEGIN NORMAL;
-
-
-#line 854 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.C"
-
-	if ( yy_init )
-		{
-		yy_init = 0;
-
-#ifdef YY_USER_INIT
-		YY_USER_INIT;
-#endif
-
-		if ( ! yy_start )
-			yy_start = 1;	/* first start state */
-
-		if ( ! yyin )
-			yyin = stdin;
-
-		if ( ! yyout )
-			yyout = stdout;
-
-		if ( ! yy_current_buffer )
-			yy_current_buffer =
-				yy_create_buffer( yyin, YY_BUF_SIZE );
-
-		yy_load_buffer_state();
-		}
-
-	while ( 1 )		/* loops until end-of-file is reached */
-		{
-		yy_cp = yy_c_buf_p;
-
-		/* Support of yytext. */
-		*yy_cp = yy_hold_char;
-
-		/* yy_bp points to the position in yy_ch_buf of the start of
-		 * the current run.
-		 */
-		yy_bp = yy_cp;
-
-		yy_current_state = yy_start;
-		yy_current_state += YY_AT_BOL();
-yy_match:
-		do
-			{
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
-			if ( yy_accept[yy_current_state] )
-				{
-				yy_last_accepting_state = yy_current_state;
-				yy_last_accepting_cpos = yy_cp;
-				}
-			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-				{
-				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 107 )
-					yy_c = yy_meta[(unsigned int) yy_c];
-				}
-			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-			++yy_cp;
-			}
-		while ( yy_base[yy_current_state] != 132 );
-
-yy_find_action:
-		yy_act = yy_accept[yy_current_state];
-		if ( yy_act == 0 )
-			{ /* have to back up */
-			yy_cp = yy_last_accepting_cpos;
-			yy_current_state = yy_last_accepting_state;
-			yy_act = yy_accept[yy_current_state];
-			}
-
-		YY_DO_BEFORE_ACTION;
-
-
-do_action:	/* This label is used only to access EOF actions. */
-
-
-		switch ( yy_act )
-	{ /* beginning of action switch */
-			case 0: /* must back up */
-			/* undo the effects of YY_DO_BEFORE_ACTION */
-			*yy_cp = yy_hold_char;
-			yy_cp = yy_last_accepting_cpos;
-			yy_current_state = yy_last_accepting_state;
-			goto yy_find_action;
-
-case 1:
-YY_RULE_SETUP
-#line 254 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{ 
-                                    /*preprocessorList.addElement(PreprocessingInfo::ClinkageSpecificationStart, 
-                                            yytext,globalFileName,line_no,column_no,0); 
-                                            */
-                                    braces_no++; 
-                                    line_no+=num_of_newlines(yytext); 
-                                    column_no+=strlen(yytext); 
-                                    pushbracestack(braces_no); 
-                   }
-	YY_BREAK
-case 2:
-YY_RULE_SETUP
-#line 263 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{
-                    start_line_no=line_no; 
-                    start_column_no=column_no; 
-                    curr_beginning.line_num = line_no;
-                    curr_beginning.column_num = column_no;
-                    column_no+=1; 
-                    currentBuffer = yytext; 
-                    BEGIN FORT_COMMENT; 
-               }
-	YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 272 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{
-                    /*This begins a STRING LITERAL*/
-                    start_line_no=line_no; 
-                    start_column_no=column_no; 
-                    curr_beginning.line_num = line_no;
-                    curr_beginning.column_num = column_no;
-                    column_no+=1; 
-                    currentBuffer = yytext; 
-                    BEGIN STRING_LIT;
-               }
-	YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 282 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{ line_no++; column_no=1; } 
-	YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 283 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{ 
-                                          
-                                          token_element *p_tok_elem = new token_element; 
-                                          p_tok_elem->token_lexeme = yytext; 
-
-                                          int is_keyword = identify_if_keyword(yytext); 
-                                          //found a keyword?
-                                          if(is_keyword != -1)
-                                          {
-                                              //printf("%s is a keyword\n", yytext); 
-                                              p_tok_elem->token_id = is_keyword; 
-                                          }
-                                          else
-                                          {
-                                              //printf("%s is not a keyword\n", yytext); 
-                                              p_tok_elem->token_id = SgToken::FORTRAN_IDENTIFIER;
-                                          }
-                                          
-                                          stream_element *p_se = new stream_element; 
-                                          p_se->p_tok_elem = p_tok_elem; 
-                                          
-                                          p_se->beginning_fpi.line_num = line_no;
-                                          p_se->beginning_fpi.column_num = column_no;
-                                          column_no+=strlen(yytext); 
-                                          p_se->ending_fpi.line_num = line_no; 
-                                          p_se->ending_fpi.column_num = column_no-1; 
-                                          //push the element onto the token stream
-                                          ROSE_Fortran_free_format_token_stream_pointer->push_back(p_se); 
-                                    }
-	YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 312 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 313 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 314 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 315 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 316 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 317 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 318 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 319 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 320 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 321 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 322 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 323 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 324 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 325 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 326 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 327 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 328 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 329 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 330 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 331 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 332 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 333 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 334 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 335 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);} 
-	YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 336 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{process_operator(yytext);column_no+=strlen(yytext);}
-	YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 337 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{/*Do stuff to store semi colons*/ /*process_operator(yytext);*/column_no+=strlen(yytext);}
-	YY_BREAK
-case 32:
-YY_RULE_SETUP
-#line 338 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{/*Do stuff to store commas*/ /*process_operator(yytext);*/column_no+=strlen(yytext);}
-	YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 339 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{/*Do stuff to store colons*/ /*process_operator(yytext);*/column_no+=strlen(yytext);}
-	YY_BREAK
-/*
-<NORMAL>^[:blank:]*\n          {
-                                       //According to the STD, a line which has whitespaces is a comment line
-                                       //We will store it
-                                       printf("came across a blank line\n");
-                                       currentBuffer += yytext;
-
-                                       token_element *p_tok_elem = new token_element;
-                                       p_tok_elem->token_lexeme = currentBuffer;
-                                       p_tok_elem->token_id = SgToken::FORTRAN_COMMENTS;
-           
-                                       stream_element *p_se = new stream_element;
-                                       p_se->p_tok_elem = p_tok_elem;
-
-                                       p_se->beginning_fpi.line_num = line_no; 
-                                       p_se->beginning_fpi.column_num = column_no;
-
-                                       p_se->ending_fpi.line_num = line_no;
-                                       p_se->ending_fpi.column_num = column_no;
-                                       ROSE_Fortran_free_format_token_stream_pointer->push_back(p_se);
-
-                                       line_no++; column_no=1;
-                                  }
-                                  */
-case 34:
-YY_RULE_SETUP
-#line 364 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{column_no++;}
-	YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 365 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{
-                            column_no++; 
-                            currentBuffer += yytext;
-                        }
-	YY_BREAK
-case 36:
-YY_RULE_SETUP
-#line 369 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{
-                            column_no+=2; 
-                            currentBuffer += yytext;
-                        }
-	YY_BREAK
-case 37:
-YY_RULE_SETUP
-#line 373 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{ 
-                            //This ends the STRING LITERALS
-                            currentBuffer += yytext;
-                            //printf("\nthe literal string is %s\n", currentBuffer.c_str());
-                            //printf("ending in (%d, %d) \n", line_no, column_no);
-
-                            adjust_new_line_counter();
-
-                            token_element *p_tok_elem = new token_element;
-                            p_tok_elem->token_lexeme = currentBuffer;
-                            p_tok_elem->token_id = SgToken::FORTRAN_STRING_LITERALS;
-
-                            stream_element *p_se = new stream_element;
-                            p_se->p_tok_elem = p_tok_elem;
-
-                            p_se->beginning_fpi = curr_beginning;
-                            p_se->ending_fpi.line_num = line_no;
-                            p_se->ending_fpi.column_num = column_no;
-
-                            ROSE_Fortran_free_format_token_stream_pointer->push_back(p_se);
-
-                            column_no++; 
-                            BEGIN NORMAL;
-                       }
-	YY_BREAK
-case 38:
-YY_RULE_SETUP
-#line 397 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{ 
-                            //This is also a comment
-                            currentBuffer += yytext;
-                            //printf("the comment string is %s", currentBuffer.c_str());
-
-                            token_element *p_tok_elem = new token_element;
-                            p_tok_elem->token_lexeme = currentBuffer;
-                            p_tok_elem->token_id = SgToken::FORTRAN_COMMENTS;
-
-                            stream_element *p_se = new stream_element;
-                            p_se->p_tok_elem = p_tok_elem;
-                            p_se->beginning_fpi = curr_beginning;
-                            p_se->ending_fpi.line_num = line_no;
-                            p_se->ending_fpi.column_num = column_no;
-                            ROSE_Fortran_free_format_token_stream_pointer->push_back(p_se);
-
-                            line_no++; column_no=1; 
-                            BEGIN NORMAL;
-                      }
-	YY_BREAK
-case 39:
-YY_RULE_SETUP
-#line 416 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-{ 
-                            column_no++; 
-                            currentBuffer += yytext;
-                      }
-	YY_BREAK
-case 40:
-YY_RULE_SETUP
-#line 420 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-ECHO;
-	YY_BREAK
-#line 1265 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.C"
-case YY_STATE_EOF(INITIAL):
-case YY_STATE_EOF(NORMAL):
-case YY_STATE_EOF(FORT_COMMENT):
-case YY_STATE_EOF(STRING_LIT):
-case YY_STATE_EOF(MACRO):
-	yyterminate();
-
-	case YY_END_OF_BUFFER:
-		{
-		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
-
-		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = yy_hold_char;
-		YY_RESTORE_YY_MORE_OFFSET
-
-		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
-			{
-			/* We're scanning a new file or input source.  It's
-			 * possible that this happened because the user
-			 * just pointed yyin at a new source and called
-			 * yylex().  If so, then we have to assure
-			 * consistency between yy_current_buffer and our
-			 * globals.  Here is the right place to do so, because
-			 * this is the first action (other than possibly a
-			 * back-up) that will match for the new input source.
-			 */
-			yy_n_chars = yy_current_buffer->yy_n_chars;
-			yy_current_buffer->yy_input_file = yyin;
-			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
-			}
-
-		/* Note that here we test for yy_c_buf_p "<=" to the position
-		 * of the first EOB in the buffer, since yy_c_buf_p will
-		 * already have been incremented past the NUL character
-		 * (since all states make transitions on EOB to the
-		 * end-of-buffer state).  Contrast this with the test
-		 * in input().
-		 */
-		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			{ /* This was really a NUL. */
-			yy_state_type yy_next_state;
-
-			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
-
-			yy_current_state = yy_get_previous_state();
-
-			/* Okay, we're now positioned to make the NUL
-			 * transition.  We couldn't have
-			 * yy_get_previous_state() go ahead and do it
-			 * for us because it doesn't know how to deal
-			 * with the possibility of jamming (and we don't
-			 * want to build jamming into it because then it
-			 * will run more slowly).
-			 */
-
-			yy_next_state = yy_try_NUL_trans( yy_current_state );
-
-			yy_bp = yytext_ptr + YY_MORE_ADJ;
-
-			if ( yy_next_state )
-				{
-				/* Consume the NUL. */
-				yy_cp = ++yy_c_buf_p;
-				yy_current_state = yy_next_state;
-				goto yy_match;
-				}
-
-			else
-				{
-				yy_cp = yy_c_buf_p;
-				goto yy_find_action;
-				}
-			}
-
-		else switch ( yy_get_next_buffer() )
-			{
-			case EOB_ACT_END_OF_FILE:
-				{
-				yy_did_buffer_switch_on_eof = 0;
-
-				if ( yywrap() )
-					{
-					/* Note: because we've taken care in
-					 * yy_get_next_buffer() to have set up
-					 * yytext, we can now set up
-					 * yy_c_buf_p so that if some total
-					 * hoser (like flex itself) wants to
-					 * call the scanner after we return the
-					 * YY_NULL, it'll still work - another
-					 * YY_NULL will get returned.
-					 */
-					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
-
-					yy_act = YY_STATE_EOF(YY_START);
-					goto do_action;
-					}
-
-				else
-					{
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-					}
-				break;
-				}
-
-			case EOB_ACT_CONTINUE_SCAN:
-				yy_c_buf_p =
-					yytext_ptr + yy_amount_of_matched_text;
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_match;
-
-			case EOB_ACT_LAST_MATCH:
-				yy_c_buf_p =
-				&yy_current_buffer->yy_ch_buf[yy_n_chars];
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_find_action;
-			}
-		break;
-		}
-
-	default:
-		YY_FATAL_ERROR(
-			"fatal flex scanner internal error--no action found" );
-	} /* end of action switch */
-		} /* end of scanning one token */
-	} /* end of yylex */
-
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- *	EOB_ACT_LAST_MATCH -
- *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- *	EOB_ACT_END_OF_FILE - end of file
- */
-
-static int yy_get_next_buffer()
-	{
-	register char *dest = yy_current_buffer->yy_ch_buf;
-	register char *source = yytext_ptr;
-	register int number_to_move, i;
-	int ret_val;
-
-	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
-		YY_FATAL_ERROR(
-		"fatal flex scanner internal error--end of buffer missed" );
-
-	if ( yy_current_buffer->yy_fill_buffer == 0 )
-		{ /* Don't try to fill the buffer, so this is an EOF. */
-		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
-			{
-			/* We matched a single character, the EOB, so
-			 * treat this as a final EOF.
-			 */
-			return EOB_ACT_END_OF_FILE;
-			}
-
-		else
-			{
-			/* We matched some text prior to the EOB, first
-			 * process it.
-			 */
-			return EOB_ACT_LAST_MATCH;
-			}
-		}
-
-	/* Try to read more data. */
-
-	/* First move last chars to start of buffer. */
-	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
-
-	for ( i = 0; i < number_to_move; ++i )
-		*(dest++) = *(source++);
-
-	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
-		/* don't do the read, it's not guaranteed to return an EOF,
-		 * just force an EOF
-		 */
-		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
-
-	else
-		{
-		int num_to_read =
-			yy_current_buffer->yy_buf_size - number_to_move - 1;
-
-		while ( num_to_read <= 0 )
-			{ /* Not enough room in the buffer - grow it. */
-#ifdef YY_USES_REJECT
-			YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
-
-			/* just a shorter name for the current buffer */
-			YY_BUFFER_STATE b = yy_current_buffer;
-
-			int yy_c_buf_p_offset =
-				(int) (yy_c_buf_p - b->yy_ch_buf);
-
-			if ( b->yy_is_our_buffer )
-				{
-				int new_size = b->yy_buf_size * 2;
-
-				if ( new_size <= 0 )
-					b->yy_buf_size += b->yy_buf_size / 8;
-				else
-					b->yy_buf_size *= 2;
-
-				b->yy_ch_buf = (char *)
-					/* Include room in for 2 EOB chars. */
-					yy_flex_realloc( (void *) b->yy_ch_buf,
-							 b->yy_buf_size + 2 );
-				}
-			else
-				/* Can't grow it, we don't own it. */
-				b->yy_ch_buf = 0;
-
-			if ( ! b->yy_ch_buf )
-				YY_FATAL_ERROR(
-				"fatal error - scanner input buffer overflow" );
-
-			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
-			num_to_read = yy_current_buffer->yy_buf_size -
-						number_to_move - 1;
-#endif
-			}
-
-		if ( num_to_read > YY_READ_BUF_SIZE )
-			num_to_read = YY_READ_BUF_SIZE;
-
-		/* Read in more data. */
-		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
-			yy_n_chars, num_to_read );
-
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	if ( yy_n_chars == 0 )
-		{
-		if ( number_to_move == YY_MORE_ADJ )
-			{
-			ret_val = EOB_ACT_END_OF_FILE;
-			yyrestart( yyin );
-			}
-
-		else
-			{
-			ret_val = EOB_ACT_LAST_MATCH;
-			yy_current_buffer->yy_buffer_status =
-				YY_BUFFER_EOF_PENDING;
-			}
-		}
-
-	else
-		ret_val = EOB_ACT_CONTINUE_SCAN;
-
-	yy_n_chars += number_to_move;
-	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
-	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
-	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
-
-	return ret_val;
-	}
-
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-static yy_state_type yy_get_previous_state()
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp;
-
-	yy_current_state = yy_start;
-	yy_current_state += YY_AT_BOL();
-
-	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
-		{
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
-		if ( yy_accept[yy_current_state] )
-			{
-			yy_last_accepting_state = yy_current_state;
-			yy_last_accepting_cpos = yy_cp;
-			}
-		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-			{
-			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 107 )
-				yy_c = yy_meta[(unsigned int) yy_c];
-			}
-		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-		}
-
-	return yy_current_state;
-	}
-
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- *	next_state = yy_try_NUL_trans( current_state );
- */
-
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
-#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
-yy_state_type yy_current_state;
-#endif
-	{
-	register int yy_is_jam;
-	register char *yy_cp = yy_c_buf_p;
-
-	register YY_CHAR yy_c = 1;
-	if ( yy_accept[yy_current_state] )
-		{
-		yy_last_accepting_state = yy_current_state;
-		yy_last_accepting_cpos = yy_cp;
-		}
-	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-		{
-		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 107 )
-			yy_c = yy_meta[(unsigned int) yy_c];
-		}
-	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 106);
-
-	return yy_is_jam ? 0 : yy_current_state;
-	}
-
-
-#ifndef YY_NO_UNPUT
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-register char *yy_bp;
-#endif
-	{
-	register char *yy_cp = yy_c_buf_p;
-
-	/* undo effects of setting up yytext */
-	*yy_cp = yy_hold_char;
-
-	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-		{ /* need to shift things up to make room */
-		/* +2 for EOB chars. */
-		register int number_to_move = yy_n_chars + 2;
-		register char *dest = &yy_current_buffer->yy_ch_buf[
-					yy_current_buffer->yy_buf_size + 2];
-		register char *source =
-				&yy_current_buffer->yy_ch_buf[number_to_move];
-
-		while ( source > yy_current_buffer->yy_ch_buf )
-			*--dest = *--source;
-
-		yy_cp += (int) (dest - source);
-		yy_bp += (int) (dest - source);
-		yy_current_buffer->yy_n_chars =
-			yy_n_chars = yy_current_buffer->yy_buf_size;
-
-		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-			YY_FATAL_ERROR( "flex scanner push-back overflow" );
-		}
-
-	*--yy_cp = (char) c;
-
-
-	yytext_ptr = yy_bp;
-	yy_hold_char = *yy_cp;
-	yy_c_buf_p = yy_cp;
-	}
-#endif	/* ifndef YY_NO_UNPUT */
-
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput()
-#else
-static int input()
-#endif
-	{
-	int c;
-
-	*yy_c_buf_p = yy_hold_char;
-
-	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
-		{
-		/* yy_c_buf_p now points to the character we want to return.
-		 * If this occurs *before* the EOB characters, then it's a
-		 * valid NUL; if not, then we've hit the end of the buffer.
-		 */
-		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			/* This was really a NUL. */
-			*yy_c_buf_p = '\0';
-
-		else
-			{ /* need more input */
-			int offset = yy_c_buf_p - yytext_ptr;
-			++yy_c_buf_p;
-
-			switch ( yy_get_next_buffer() )
-				{
-				case EOB_ACT_LAST_MATCH:
-					/* This happens because yy_g_n_b()
-					 * sees that we've accumulated a
-					 * token and flags that we need to
-					 * try matching the token before
-					 * proceeding.  But for input(),
-					 * there's no matching to consider.
-					 * So convert the EOB_ACT_LAST_MATCH
-					 * to EOB_ACT_END_OF_FILE.
-					 */
-
-					/* Reset buffer status. */
-					yyrestart( yyin );
-
-					/* fall through */
-
-				case EOB_ACT_END_OF_FILE:
-					{
-					if ( yywrap() )
-						return EOF;
-
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-#ifdef __cplusplus
-					return yyinput();
-#else
-					return input();
-#endif
-					}
-
-				case EOB_ACT_CONTINUE_SCAN:
-					yy_c_buf_p = yytext_ptr + offset;
-					break;
-				}
-			}
-		}
-
-	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
-	*yy_c_buf_p = '\0';	/* preserve yytext */
-	yy_hold_char = *++yy_c_buf_p;
-
-	yy_current_buffer->yy_at_bol = (c == '\n');
-
-	return c;
-	}
-#endif /* YY_NO_INPUT */
-
-#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
-#else
-void yyrestart( input_file )
-FILE *input_file;
-#endif
-	{
-	if ( ! yy_current_buffer )
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
-
-	yy_init_buffer( yy_current_buffer, input_file );
-	yy_load_buffer_state();
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-#else
-void yy_switch_to_buffer( new_buffer )
-YY_BUFFER_STATE new_buffer;
-#endif
-	{
-	if ( yy_current_buffer == new_buffer )
-		return;
-
-	if ( yy_current_buffer )
-		{
-		/* Flush out information for old buffer. */
-		*yy_c_buf_p = yy_hold_char;
-		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	yy_current_buffer = new_buffer;
-	yy_load_buffer_state();
-
-	/* We don't actually know whether we did this switch during
-	 * EOF (yywrap()) processing, but the only time this flag
-	 * is looked at is after yywrap() is called, so it's safe
-	 * to go ahead and always set it.
-	 */
-	yy_did_buffer_switch_on_eof = 1;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
-#else
-void yy_load_buffer_state()
-#endif
-	{
-	yy_n_chars = yy_current_buffer->yy_n_chars;
-	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
-	yyin = yy_current_buffer->yy_input_file;
-	yy_hold_char = *yy_c_buf_p;
-	}
-
-
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
-#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
-	{
-	YY_BUFFER_STATE b;
-
-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_buf_size = size;
-
-	/* yy_ch_buf has to be 2 characters longer than the size given because
-	 * we need to put in 2 end-of-buffer characters.
-	 */
-	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
-	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_is_our_buffer = 1;
-
-	yy_init_buffer( b, file );
-
-	return b;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-	{
-	if ( ! b )
-		return;
-
-	if ( b == yy_current_buffer )
-		yy_current_buffer = (YY_BUFFER_STATE) 0;
-
-	if ( b->yy_is_our_buffer )
-		yy_flex_free( (void *) b->yy_ch_buf );
-
-	yy_flex_free( (void *) b );
-	}
-
-
-
-#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
-#else
-void yy_init_buffer( b, file )
-YY_BUFFER_STATE b;
-FILE *file;
-#endif
-
-
-	{
-	yy_flush_buffer( b );
-
-	b->yy_input_file = file;
-	b->yy_fill_buffer = 1;
-
-#if YY_ALWAYS_INTERACTIVE
-	b->yy_is_interactive = 1;
-#else
-#if YY_NEVER_INTERACTIVE
-	b->yy_is_interactive = 0;
-#else
-	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-#endif
-#endif
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
-#else
-void yy_flush_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-
-	{
-	if ( ! b )
-		return;
-
-	b->yy_n_chars = 0;
-
-	/* We always need two end-of-buffer characters.  The first causes
-	 * a transition to the end-of-buffer state.  The second causes
-	 * a jam in that state.
-	 */
-	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
-	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
-	b->yy_buf_pos = &b->yy_ch_buf[0];
-
-	b->yy_at_bol = 1;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	if ( b == yy_current_buffer )
-		yy_load_buffer_state();
-	}
-
-
-#ifndef YY_NO_SCAN_BUFFER
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
-#else
-YY_BUFFER_STATE yy_scan_buffer( base, size )
-char *base;
-yy_size_t size;
-#endif
-	{
-	YY_BUFFER_STATE b;
-
-	if ( size < 2 ||
-	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
-	     base[size-1] != YY_END_OF_BUFFER_CHAR )
-		/* They forgot to leave room for the EOB's. */
-		return 0;
-
-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
-
-	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
-	b->yy_buf_pos = b->yy_ch_buf = base;
-	b->yy_is_our_buffer = 0;
-	b->yy_input_file = 0;
-	b->yy_n_chars = b->yy_buf_size;
-	b->yy_is_interactive = 0;
-	b->yy_at_bol = 1;
-	b->yy_fill_buffer = 0;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	yy_switch_to_buffer( b );
-
-	return b;
-	}
-#endif
-
-
-#ifndef YY_NO_SCAN_STRING
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
-#else
-YY_BUFFER_STATE yy_scan_string( yy_str )
-yyconst char *yy_str;
-#endif
-	{
-	int len;
-	for ( len = 0; yy_str[len]; ++len )
-		;
-
-	return yy_scan_bytes( yy_str, len );
-	}
-#endif
-
-
-#ifndef YY_NO_SCAN_BYTES
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
-#else
-YY_BUFFER_STATE yy_scan_bytes( bytes, len )
-yyconst char *bytes;
-int len;
-#endif
-	{
-	YY_BUFFER_STATE b;
-	char *buf;
-	yy_size_t n;
-	int i;
-
-	/* Get memory for full buffer, including space for trailing EOB's. */
-	n = len + 2;
-	buf = (char *) yy_flex_alloc( n );
-	if ( ! buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
-
-	for ( i = 0; i < len; ++i )
-		buf[i] = bytes[i];
-
-	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
-
-	b = yy_scan_buffer( buf, n );
-	if ( ! b )
-		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
-
-	/* It's okay to grow etc. this buffer, and we should throw it
-	 * away when we're done.
-	 */
-	b->yy_is_our_buffer = 1;
-
-	return b;
-	}
-#endif
-
-
-#ifndef YY_NO_PUSH_STATE
-#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
-#else
-static void yy_push_state( new_state )
-int new_state;
-#endif
-	{
-	if ( yy_start_stack_ptr >= yy_start_stack_depth )
-		{
-		yy_size_t new_size;
-
-		yy_start_stack_depth += YY_START_STACK_INCR;
-		new_size = yy_start_stack_depth * sizeof( int );
-
-		if ( ! yy_start_stack )
-			yy_start_stack = (int *) yy_flex_alloc( new_size );
-
-		else
-			yy_start_stack = (int *) yy_flex_realloc(
-					(void *) yy_start_stack, new_size );
-
-		if ( ! yy_start_stack )
-			YY_FATAL_ERROR(
-			"out of memory expanding start-condition stack" );
-		}
-
-	yy_start_stack[yy_start_stack_ptr++] = YY_START;
-
-	BEGIN(new_state);
-	}
-#endif
-
-
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state()
-	{
-	if ( --yy_start_stack_ptr < 0 )
-		YY_FATAL_ERROR( "start-condition stack underflow" );
-
-	BEGIN(yy_start_stack[yy_start_stack_ptr]);
-	}
-#endif
-
-
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
-	{
-	return yy_start_stack[yy_start_stack_ptr - 1];
-	}
-#endif
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
-#else
-static void yy_fatal_error( msg )
-char msg[];
-#endif
-	{
-	(void) fprintf( stderr, "%s\n", msg );
-	exit( YY_EXIT_FAILURE );
-	}
-
-
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		yytext[yyleng] = yy_hold_char; \
-		yy_c_buf_p = yytext + n; \
-		yy_hold_char = *yy_c_buf_p; \
-		*yy_c_buf_p = '\0'; \
-		yyleng = n; \
-		} \
-	while ( 0 )
-
-
-/* Internal utility routines. */
-
-#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-yyconst char *s2;
-int n;
-#endif
-	{
-	register int i;
-	for ( i = 0; i < n; ++i )
-		s1[i] = s2[i];
-	}
-#endif
-
-#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
-	{
-	register int n;
-	for ( n = 0; s[n]; ++n )
-		;
-
-	return n;
-	}
-#endif
-
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
-#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
-#endif
-	{
-	return (void *) malloc( size );
-	}
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
-#endif
-	{
-	/* The cast to (char *) in the following accommodates both
-	 * implementations that use char* generic pointers, and those
-	 * that use void* generic pointers.  It works with the latter
-	 * because both ANSI C and C++ allow castless assignment from
-	 * any pointer type to void*, and deal with argument conversions
-	 * as though doing an assignment.
-	 */
-	return (void *) realloc( (char *) ptr, size );
-	}
-
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
-	{
-	free( ptr );
-	}
-
-#if YY_MAIN
-int main()
-	{
-	yylex();
-	return 0;
-	}
-#endif
-#line 420 "../../../../testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex"
-
-
-static const int maxstacksize=500;
-static int bracestack[maxstacksize];
-
-static int top=0;
-static void pushbracestack(int brace_no) { bracestack[top++]=brace_no; }
-// static int topbracestack() { if(top) return bracestack[top-1]; else return -1; }
-// static int popbracestack() { return bracestack[--top]; }
-// static bool isemptystack() { return top==0; }
-
-
-static int adjust_new_line_counter()
-{
-    return 1;
-}
-
-static int num_of_newlines(char* s)
-{
-     int num = 0;
-     while(*s != '\0')
-        {
-          if(*s == '\n')
-               num++;
-          s++;
-        }
-     return num;
-}
-
-// This function is called by AttachPreprocessingInfoTreeTrav::evaluateInheritedAttribute()
-// function when the input node is a SgFile IR node.
-// int getFortranFreeFormatPreprocessorDirectives( std::string fileName )
-LexTokenStreamTypePointer
-getFortranFreeFormatPreprocessorDirectives( std::string fileName )
-   {
-     FILE *fp = NULL; 
-
-     ROSE_Fortran_free_format_token_stream_pointer = new LexTokenStreamType;
-     assert(ROSE_Fortran_free_format_token_stream_pointer != NULL);
-
-     globalFileName = fileName;
-
-  // printf ("In getFortranFreeFormatPreprocessorDirectives(): Lexical pass to retrieve the token stream (Opening Free Format Fortran file: %s) \n",fileName.c_str());
-
-     if(fileName.empty() == false) 
-        {
-          fp = fopen(fileName.c_str(), "r"); 
-          if (fp) 
-             { 
-            // printf ("opened file %s\n",fileName.c_str()); 
-            // exit(0);
-               yyin = fp; 
-               yylex(); 
-               fclose(fp);  
-             }
-            else 
-             {
-               printf ("Error: can't find the requested file (%s) \n",fileName.c_str()); 
-             }
-        }
-
-     assert(ROSE_Fortran_free_format_token_stream_pointer != NULL);
-     return ROSE_Fortran_free_format_token_stream_pointer;
-   }
-
-void
-clean_up_stream()
-{
-    //
-    //This "rudimentary" post processing of the token stream helps in correct identification of keywords.
-
-    //int e g e r 
-    //is a sequence of identifiers
-    //recognize the token_ids and map them.
-    //If the tokens are 
-
-
-#if 0
-    for(SE_ITR ii = ROSE_Fortran_free_format_token_stream_pointer->begin(); ii != ROSE_Fortran_free_format_token_stream_pointer->end(); ii++)
-    {
-        if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_COMMENTS)
-        { 
-            cout<<"## COMMENT -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        }
-        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_STRING_LITERALS)
-        {
-            cout<<"## STRING_LIT -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        }
-        else if(((*ii)->p_tok_elem->token_id > 2) && ((*ii)->p_tok_elem->token_id < 67))
-        {
-            cout<<"## KEYWORD -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        } 
-        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_IDENTIFIER)
-        {
-            cout<<"## IDENTIFIER -->";
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        } 
-        else
-        {
-            cout<<"## ????Unrecognized element in the token stream##"; 
-        }
-        cout<<"\n"; 
- 
-    }
-#endif
-}
-
-#if 0
-int main(int argc, char *argv[])
-{
-    if(argc == 1) 
-    {   //The "default" for now
-        getFortranFreeFormatPreprocessorDirectives("triangle.f90");
-    }
-    else
-    {
-        getFortranFreeFormatPreprocessorDirectives(argv[1]);
-    }
-
-    clean_up_stream();
-
-    printf("*****************here is the stream *************\n"); 
-    for(SE_ITR ii = ROSE_Fortran_free_format_token_stream.begin(); ii != ROSE_Fortran_free_format_token_stream.end(); ii++)
-    {
-        if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_COMMENTS)
-        { 
-            cout<<"## COMMENT -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        }
-        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_STRING_LITERALS)
-        {
-            cout<<"## STRING_LIT -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        }
-        else if(((*ii)->p_tok_elem->token_id > 2) && ((*ii)->p_tok_elem->token_id < 67))
-        {
-            cout<<"## KEYWORD -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        } 
-        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_IDENTIFIER)
-        {
-            cout<<"## IDENTIFIER -->";
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        } 
-        else
-        {
-            cout<<"## ????Unrecognized element in the token stream##"; 
-        }
-        cout<<"\n"; 
- 
-    }
-    printf("*****************the stream is over*************\n"); 
-
-    return 1;
-}
-
-#endif
-// }//This ends the namespace Rose_Fortran_free_format_namespace
-

Deleted: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.lex	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,597 +0,0 @@
-%option noyywrap
-%{
-/* 
-Version 0.2.1 of FORTRAN scanner.
-03-09-2007: Written by Ramakrishna Upadrasta and Dan Quinlan.
-
-In an input free formatted FORTRAN file, this scanner recognizes the following
-the ROSE sequence point in a FORTRAN file
-     comments (beginning with ! and extendig till the end of the line)
-     string literals (enclosed by single quotes '')
-     Keywords (the list is provided in this code)
-*/
-
-
-/*
--------------------------------------------------------------------------------------
-New in the current release:
-    Better data structures for the keywords
-    scripts to generate the header files automatically
-    preliminary macro processing
--------------------------------------------------------------------------------------
-*/
-
-/*
--------------------------------------------------------------------------------------
-Acknowledgements:
--------------------------------------------------------------------------------------
-The authors (Dan and Rama) looked at the source codes of GFORTRAN as well as G95. 
-We gratefully acknowledge the authors of GFORTRAN and G95.
-*/
-
-/*
--------------------------------------------------------------------------------------
-Limitations: 
--------------------------------------------------------------------------------------
-The authors (Rama and Dan) recognize many of the limitations. 
-They will be tabulated later.
-*/
-
-/*
-There are three scanners in the ROSE frontend. One for C/C++, two for fixed and free 
-format FORTRAN languages. So that the flex generated C code and definitions (yylex, 
-yytext, etc.) of these does not interfere with any other, we are adding 
-     the prefix 'Rose_Fortran_C_Cxx_'        for the C/C++ scanner,
-     the prefix 'Rose_Fortran_Fixed_Format_' for the Fixed Format FORTRAN scanner and
-     the prefix 'Rose_Fortran_Free_Format_'  for the Free Format FORTRAN scanner
-by using the -P<prefix options>
-Note: We could have done this in an arguably more elegant way by changing the individual uses of these 
-functions/variables.
-*/
-#define yytext Rose_Fortran_free_format_text
-#define yylex Rose_Fortran_free_format_lex 
-
-
-
-
-
-#include <iostream>
-#include <stdio.h>
-#include <ctype.h>
-#include <string>
-#include <list>
-
-#include "rose.h"
-
-using namespace std;
-
-// namespace Rose_Fortran_free_format_namespace {
-
-#include "general_token_defs.h"
-#include "./rose_fortran_token_maps.h"
-
-#if 0
-// These are now defined in general_defs.h
-struct file_pos_info
-{
-    int line_num;
-    int column_num;
-};
-
-struct stream_element
-{ 
-    struct token_element * p_tok_elem;
-    struct file_pos_info beginning_fpi;
-    struct file_pos_info ending_fpi;
-};
-#endif
-
-// DQ (1/21/2008): Modified this to be a pointer so it could be built and returned to ROSE.
-LexTokenStreamTypePointer ROSE_Fortran_free_format_token_stream_pointer = NULL;
-
-typedef LexTokenStreamType::iterator SE_ITR;
-
-static struct file_pos_info curr_beginning;
-
-//Operators
-//This includes the "new" as well as the "old" operators
-token_element ROSE_Fortran_Operator_map[] = 
-{
-      {"+",       SgToken::FORTRAN_INTRINSIC_PLUS},            /*   GFORTRAN/G95 equivalent is INTRINSIC_PLUS      */
-      {"-",       SgToken::FORTRAN_INTRINSIC_MINUS},           /*   GFORTRAN/G95 equivalent is INTRINSIC_MINUS     */
-      {"**",      SgToken::FORTRAN_INTRINSIC_POWER},           /*   GFORTRAN/G95 equivalent is INTRINSIC_POWER     */
-      {"//",      SgToken::FORTRAN_INTRINSIC_CONCAT},          /*   GFORTRAN/G95 equivalent is INTRINSIC_CONCAT    */
-      {"*",       SgToken::FORTRAN_INTRINSIC_TIMES},           /*   GFORTRAN/G95 equivalent is INTRINSIC_TIMES     */
-      {"/",       SgToken::FORTRAN_INTRINSIC_DIVIDE},          /*   GFORTRAN/G95 equivalent is INTRINSIC_DIVIDE    */
-      {".and.",   SgToken::FORTRAN_INTRINSIC_AND},             /*   GFORTRAN/G95 equivalent is INTRINSIC_AND       */
-      {".or.",    SgToken::FORTRAN_INTRINSIC_OR},              /*   GFORTRAN/G95 equivalent is INTRINSIC_OR        */
-      {".eqv.",   SgToken::FORTRAN_INTRINSIC_EQV},             /*   GFORTRAN/G95 equivalent is INTRINSIC_EQV       */
-      {".neqv.",  SgToken::FORTRAN_INTRINSIC_NEQV},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
-      //{".true.",  SgToken::FORTRAN_TRUE},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
-      //{".false.",  SgToken::FORTRAN_FALSE},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
-      {"==",      SgToken::FORTRAN_INTRINSIC_EQ},              /*   GFORTRAN/G95 equivalent is INTRINSIC_EQ        */
-      {"/=",      SgToken::FORTRAN_INTRINSIC_NE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_NE        */
-      {">=",      SgToken::FORTRAN_INTRINSIC_GE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_GE        */
-      {"<=",      SgToken::FORTRAN_INTRINSIC_LE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_LE        */
-      {"<",       SgToken::FORTRAN_INTRINSIC_LT},              /*   GFORTRAN/G95 equivalent is INTRINSIC_LT        */
-      {">",       SgToken::FORTRAN_INTRINSIC_GT},              /*   GFORTRAN/G95 equivalent is INTRINSIC_GT        */
-      {".not.",   SgToken::FORTRAN_INTRINSIC_NOT},             /*   GFORTRAN/G95 equivalent is INTRINSIC_NOT       */
-      {".eq.",    SgToken::FORTRAN_INTRINSIC_OLDEQ},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDEQ     */
-      {".ne.",    SgToken::FORTRAN_INTRINSIC_OLDNE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDNE     */
-      {".ge.",    SgToken::FORTRAN_INTRINSIC_OLDGE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDGE     */
-      {".le.",    SgToken::FORTRAN_INTRINSIC_OLDLE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDLE     */
-      {".lt.",    SgToken::FORTRAN_INTRINSIC_OLDLT},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDLT     */
-      {".gt.",    SgToken::FORTRAN_INTRINSIC_OLDGT}            /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDGT     */
-};
-
-
-//We know that this is a magic number. 
-//We also know how to fix it.
-#define NUM_KEYWORDS 67
-
-//returns -1 if the string is not a keyword
-//otherwise returns the token ID
-static int identify_if_keyword(string str)
-{
-    //In FORTRAN, the identifiers are case insensitive.
-    //So, variable 'ArEa' is the same as 'aReA'
-
-    string lowered_str;
-    for(unsigned int i = 0; i < strlen(str.c_str()); i++)
-    {
-        lowered_str += (unsigned char)tolower(char((str.c_str())[i]));
-    }
-
-    //printf("got called with %s. Converted to %s\n", str.c_str(), lowered_str.c_str());
-    for(int i = 0; i < NUM_KEYWORDS; i++)
-    {
-        if(lowered_str == ROSE_Fortran_keyword_map[i].token_lexeme)
-        {
-            return (ROSE_Fortran_keyword_map[i].token_id);
-        }
-    }
-    return -1;
-}
-
-//We know that this is a magic number. 
-//It will be fixed.
-#define NUM_OPERATORS 23
-
-#if 0
-static int identify_operator_matching(string str)
-{
-    //printf("got called with %s. \n", str.c_str());
-
-    for(int i = 0; i < NUM_OPERATORS; i++)
-    {
-        if(str == ROSE_Fortran_Operator_map[i].token_lexeme)
-        {
-            return (ROSE_Fortran_Operator_map[i].token_id);
-        }
-    }
-    return -1;
-}
-#endif
-
-static void process_operator(string op) 
-{
-
-}
-
-
-//This could be handled in a fashion better than a MACRO, but for now this will work
-/*
-#define process_operator(op) {  \
-    token_element *p_tok_elem = new token_element;  \
-    p_tok_elem->token_lexeme = yytext; \
-    int rr = identify_if_keyword(yytext); \
-    stream_element *p_se = new stream_element;  \
-    p_se->p_tok_elem = p_tok_elem; \
-    p_se->beginning_fpi.line_num = line_no; \
-    p_se->beginning_fpi.column_num = column_no; \
-    column_no+=strlen(yytext); \
-    p_se->ending_fpi.line_num = line_no; \
-    p_se->ending_fpi.column_num = column_no-1; \
-    ROSE_Fortran_free_format_token_stream.push_back(p_se);  \
-} \
-
-*/
-
-static void process_operator(string op);
-
-#define YY_NO_UNPUT
-
-// static int i = 0;
-static std::string currentBuffer;
-
-// DQ (4/19/2006):
-// Store the name of the current file so that we can generate Sg_File_Info objects
-// for each comment.  Later we might want starting and ending fileInfo for each 
-// comments and CPP directive.
-static std::string globalFileName;
-
-#define FORTRAN_LEXICAL_SUPPORT 0
-
-//struct matching_construct
-static int braces_no=0;
-// static int brace_counting_on=0;
-
-// static int topbracestack();
-static void pushbracestack(int);
-// static int popbracestack();
-// static bool isemptystack();
-
-static int num_of_newlines(char*);
-static int adjust_new_line_counter();
-
-using namespace std;
-//#undef yywrap
-
-
-%}
-
-whitespacenl                  [\t\n ]+
-whitespace                    [\t ]+
-alphanum                      [0-9A-Za-z]  
-
-lineprefix                   ^{whitespace}*"#"{whitespace}*
-macrokeyword                 "include"|"define"|"undef"|"line"|"error"|"warning"|"if"|"ifdef"|"ifndef"|"elif"|"else"|"endif"
-
-mlinkagespecification        ^{whitespace}*"extern"{whitespace}*(("\"C\"")|("\"C++\"")){whitespacenl}*"{"
-
-%s NORMAL FORT_COMMENT STRING_LIT MACRO 
-%%
-
-%{
-#undef Rose_Fortran_Free_Format_wrap
-          int line_no = 1;
-          int start_line_no = line_no;
-          int column_no = 1;
-          int start_column_no = column_no;
-          BEGIN NORMAL;
-%}
-
-<NORMAL>{mlinkagespecification} { 
-                                    /*preprocessorList.addElement(PreprocessingInfo::ClinkageSpecificationStart, 
-                                            yytext,globalFileName,line_no,column_no,0); 
-                                            */
-                                    braces_no++; 
-                                    line_no+=num_of_newlines(yytext); 
-                                    column_no+=strlen(yytext); 
-                                    pushbracestack(braces_no); 
-                   }
-<NORMAL>"!"    {
-                    start_line_no=line_no; 
-                    start_column_no=column_no; 
-                    curr_beginning.line_num = line_no;
-                    curr_beginning.column_num = column_no;
-                    column_no+=1; 
-                    currentBuffer = yytext; 
-                    BEGIN FORT_COMMENT; 
-               }
-<NORMAL>"'"    {
-                    /*This begins a STRING LITERAL*/
-                    start_line_no=line_no; 
-                    start_column_no=column_no; 
-                    curr_beginning.line_num = line_no;
-                    curr_beginning.column_num = column_no;
-                    column_no+=1; 
-                    currentBuffer = yytext; 
-                    BEGIN STRING_LIT;
-               }
-<NORMAL>\n                           { line_no++; column_no=1; } 
-<NORMAL>[a-zA-Z_][a-zA-Z0-9_]*       { 
-                                          
-                                          token_element *p_tok_elem = new token_element; 
-                                          p_tok_elem->token_lexeme = yytext; 
-
-                                          int is_keyword = identify_if_keyword(yytext); 
-                                          //found a keyword?
-                                          if(is_keyword != -1)
-                                          {
-                                              //printf("%s is a keyword\n", yytext); 
-                                              p_tok_elem->token_id = is_keyword; 
-                                          }
-                                          else
-                                          {
-                                              //printf("%s is not a keyword\n", yytext); 
-                                              p_tok_elem->token_id = SgToken::FORTRAN_IDENTIFIER;
-                                          }
-                                          
-                                          stream_element *p_se = new stream_element; 
-                                          p_se->p_tok_elem = p_tok_elem; 
-                                          
-                                          p_se->beginning_fpi.line_num = line_no;
-                                          p_se->beginning_fpi.column_num = column_no;
-                                          column_no+=strlen(yytext); 
-                                          p_se->ending_fpi.line_num = line_no; 
-                                          p_se->ending_fpi.column_num = column_no-1; 
-                                          //push the element onto the token stream
-                                          ROSE_Fortran_free_format_token_stream_pointer->push_back(p_se); 
-                                    }
-<NORMAL>"+"        {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>"-"        {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>"**"       {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>"//"       {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>"*"        {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>"/"        {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>".and."    {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>".or."     {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>".eqv."    {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>".neqv."   {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>"=="       {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>"/="       {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>">="       {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>"<="       {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>"<"        {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>">"        {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>".not."    {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>".eq."     {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>".ne."     {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>".ge."     {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>".le."     {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>".lt."     {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>".gt."     {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>".true."     {process_operator(yytext);column_no+=strlen(yytext);} 
-<NORMAL>".false."     {process_operator(yytext);column_no+=strlen(yytext);}
-<NORMAL>";"        {/*Do stuff to store semi colons*/ /*process_operator(yytext);*/column_no+=strlen(yytext);}
-<NORMAL>","        {/*Do stuff to store commas*/ /*process_operator(yytext);*/column_no+=strlen(yytext);}
-<NORMAL>"::"       {/*Do stuff to store colons*/ /*process_operator(yytext);*/column_no+=strlen(yytext);}
-               /*
-<NORMAL>^[:blank:]*\n          {
-                                       //According to the STD, a line which has whitespaces is a comment line
-                                       //We will store it
-                                       printf("came across a blank line\n");
-                                       currentBuffer += yytext;
-
-                                       token_element *p_tok_elem = new token_element;
-                                       p_tok_elem->token_lexeme = currentBuffer;
-                                       p_tok_elem->token_id = SgToken::FORTRAN_COMMENTS;
-           
-                                       stream_element *p_se = new stream_element;
-                                       p_se->p_tok_elem = p_tok_elem;
-
-                                       p_se->beginning_fpi.line_num = line_no; 
-                                       p_se->beginning_fpi.column_num = column_no;
-
-                                       p_se->ending_fpi.line_num = line_no;
-                                       p_se->ending_fpi.column_num = column_no;
-                                       ROSE_Fortran_free_format_token_stream_pointer->push_back(p_se);
-
-                                       line_no++; column_no=1;
-                                  }
-                                  */
-<NORMAL>.               {column_no++;}
-<STRING_LIT>[^']        {
-                            column_no++; 
-                            currentBuffer += yytext;
-                        }
-<STRING_LIT>''          {
-                            column_no+=2; 
-                            currentBuffer += yytext;
-                        }
-<STRING_LIT>"'"         { 
-                            //This ends the STRING LITERALS
-                            currentBuffer += yytext;
-                            //printf("\nthe literal string is %s\n", currentBuffer.c_str());
-                            //printf("ending in (%d, %d) \n", line_no, column_no);
-
-                            adjust_new_line_counter();
-
-                            token_element *p_tok_elem = new token_element;
-                            p_tok_elem->token_lexeme = currentBuffer;
-                            p_tok_elem->token_id = SgToken::FORTRAN_STRING_LITERALS;
-
-                            stream_element *p_se = new stream_element;
-                            p_se->p_tok_elem = p_tok_elem;
-
-                            p_se->beginning_fpi = curr_beginning;
-                            p_se->ending_fpi.line_num = line_no;
-                            p_se->ending_fpi.column_num = column_no;
-
-                            ROSE_Fortran_free_format_token_stream_pointer->push_back(p_se);
-
-                            column_no++; 
-                            BEGIN NORMAL;
-                       }
-<FORT_COMMENT>\n       { 
-                            //This is also a comment
-                            currentBuffer += yytext;
-                            //printf("the comment string is %s", currentBuffer.c_str());
-
-                            token_element *p_tok_elem = new token_element;
-                            p_tok_elem->token_lexeme = currentBuffer;
-                            p_tok_elem->token_id = SgToken::FORTRAN_COMMENTS;
-
-                            stream_element *p_se = new stream_element;
-                            p_se->p_tok_elem = p_tok_elem;
-                            p_se->beginning_fpi = curr_beginning;
-                            p_se->ending_fpi.line_num = line_no;
-                            p_se->ending_fpi.column_num = column_no;
-                            ROSE_Fortran_free_format_token_stream_pointer->push_back(p_se);
-
-                            line_no++; column_no=1; 
-                            BEGIN NORMAL;
-                      }
-<FORT_COMMENT>.       { 
-                            column_no++; 
-                            currentBuffer += yytext;
-                      }
-%%
-
-static const int maxstacksize=500;
-static int bracestack[maxstacksize];
-
-static int top=0;
-static void pushbracestack(int brace_no) { bracestack[top++]=brace_no; }
-// static int topbracestack() { if(top) return bracestack[top-1]; else return -1; }
-// static int popbracestack() { return bracestack[--top]; }
-// static bool isemptystack() { return top==0; }
-
-
-static int adjust_new_line_counter()
-{
-    return 1;
-}
-
-static int num_of_newlines(char* s)
-{
-     int num = 0;
-     while(*s != '\0')
-        {
-          if(*s == '\n')
-               num++;
-          s++;
-        }
-     return num;
-}
-
-// This function is called by AttachPreprocessingInfoTreeTrav::evaluateInheritedAttribute()
-// function when the input node is a SgFile IR node.
-// int getFortranFreeFormatPreprocessorDirectives( std::string fileName )
-LexTokenStreamTypePointer
-getFortranFreeFormatPreprocessorDirectives( std::string fileName )
-   {
-     FILE *fp = NULL; 
-
-     ROSE_Fortran_free_format_token_stream_pointer = new LexTokenStreamType;
-     assert(ROSE_Fortran_free_format_token_stream_pointer != NULL);
-
-     globalFileName = fileName;
-
-  // printf ("In getFortranFreeFormatPreprocessorDirectives(): Lexical pass to retrieve the token stream (Opening Free Format Fortran file: %s) \n",fileName.c_str());
-
-     if(fileName.empty() == false) 
-        {
-          fp = fopen(fileName.c_str(), "r"); 
-          if (fp) 
-             { 
-            // printf ("opened file %s\n",fileName.c_str()); 
-            // exit(0);
-               yyin = fp; 
-               yylex(); 
-               fclose(fp);  
-             }
-            else 
-             {
-               printf ("Error: can't find the requested file (%s) \n",fileName.c_str()); 
-             }
-        }
-
-     assert(ROSE_Fortran_free_format_token_stream_pointer != NULL);
-     return ROSE_Fortran_free_format_token_stream_pointer;
-   }
-
-void
-clean_up_stream()
-{
-    //
-    //This "rudimentary" post processing of the token stream helps in correct identification of keywords.
-
-    //int e g e r 
-    //is a sequence of identifiers
-    //recognize the token_ids and map them.
-    //If the tokens are 
-
-
-#if 0
-    for(SE_ITR ii = ROSE_Fortran_free_format_token_stream_pointer->begin(); ii != ROSE_Fortran_free_format_token_stream_pointer->end(); ii++)
-    {
-        if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_COMMENTS)
-        { 
-            cout<<"## COMMENT -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        }
-        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_STRING_LITERALS)
-        {
-            cout<<"## STRING_LIT -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        }
-        else if(((*ii)->p_tok_elem->token_id > 2) && ((*ii)->p_tok_elem->token_id < 67))
-        {
-            cout<<"## KEYWORD -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        } 
-        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_IDENTIFIER)
-        {
-            cout<<"## IDENTIFIER -->";
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        } 
-        else
-        {
-            cout<<"## ????Unrecognized element in the token stream##"; 
-        }
-        cout<<"\n"; 
- 
-    }
-#endif
-}
-
-#if 0
-int main(int argc, char *argv[])
-{
-    if(argc == 1) 
-    {   //The "default" for now
-        getFortranFreeFormatPreprocessorDirectives("triangle.f90");
-    }
-    else
-    {
-        getFortranFreeFormatPreprocessorDirectives(argv[1]);
-    }
-
-    clean_up_stream();
-
-    printf("*****************here is the stream *************\n"); 
-    for(SE_ITR ii = ROSE_Fortran_free_format_token_stream.begin(); ii != ROSE_Fortran_free_format_token_stream.end(); ii++)
-    {
-        if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_COMMENTS)
-        { 
-            cout<<"## COMMENT -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        }
-        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_STRING_LITERALS)
-        {
-            cout<<"## STRING_LIT -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        }
-        else if(((*ii)->p_tok_elem->token_id > 2) && ((*ii)->p_tok_elem->token_id < 67))
-        {
-            cout<<"## KEYWORD -->"; 
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        } 
-        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_IDENTIFIER)
-        {
-            cout<<"## IDENTIFIER -->";
-            cout<<(*ii)->p_tok_elem->token_lexeme; 
-            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
-                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
-        } 
-        else
-        {
-            cout<<"## ????Unrecognized element in the token stream##"; 
-        }
-        cout<<"\n"; 
- 
-    }
-    printf("*****************the stream is over*************\n"); 
-
-    return 1;
-}
-
-#endif
-// }//This ends the namespace Rose_Fortran_free_format_namespace
-

Copied: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.ll (from rev 128, trunk/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.ll)
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.ll	                        (rev 0)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/preproc-fortran.ll	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,599 @@
+%option noyywrap
+%option prefix="Rose_Fortran_free_format_"
+%option outfile="lex.yy.c"
+%{
+/* 
+Version 0.2.1 of FORTRAN scanner.
+03-09-2007: Written by Ramakrishna Upadrasta and Dan Quinlan.
+
+In an input free formatted FORTRAN file, this scanner recognizes the following
+the ROSE sequence point in a FORTRAN file
+     comments (beginning with ! and extendig till the end of the line)
+     string literals (enclosed by single quotes '')
+     Keywords (the list is provided in this code)
+*/
+
+
+/*
+-------------------------------------------------------------------------------------
+New in the current release:
+    Better data structures for the keywords
+    scripts to generate the header files automatically
+    preliminary macro processing
+-------------------------------------------------------------------------------------
+*/
+
+/*
+-------------------------------------------------------------------------------------
+Acknowledgements:
+-------------------------------------------------------------------------------------
+The authors (Dan and Rama) looked at the source codes of GFORTRAN as well as G95. 
+We gratefully acknowledge the authors of GFORTRAN and G95.
+*/
+
+/*
+-------------------------------------------------------------------------------------
+Limitations: 
+-------------------------------------------------------------------------------------
+The authors (Rama and Dan) recognize many of the limitations. 
+They will be tabulated later.
+*/
+
+/*
+There are three scanners in the ROSE frontend. One for C/C++, two for fixed and free 
+format FORTRAN languages. So that the flex generated C code and definitions (yylex, 
+yytext, etc.) of these does not interfere with any other, we are adding 
+     the prefix 'Rose_Fortran_C_Cxx_'        for the C/C++ scanner,
+     the prefix 'Rose_Fortran_Fixed_Format_' for the Fixed Format FORTRAN scanner and
+     the prefix 'Rose_Fortran_Free_Format_'  for the Free Format FORTRAN scanner
+by using the -P<prefix options>
+Note: We could have done this in an arguably more elegant way by changing the individual uses of these 
+functions/variables.
+*/
+#define yytext Rose_Fortran_free_format_text
+#define yylex Rose_Fortran_free_format_lex 
+
+
+
+
+
+#include <iostream>
+#include <stdio.h>
+#include <ctype.h>
+#include <string>
+#include <list>
+
+#include "rose.h"
+
+using namespace std;
+
+// namespace Rose_Fortran_free_format_namespace {
+
+#include "general_token_defs.h"
+#include "./rose_fortran_token_maps.h"
+
+#if 0
+// These are now defined in general_defs.h
+struct file_pos_info
+{
+    int line_num;
+    int column_num;
+};
+
+struct stream_element
+{ 
+    struct token_element * p_tok_elem;
+    struct file_pos_info beginning_fpi;
+    struct file_pos_info ending_fpi;
+};
+#endif
+
+// DQ (1/21/2008): Modified this to be a pointer so it could be built and returned to ROSE.
+LexTokenStreamTypePointer ROSE_Fortran_free_format_token_stream_pointer = NULL;
+
+typedef LexTokenStreamType::iterator SE_ITR;
+
+static struct file_pos_info curr_beginning;
+
+//Operators
+//This includes the "new" as well as the "old" operators
+token_element ROSE_Fortran_Operator_map[] = 
+{
+      {"+",       SgToken::FORTRAN_INTRINSIC_PLUS},            /*   GFORTRAN/G95 equivalent is INTRINSIC_PLUS      */
+      {"-",       SgToken::FORTRAN_INTRINSIC_MINUS},           /*   GFORTRAN/G95 equivalent is INTRINSIC_MINUS     */
+      {"**",      SgToken::FORTRAN_INTRINSIC_POWER},           /*   GFORTRAN/G95 equivalent is INTRINSIC_POWER     */
+      {"//",      SgToken::FORTRAN_INTRINSIC_CONCAT},          /*   GFORTRAN/G95 equivalent is INTRINSIC_CONCAT    */
+      {"*",       SgToken::FORTRAN_INTRINSIC_TIMES},           /*   GFORTRAN/G95 equivalent is INTRINSIC_TIMES     */
+      {"/",       SgToken::FORTRAN_INTRINSIC_DIVIDE},          /*   GFORTRAN/G95 equivalent is INTRINSIC_DIVIDE    */
+      {".and.",   SgToken::FORTRAN_INTRINSIC_AND},             /*   GFORTRAN/G95 equivalent is INTRINSIC_AND       */
+      {".or.",    SgToken::FORTRAN_INTRINSIC_OR},              /*   GFORTRAN/G95 equivalent is INTRINSIC_OR        */
+      {".eqv.",   SgToken::FORTRAN_INTRINSIC_EQV},             /*   GFORTRAN/G95 equivalent is INTRINSIC_EQV       */
+      {".neqv.",  SgToken::FORTRAN_INTRINSIC_NEQV},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
+      //{".true.",  SgToken::FORTRAN_TRUE},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
+      //{".false.",  SgToken::FORTRAN_FALSE},            /*   GFORTRAN/G95 equivalent is INTRINSIC_NEQV      */
+      {"==",      SgToken::FORTRAN_INTRINSIC_EQ},              /*   GFORTRAN/G95 equivalent is INTRINSIC_EQ        */
+      {"/=",      SgToken::FORTRAN_INTRINSIC_NE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_NE        */
+      {">=",      SgToken::FORTRAN_INTRINSIC_GE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_GE        */
+      {"<=",      SgToken::FORTRAN_INTRINSIC_LE},              /*   GFORTRAN/G95 equivalent is INTRINSIC_LE        */
+      {"<",       SgToken::FORTRAN_INTRINSIC_LT},              /*   GFORTRAN/G95 equivalent is INTRINSIC_LT        */
+      {">",       SgToken::FORTRAN_INTRINSIC_GT},              /*   GFORTRAN/G95 equivalent is INTRINSIC_GT        */
+      {".not.",   SgToken::FORTRAN_INTRINSIC_NOT},             /*   GFORTRAN/G95 equivalent is INTRINSIC_NOT       */
+      {".eq.",    SgToken::FORTRAN_INTRINSIC_OLDEQ},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDEQ     */
+      {".ne.",    SgToken::FORTRAN_INTRINSIC_OLDNE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDNE     */
+      {".ge.",    SgToken::FORTRAN_INTRINSIC_OLDGE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDGE     */
+      {".le.",    SgToken::FORTRAN_INTRINSIC_OLDLE},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDLE     */
+      {".lt.",    SgToken::FORTRAN_INTRINSIC_OLDLT},           /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDLT     */
+      {".gt.",    SgToken::FORTRAN_INTRINSIC_OLDGT}            /*   GFORTRAN/G95 equivalent is INTRINSIC_OLDGT     */
+};
+
+
+//We know that this is a magic number. 
+//We also know how to fix it.
+#define NUM_KEYWORDS 67
+
+//returns -1 if the string is not a keyword
+//otherwise returns the token ID
+static int identify_if_keyword(string str)
+{
+    //In FORTRAN, the identifiers are case insensitive.
+    //So, variable 'ArEa' is the same as 'aReA'
+
+    string lowered_str;
+    for(unsigned int i = 0; i < strlen(str.c_str()); i++)
+    {
+        lowered_str += (unsigned char)tolower(char((str.c_str())[i]));
+    }
+
+    //printf("got called with %s. Converted to %s\n", str.c_str(), lowered_str.c_str());
+    for(int i = 0; i < NUM_KEYWORDS; i++)
+    {
+        if(lowered_str == ROSE_Fortran_keyword_map[i].token_lexeme)
+        {
+            return (ROSE_Fortran_keyword_map[i].token_id);
+        }
+    }
+    return -1;
+}
+
+//We know that this is a magic number. 
+//It will be fixed.
+#define NUM_OPERATORS 23
+
+#if 0
+static int identify_operator_matching(string str)
+{
+    //printf("got called with %s. \n", str.c_str());
+
+    for(int i = 0; i < NUM_OPERATORS; i++)
+    {
+        if(str == ROSE_Fortran_Operator_map[i].token_lexeme)
+        {
+            return (ROSE_Fortran_Operator_map[i].token_id);
+        }
+    }
+    return -1;
+}
+#endif
+
+static void process_operator(string op) 
+{
+
+}
+
+
+//This could be handled in a fashion better than a MACRO, but for now this will work
+/*
+#define process_operator(op) {  \
+    token_element *p_tok_elem = new token_element;  \
+    p_tok_elem->token_lexeme = yytext; \
+    int rr = identify_if_keyword(yytext); \
+    stream_element *p_se = new stream_element;  \
+    p_se->p_tok_elem = p_tok_elem; \
+    p_se->beginning_fpi.line_num = line_no; \
+    p_se->beginning_fpi.column_num = column_no; \
+    column_no+=strlen(yytext); \
+    p_se->ending_fpi.line_num = line_no; \
+    p_se->ending_fpi.column_num = column_no-1; \
+    ROSE_Fortran_free_format_token_stream.push_back(p_se);  \
+} \
+
+*/
+
+static void process_operator(string op);
+
+#define YY_NO_UNPUT
+
+// static int i = 0;
+static std::string currentBuffer;
+
+// DQ (4/19/2006):
+// Store the name of the current file so that we can generate Sg_File_Info objects
+// for each comment.  Later we might want starting and ending fileInfo for each 
+// comments and CPP directive.
+static std::string globalFileName;
+
+#define FORTRAN_LEXICAL_SUPPORT 0
+
+//struct matching_construct
+static int braces_no=0;
+// static int brace_counting_on=0;
+
+// static int topbracestack();
+static void pushbracestack(int);
+// static int popbracestack();
+// static bool isemptystack();
+
+static int num_of_newlines(char*);
+static int adjust_new_line_counter();
+
+using namespace std;
+//#undef yywrap
+
+
+%}
+
+whitespacenl                  [\t\n ]+
+whitespace                    [\t ]+
+alphanum                      [0-9A-Za-z]  
+
+lineprefix                   ^{whitespace}*"#"{whitespace}*
+macrokeyword                 "include"|"define"|"undef"|"line"|"error"|"warning"|"if"|"ifdef"|"ifndef"|"elif"|"else"|"endif"
+
+mlinkagespecification        ^{whitespace}*"extern"{whitespace}*(("\"C\"")|("\"C++\"")){whitespacenl}*"{"
+
+%s NORMAL FORT_COMMENT STRING_LIT MACRO 
+%%
+
+%{
+#undef Rose_Fortran_Free_Format_wrap
+          int line_no = 1;
+          int start_line_no = line_no;
+          int column_no = 1;
+          int start_column_no = column_no;
+          BEGIN NORMAL;
+%}
+
+<NORMAL>{mlinkagespecification} { 
+                                    /*preprocessorList.addElement(PreprocessingInfo::ClinkageSpecificationStart, 
+                                            yytext,globalFileName,line_no,column_no,0); 
+                                            */
+                                    braces_no++; 
+                                    line_no+=num_of_newlines(yytext); 
+                                    column_no+=strlen(yytext); 
+                                    pushbracestack(braces_no); 
+                   }
+<NORMAL>"!"    {
+                    start_line_no=line_no; 
+                    start_column_no=column_no; 
+                    curr_beginning.line_num = line_no;
+                    curr_beginning.column_num = column_no;
+                    column_no+=1; 
+                    currentBuffer = yytext; 
+                    BEGIN FORT_COMMENT; 
+               }
+<NORMAL>"'"    {
+                    /*This begins a STRING LITERAL*/
+                    start_line_no=line_no; 
+                    start_column_no=column_no; 
+                    curr_beginning.line_num = line_no;
+                    curr_beginning.column_num = column_no;
+                    column_no+=1; 
+                    currentBuffer = yytext; 
+                    BEGIN STRING_LIT;
+               }
+<NORMAL>\n                           { line_no++; column_no=1; } 
+<NORMAL>[a-zA-Z_][a-zA-Z0-9_]*       { 
+                                          
+                                          token_element *p_tok_elem = new token_element; 
+                                          p_tok_elem->token_lexeme = yytext; 
+
+                                          int is_keyword = identify_if_keyword(yytext); 
+                                          //found a keyword?
+                                          if(is_keyword != -1)
+                                          {
+                                              //printf("%s is a keyword\n", yytext); 
+                                              p_tok_elem->token_id = is_keyword; 
+                                          }
+                                          else
+                                          {
+                                              //printf("%s is not a keyword\n", yytext); 
+                                              p_tok_elem->token_id = SgToken::FORTRAN_IDENTIFIER;
+                                          }
+                                          
+                                          stream_element *p_se = new stream_element; 
+                                          p_se->p_tok_elem = p_tok_elem; 
+                                          
+                                          p_se->beginning_fpi.line_num = line_no;
+                                          p_se->beginning_fpi.column_num = column_no;
+                                          column_no+=strlen(yytext); 
+                                          p_se->ending_fpi.line_num = line_no; 
+                                          p_se->ending_fpi.column_num = column_no-1; 
+                                          //push the element onto the token stream
+                                          ROSE_Fortran_free_format_token_stream_pointer->push_back(p_se); 
+                                    }
+<NORMAL>"+"        {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>"-"        {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>"**"       {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>"//"       {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>"*"        {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>"/"        {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>".and."    {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>".or."     {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>".eqv."    {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>".neqv."   {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>"=="       {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>"/="       {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>">="       {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>"<="       {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>"<"        {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>">"        {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>".not."    {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>".eq."     {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>".ne."     {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>".ge."     {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>".le."     {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>".lt."     {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>".gt."     {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>".true."     {process_operator(yytext);column_no+=strlen(yytext);} 
+<NORMAL>".false."     {process_operator(yytext);column_no+=strlen(yytext);}
+<NORMAL>";"        {/*Do stuff to store semi colons*/ /*process_operator(yytext);*/column_no+=strlen(yytext);}
+<NORMAL>","        {/*Do stuff to store commas*/ /*process_operator(yytext);*/column_no+=strlen(yytext);}
+<NORMAL>"::"       {/*Do stuff to store colons*/ /*process_operator(yytext);*/column_no+=strlen(yytext);}
+               /*
+<NORMAL>^[:blank:]*\n          {
+                                       //According to the STD, a line which has whitespaces is a comment line
+                                       //We will store it
+                                       printf("came across a blank line\n");
+                                       currentBuffer += yytext;
+
+                                       token_element *p_tok_elem = new token_element;
+                                       p_tok_elem->token_lexeme = currentBuffer;
+                                       p_tok_elem->token_id = SgToken::FORTRAN_COMMENTS;
+           
+                                       stream_element *p_se = new stream_element;
+                                       p_se->p_tok_elem = p_tok_elem;
+
+                                       p_se->beginning_fpi.line_num = line_no; 
+                                       p_se->beginning_fpi.column_num = column_no;
+
+                                       p_se->ending_fpi.line_num = line_no;
+                                       p_se->ending_fpi.column_num = column_no;
+                                       ROSE_Fortran_free_format_token_stream_pointer->push_back(p_se);
+
+                                       line_no++; column_no=1;
+                                  }
+                                  */
+<NORMAL>.               {column_no++;}
+<STRING_LIT>[^']        {
+                            column_no++; 
+                            currentBuffer += yytext;
+                        }
+<STRING_LIT>''          {
+                            column_no+=2; 
+                            currentBuffer += yytext;
+                        }
+<STRING_LIT>"'"         { 
+                            //This ends the STRING LITERALS
+                            currentBuffer += yytext;
+                            //printf("\nthe literal string is %s\n", currentBuffer.c_str());
+                            //printf("ending in (%d, %d) \n", line_no, column_no);
+
+                            adjust_new_line_counter();
+
+                            token_element *p_tok_elem = new token_element;
+                            p_tok_elem->token_lexeme = currentBuffer;
+                            p_tok_elem->token_id = SgToken::FORTRAN_STRING_LITERALS;
+
+                            stream_element *p_se = new stream_element;
+                            p_se->p_tok_elem = p_tok_elem;
+
+                            p_se->beginning_fpi = curr_beginning;
+                            p_se->ending_fpi.line_num = line_no;
+                            p_se->ending_fpi.column_num = column_no;
+
+                            ROSE_Fortran_free_format_token_stream_pointer->push_back(p_se);
+
+                            column_no++; 
+                            BEGIN NORMAL;
+                       }
+<FORT_COMMENT>\n       { 
+                            //This is also a comment
+                            currentBuffer += yytext;
+                            //printf("the comment string is %s", currentBuffer.c_str());
+
+                            token_element *p_tok_elem = new token_element;
+                            p_tok_elem->token_lexeme = currentBuffer;
+                            p_tok_elem->token_id = SgToken::FORTRAN_COMMENTS;
+
+                            stream_element *p_se = new stream_element;
+                            p_se->p_tok_elem = p_tok_elem;
+                            p_se->beginning_fpi = curr_beginning;
+                            p_se->ending_fpi.line_num = line_no;
+                            p_se->ending_fpi.column_num = column_no;
+                            ROSE_Fortran_free_format_token_stream_pointer->push_back(p_se);
+
+                            line_no++; column_no=1; 
+                            BEGIN NORMAL;
+                      }
+<FORT_COMMENT>.       { 
+                            column_no++; 
+                            currentBuffer += yytext;
+                      }
+%%
+
+static const int maxstacksize=500;
+static int bracestack[maxstacksize];
+
+static int top=0;
+static void pushbracestack(int brace_no) { bracestack[top++]=brace_no; }
+// static int topbracestack() { if(top) return bracestack[top-1]; else return -1; }
+// static int popbracestack() { return bracestack[--top]; }
+// static bool isemptystack() { return top==0; }
+
+
+static int adjust_new_line_counter()
+{
+    return 1;
+}
+
+static int num_of_newlines(char* s)
+{
+     int num = 0;
+     while(*s != '\0')
+        {
+          if(*s == '\n')
+               num++;
+          s++;
+        }
+     return num;
+}
+
+// This function is called by AttachPreprocessingInfoTreeTrav::evaluateInheritedAttribute()
+// function when the input node is a SgFile IR node.
+// int getFortranFreeFormatPreprocessorDirectives( std::string fileName )
+LexTokenStreamTypePointer
+getFortranFreeFormatPreprocessorDirectives( std::string fileName )
+   {
+     FILE *fp = NULL; 
+
+     ROSE_Fortran_free_format_token_stream_pointer = new LexTokenStreamType;
+     assert(ROSE_Fortran_free_format_token_stream_pointer != NULL);
+
+     globalFileName = fileName;
+
+  // printf ("In getFortranFreeFormatPreprocessorDirectives(): Lexical pass to retrieve the token stream (Opening Free Format Fortran file: %s) \n",fileName.c_str());
+
+     if(fileName.empty() == false) 
+        {
+          fp = fopen(fileName.c_str(), "r"); 
+          if (fp) 
+             { 
+            // printf ("opened file %s\n",fileName.c_str()); 
+            // exit(0);
+               yyin = fp; 
+               yylex(); 
+               fclose(fp);  
+             }
+            else 
+             {
+               printf ("Error: can't find the requested file (%s) \n",fileName.c_str()); 
+             }
+        }
+
+     assert(ROSE_Fortran_free_format_token_stream_pointer != NULL);
+     return ROSE_Fortran_free_format_token_stream_pointer;
+   }
+
+void
+clean_up_stream()
+{
+    //
+    //This "rudimentary" post processing of the token stream helps in correct identification of keywords.
+
+    //int e g e r 
+    //is a sequence of identifiers
+    //recognize the token_ids and map them.
+    //If the tokens are 
+
+
+#if 0
+    for(SE_ITR ii = ROSE_Fortran_free_format_token_stream_pointer->begin(); ii != ROSE_Fortran_free_format_token_stream_pointer->end(); ii++)
+    {
+        if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_COMMENTS)
+        { 
+            cout<<"## COMMENT -->"; 
+            cout<<(*ii)->p_tok_elem->token_lexeme; 
+            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
+                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
+        }
+        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_STRING_LITERALS)
+        {
+            cout<<"## STRING_LIT -->"; 
+            cout<<(*ii)->p_tok_elem->token_lexeme; 
+            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
+                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
+        }
+        else if(((*ii)->p_tok_elem->token_id > 2) && ((*ii)->p_tok_elem->token_id < 67))
+        {
+            cout<<"## KEYWORD -->"; 
+            cout<<(*ii)->p_tok_elem->token_lexeme; 
+            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
+                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
+        } 
+        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_IDENTIFIER)
+        {
+            cout<<"## IDENTIFIER -->";
+            cout<<(*ii)->p_tok_elem->token_lexeme; 
+            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
+                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
+        } 
+        else
+        {
+            cout<<"## ????Unrecognized element in the token stream##"; 
+        }
+        cout<<"\n"; 
+ 
+    }
+#endif
+}
+
+#if 0
+int main(int argc, char *argv[])
+{
+    if(argc == 1) 
+    {   //The "default" for now
+        getFortranFreeFormatPreprocessorDirectives("triangle.f90");
+    }
+    else
+    {
+        getFortranFreeFormatPreprocessorDirectives(argv[1]);
+    }
+
+    clean_up_stream();
+
+    printf("*****************here is the stream *************\n"); 
+    for(SE_ITR ii = ROSE_Fortran_free_format_token_stream.begin(); ii != ROSE_Fortran_free_format_token_stream.end(); ii++)
+    {
+        if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_COMMENTS)
+        { 
+            cout<<"## COMMENT -->"; 
+            cout<<(*ii)->p_tok_elem->token_lexeme; 
+            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
+                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
+        }
+        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_STRING_LITERALS)
+        {
+            cout<<"## STRING_LIT -->"; 
+            cout<<(*ii)->p_tok_elem->token_lexeme; 
+            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
+                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
+        }
+        else if(((*ii)->p_tok_elem->token_id > 2) && ((*ii)->p_tok_elem->token_id < 67))
+        {
+            cout<<"## KEYWORD -->"; 
+            cout<<(*ii)->p_tok_elem->token_lexeme; 
+            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
+                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
+        } 
+        else if((*ii)->p_tok_elem->token_id == SgToken::FORTRAN_IDENTIFIER)
+        {
+            cout<<"## IDENTIFIER -->";
+            cout<<(*ii)->p_tok_elem->token_lexeme; 
+            cout<<"<-- From "<<"("<<(*ii)->beginning_fpi.line_num<<","<<(*ii)->beginning_fpi.column_num<<") to " 
+                <<"("<<(*ii)->ending_fpi.line_num<<","<<(*ii)->ending_fpi.column_num<<")";
+        } 
+        else
+        {
+            cout<<"## ????Unrecognized element in the token stream##"; 
+        }
+        cout<<"\n"; 
+ 
+    }
+    printf("*****************the stream is over*************\n"); 
+
+    return 1;
+}
+
+#endif
+// }//This ends the namespace Rose_Fortran_free_format_namespace
+

Modified: branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/token.c
===================================================================
--- branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/token.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/OpenFortranParser_SAGE_Connection/token.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -71,6 +71,11 @@
 		if(token_list[i] != NULL)
 		  free_token(token_list[i]);
 
+         if (num_tokens > 0) {
+           free(token_list);
+           token_list = NULL;
+         }
+
 	 return;
   }
 

Modified: branches/testonly/src/frontend/SageIII/Makefile.am
===================================================================
--- branches/testonly/src/frontend/SageIII/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -17,24 +17,16 @@
 ## The grammar generator (ROSETTA) should use its own template repository
 CXX_TEMPLATE_REPOSITORY_PATH = .
 
-# Bugfix (10/17/2001)
-# For development we want to build the lex.yy.c file from the  preproc.lex file
-# but for distributions we want to use the distributed lex.yy.c file
-$(srcdir)/preproc.C : preproc.lex
-	$(LEX) -PRose_C_Cxx_ -o$(srcdir)/preproc.C $(srcdir)/preproc.lex
-
-preproc.o : $(srcdir)/preproc.C
-	$(CXXCOMPILE) -D__EXTERN_C__ -c $(srcdir)/preproc.C -o $@
-
 # Copy the original lex file and the C++ file generated from it to the distribution
 # so that users don't have to find an appropriate version of lex (flex).  Flex should
 # be used by developers so that ANSI C code is generated for g++.  This is something
 # for developers to worry about in the generation of sufficently portable distributions.
 # EXTRA_DIST = preproc.lex preproc.C sageClasses.docs sage.docs.in docs
 # EXTRA_DIST = preproc.lex preproc.C astGraphTemplate.C docs
-EXTRA_DIST = preproc.lex preproc.C docs rtiHelpers.h attributeListMap.h \
-            advanced_preprocessing_hooks.h rose_attributes_list.h
-CLEANFILES = preproc.o haveRosettaGeneratedSource
+EXTRA_DIST = preproc.ll docs rtiHelpers.h attributeListMap.h \
+            advanced_preprocessing_hooks.h rose_attributes_list.h dwarfSupport.h
+CLEANFILES = haveRosettaGeneratedSource
+DISTCLEANFILES = preproc.cc
 
 
 # DQ (10/18/2007): Added AST_FILE_IO.C StorageClasses.C
@@ -59,7 +51,7 @@
 	StorageClasses.h \
 	StorageClasses.C \
 	Cxx_GrammarReturnDataMemberPointers.C \
-	Cxx_GrammarReturnDataMemberReferenceToPointers.C \
+	Cxx_GrammarProcessDataMemberReferenceToPointers.C \
 	Cxx_GrammarNewConstructors.C \
 	Cxx_GrammarGetChildIndex.C
 
@@ -84,7 +76,10 @@
    fixupCopy_symbols.C \
    fixupCopy_references.C \
    rtiHelpers.C \
-   virtualCfgMemberFunctions.C
+   virtualCfgMemberFunctions.C \
+   OmpAttribute.C \
+   dwarfSupport.C
+
 # $(GENERATED_SOURCE) is handled separately
 
 # DQ (5/27/2007): Files moved or removed
@@ -97,7 +92,7 @@
 
 noinst_LTLIBRARIES = libsage3.la
 
-libsage3_la_SOURCES = $(libsage3Sources) preproc.C rose_paths.h
+libsage3_la_SOURCES = $(libsage3Sources) preproc.ll rose_paths.h
 nodist_libsage3_la_SOURCES = $(GENERATED_SOURCE) $(top_builddir)/rose_config.h
 
 if ROSE_USE_BOOST_WAVE
@@ -136,7 +131,8 @@
    attachPreprocessingInfo.h \
    attach_all_info.h manglingSupport.h C++_include_files.h \
    fixupCopy.h \
-   general_token_defs.h rose_paths.h rtiHelpers.h
+   general_token_defs.h rose_paths.h rtiHelpers.h \
+   OmpAttribute.h omp.h dwarfSupport.h
 
 nodist_include_HEADERS = \
    Cxx_Grammar.h \

Copied: branches/testonly/src/frontend/SageIII/OmpAttribute.C (from rev 128, trunk/src/frontend/SageIII/OmpAttribute.C)
===================================================================
--- branches/testonly/src/frontend/SageIII/OmpAttribute.C	                        (rev 0)
+++ branches/testonly/src/frontend/SageIII/OmpAttribute.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,541 @@
+// Refined OmpAttribute connected to a parser using Bison
+//Liao, 9/18/2008
+//
+#include "OmpAttribute.h"
+#include <algorithm>
+using namespace std;
+using namespace SageInterface;
+using namespace SageBuilder;
+
+namespace OmpSupport{
+  //! A builder for OmpAttribute
+  OmpAttribute* buildOmpAttribute(omp_construct_enum directive_type, SgNode* node)
+  {
+    OmpAttribute* result = new OmpAttribute(directive_type,node);
+    ROSE_ASSERT(result);
+    return result;
+  }
+
+    //! Add OmpAttribute to a SgNode
+  void addOmpAttribute(OmpAttribute* ompattribute, SgNode* node)
+  {
+    ROSE_ASSERT(node);
+    ROSE_ASSERT(ompattribute);
+    node->addNewAttribute("OmpAttribute",ompattribute);
+  }
+
+  //! Get OmpAttribute from a SgNode
+  OmpAttribute* getOmpAttribute(SgNode* node)
+  {
+     OmpAttribute* result = NULL;
+     AstAttribute* astattribute=node->getAttribute("OmpAttribute");
+     if (astattribute)
+       result = dynamic_cast<OmpAttribute* > (astattribute);
+     return result;  
+  }
+
+   //!Add a clause into an OpenMP directive, the content of the clause is set by other interface, such as addVariable(), addExpression() , setReductionOperator() etc.
+   void OmpAttribute::addClause(omp_construct_enum clause_type)
+   {
+     if (isClause(clause_type))
+     {
+       //We only store a clause type once
+       //Logically, the content will be merged into the first occurence.
+       if (!hasClause(clause_type))
+       { 
+        clause_map[clause_type]=true;
+	clauses.push_back(clause_type);
+       }
+     }
+     else
+     {
+       cerr<<"OmpAttribute::addClause(): Unrecognized clause type:"<<clause_type<<endl;
+       ROSE_ASSERT(false);
+     }
+   }
+
+//! Get a vector of clauses existing in the directive
+// We only maintain a map internally, so generated the vector on the fly   
+// This implementation detail is hidden from users, can be changed any time   
+std::vector<omp_construct_enum> OmpAttribute::getClauses()
+{
+/*
+  if (hasClause(e_default))     result.push_back(e_default);
+  if (hasClause(e_shared))    result.push_back(e_shared);
+  if (hasClause(e_private))    result.push_back(e_private);
+  if (hasClause(e_firstprivate))    result.push_back(e_firstprivate);
+  if (hasClause(e_lastprivate))    result.push_back(e_lastprivate);
+  if (hasClause(e_copyin))    result.push_back(e_copyin);
+  if (hasClause(e_copyprivate))    result.push_back(e_copyprivate);
+
+  if (hasClause(e_if)) result.push_back(e_if);
+  if (hasClause(e_num_threads)) result.push_back(e_num_threads);
+  if (hasClause(e_nowait)) result.push_back(e_nowait);
+  if (hasClause(e_ordered_clause)) result.push_back(e_ordered_clause);
+  if (hasClause(e_reduction)) result.push_back(e_reduction);
+  if (hasClause(e_schedule)) result.push_back(e_schedule);
+  if (hasClause(e_collapse)) result.push_back(e_collapse);
+  if (hasClause(e_untied))  result.push_back(e_untied);
+  */
+  return clauses;
+}
+
+//! Get the associated SgPragmaDeclaration
+SgPragmaDeclaration* OmpAttribute::getPragmaDeclaration()
+{
+  SgPragmaDeclaration* result = NULL;
+  if (mNode)
+     result = isSgPragmaDeclaration(mNode);
+  return result;
+}
+
+
+//! Insert a variable into a variable list for clause "targetConstruct", maintain the reversed variable-clause mapping also.
+void OmpAttribute::addVariable(omp_construct_enum targetConstruct, const std::string& varString)
+ {
+   SgInitializedName* sgvar = NULL; 
+   if (mNode)
+   {
+     SgScopeStatement* scope = SageInterface::getScope(mNode);
+     ROSE_ASSERT(scope!=NULL);
+     //resolve the variable here
+     SgVariableSymbol* symbol = lookupVariableSymbolInParentScopes 
+               (varString, scope);
+     ROSE_ASSERT(symbol!= NULL);
+     sgvar = symbol->get_declaration();
+   }  
+   //debug clause var_list
+  // if (targetConstruct== e_copyin) cout<<"debug: adding variable to copyin()"<<endl;
+   variable_lists[targetConstruct].push_back(make_pair(varString, sgvar));
+   // maintain the var-clause map also
+   var_clauses[varString].push_back(targetConstruct);
+ }
+
+//! Set name for named critical section
+ void OmpAttribute::setCriticalName(const std::string & varname)
+ {
+   hasName = true;
+   name = varname;
+ }
+
+//! Expression 
+void OmpAttribute::addExpression(omp_construct_enum targetConstruct, const std::string& expString, SgExpression* sgexp/* =NULL */)
+{
+  expressions[targetConstruct]=make_pair(expString,sgexp);
+  if (sgexp!=NULL)
+    sgexp->set_parent(mNode); // a little hack here, we not yet extend the SgPragmaDeclaration to have expression children.
+}
+
+std::pair<std::string, SgExpression*>
+OmpAttribute::getExpression(omp_construct_enum targetConstruct)
+{
+  return expressions[targetConstruct];
+}
+
+// default () value
+void OmpAttribute::setDefaultValue(omp_construct_enum valuex)
+{
+  switch (valuex)
+  {
+    case  e_default_none:
+    case  e_default_shared:
+    case  e_default_private:
+    case  e_default_firstprivate:
+       default_scope = valuex;
+       break;
+    default:
+      cerr<<"OmpAttribute::setDefaultValue() Illegal default scoping value:"<<valuex<<endl;
+      ROSE_ASSERT(false);
+  }
+}
+
+enum omp_construct_enum OmpAttribute::getDefaultValue()
+{
+  return default_scope;
+}
+
+// Reduction clause's operator
+void OmpAttribute::setReductionOperator(omp_construct_enum operatorx)
+ {
+   reduction_operator = operatorx;
+ }
+omp_construct_enum OmpAttribute::getReductionOperator()
+{
+  return reduction_operator;
+}
+
+//! Find the relevant clauses for a variable 
+std::vector<enum omp_construct_enum> 
+OmpAttribute::get_clauses(const std::string& variable)
+{
+ return var_clauses[variable];
+}
+
+// Schedule kind
+void OmpAttribute::setScheduleKind(omp_construct_enum kindx)
+{
+  //validating the parameter here
+ switch (kindx)
+ {
+   case  e_schedule_none:
+   case  e_schedule_static:
+   case  e_schedule_dynamic:
+   case  e_schedule_guided:
+   case  e_schedule_auto:
+   case  e_schedule_runtime:
+     schedule_kind = kindx;
+     break;
+   default:
+     cerr<<"OmpAttribute::setScheduleKind() Illegal schedule kind:"<<kindx<<endl;
+     ROSE_ASSERT(false);
+     break;
+ }
+}
+
+omp_construct_enum OmpAttribute::getScheduleKind()
+{
+  ROSE_ASSERT(hasClause(e_schedule)==true);
+  return schedule_kind;
+}
+
+string toString(omp_construct_enum omp_type)
+{
+  string result;
+  switch (omp_type)
+  {
+  /*
+    case e_: result = ""; break;
+    */
+    //directives
+    case e_unknown: result ="unknown" ; break;
+    case e_parallel: result = "parallel" ; break;
+    case e_for: result = "for"; break;
+    case e_sections: result = "sections"; break;
+    case e_section: result = "section"; break;
+    case e_single: result = "single"; break;
+
+    case e_master: result = "master"; break;
+    case e_critical: result = "critical"; break;
+    case e_barrier: result = "barrier"; break;
+    case e_atomic: result = "atomic"; break;
+    case e_flush: result = "flush"; break;
+
+
+    case e_threadprivate: result = "threadprivate"; break;
+    case e_parallel_for: result = "parallel for"; break;
+    case e_parallel_sections: result = "parallel sections"; break;
+    case e_task: result = "task"; break;
+    case e_taskwait: result = "taskwait"; break;
+    case e_ordered_directive: result = "ordered"; break;
+
+   // clauses
+    case e_default: result = "default"; break;
+    case e_shared: result = "shared"; break;
+    case e_private: result = "private"; break;
+    case e_firstprivate: result = "firstprivate"; break;
+    case e_lastprivate: result = "lastprivate"; break;
+    case e_copyin: result = "copyin"; break;
+    case e_copyprivate: result = "copyprivate"; break;
+
+
+    case e_if: result = "if"; break;
+    case e_num_threads: result = "num_threads"; break;
+    case e_nowait: result = "nowait"; break;
+    case e_ordered_clause: result = "ordered"; break;
+    case e_reduction: result = "reduction"; break;
+    case e_schedule: result = "schedule"; break;
+    case e_collapse: result = "collapse"; break;
+    case e_untied: result = "untied"; break;
+
+  // values
+    case e_default_none: result = "none"; break;
+    case e_default_shared: result = "shared"; break;
+    case e_default_private: result = "private"; break;
+    case e_default_firstprivate: result = "firstprivate"; break;
+
+    case e_reduction_plus: result = "+"; break;
+    case e_reduction_minus: result = "-"; break;
+    case e_reduction_mul: result = "*"; break;
+    case e_reduction_bitand: result = "&"; break;
+    case e_reduction_bitor: result = "|"; break;
+
+    case e_reduction_bitxor: result = "^"; break;
+    case e_reduction_logand: result = "&&"; break;
+    case e_reduction_logor: result = "||"; break;
+
+    case e_reduction_min: result = "min"; break;
+    case e_reduction_max: result = "max"; break;
+
+    case e_schedule_none: result = "not-specified"; break;
+    case e_schedule_static: result = "static"; break;
+    case e_schedule_dynamic: result = "dynamic"; break;
+    case e_schedule_guided: result = "guided"; break;
+    case e_schedule_auto: result = "auto"; break;
+    case e_schedule_runtime: result = "runtime"; break;
+
+    case e_not_omp: result = "not_omp"; break;
+  }
+
+  if (isDirective(omp_type))
+    result= "omp " + result;
+  return result;
+}
+bool isDirective(omp_construct_enum omp_type)
+{
+  bool result = false;
+  switch (omp_type)
+  { // 16 directives as OpenMP 3.0
+    case e_parallel:
+    case e_for:
+    case e_sections:
+    case e_section:
+    case e_single:
+
+    case e_master: 
+    case e_critical:
+    case e_barrier:
+    case e_atomic:
+    case e_flush:
+
+    case e_threadprivate:
+    case e_parallel_for:
+    case e_parallel_sections:
+    case e_task:
+    case e_taskwait:
+
+    case e_ordered_directive:
+      result = true;
+      break;
+    default:
+     result = false;
+     break;
+  }
+ return result;
+}
+
+bool isClause(omp_construct_enum clause_type)
+{
+  bool result = false;
+
+   switch (clause_type)
+   { //total 15 possible clauses as OpenMP 3.0
+     case e_default:
+     case e_shared:
+     case e_private:
+     case e_firstprivate:
+     case e_lastprivate:
+
+     case e_copyin:
+     case e_copyprivate:
+     case e_if:
+     case e_num_threads:
+     case e_nowait:
+
+     case e_ordered_clause:
+     case e_reduction:
+     case e_schedule:
+     case e_collapse:
+     case e_untied:
+       result = true; 
+       break;
+     default:
+       result = false;
+       break;
+   }
+  return result; 
+}
+
+
+bool OmpAttribute::hasClause(omp_construct_enum omp_type)
+{
+  bool result = false;
+  if (isClause(omp_type))
+     result =clause_map[omp_type];
+  else
+  {        
+    cerr<<"OmpAttribute::hasClause(): Unrecognized clause type as a parameter:"<<omp_type<<endl;
+    ROSE_ASSERT(false);
+  }
+  return result;
+}
+
+//--------------------------
+//Judge if a name is in a clause's variable list: like private(x,y,z), copyin(), etc.
+bool OmpAttribute::isInConstruct(const string & varName, enum omp_construct_enum omptype)
+{
+  bool result =false;
+  ROSE_ASSERT(varName.size()!= 0);
+  vector <omp_construct_enum> construct_vec = get_clauses(varName);
+  vector <omp_construct_enum>::iterator iter;
+  iter = find (construct_vec.begin(), construct_vec.end(),omptype);
+  if (iter != construct_vec.end())
+    result = true;
+  return result;
+}
+
+//! Convert directives and clauses to string 
+// Top down recursive conversion: directive ,directive-optional stuff, 
+ // then clauses one by one, plus clause-optional stuff
+std::string OmpAttribute::toOpenMPString(omp_construct_enum omp_type)
+{
+  string result;
+  //Directives ------------------
+  if (isDirective(omp_type))
+  { //common string for all directives
+    // atomic, barrier, master, section, ordered, taskwait
+   result += OmpSupport::toString(omp_type);
+   // optional: critical's name
+   if (omp_type == e_critical)
+   {
+     if (isNamedCritical())
+       result+=" ("+ getCriticalName()+")";
+   } 
+   // optional: variable lists for flush () and threadprivate()
+   else if ((omp_type == e_flush)||(omp_type == e_threadprivate))
+   {
+     if(hasVariableList(omp_type))
+     {
+       string varListString = toOpenMPString(getVariableList(omp_type));
+       result+=" (" + varListString + ")"; 
+     }
+   }// end of flush(), threadprivate()
+  } // end if directives
+  //Clauses ------------------
+  else if (isClause(omp_type))
+  {
+    // Common string for all clauses
+    result += OmpSupport::toString(omp_type);
+    // optional expressions
+    if((omp_type == e_if)||
+       (omp_type ==e_num_threads)||
+       (omp_type == e_collapse)
+      )
+    {
+       string expString;
+      // We store real SgExpression* in .second now, 
+      // No need to save the original string format in .first 
+       if (getExpression(omp_type).first.size()>0) 
+         expString   = getExpression(omp_type).first;
+       else if (getExpression(omp_type).second!=NULL)
+         expString = getExpression(omp_type).second->unparseToString();
+       result+=" (" + expString+ ")"; 
+    } 
+    // optional variable lists
+    else if ((omp_type == e_copyprivate)||
+           (omp_type ==e_private)||
+	   (omp_type == e_firstprivate)||
+	   (omp_type == e_shared)||
+	   (omp_type == e_copyin)||
+	   (omp_type == e_lastprivate)
+	   )
+    {
+       string varListString = toOpenMPString(getVariableList(omp_type));
+       result+=" (" + varListString + ")"; 
+    }
+    // default scoping values
+    else if (omp_type == e_default)
+    {
+       result+=" ("+ OmpSupport::toString(getDefaultValue())+")";
+    } // reduction (op:var-list)
+    else if (omp_type == e_reduction)
+    {
+      result +=" ("+ OmpSupport::toString(getReductionOperator())+":";
+      string varListString = toOpenMPString(getVariableList(omp_type));
+      result += varListString + ")";
+    } // schedule(kind, exp)
+    else if (omp_type == e_schedule)
+    {
+      result +=" ("+ OmpSupport::toString(getScheduleKind());
+      string expString;
+      // We store real SgExpression* in .second now, 
+      // No need to save the original string format in .first
+      if (getExpression(omp_type).first.size()>0)
+        expString = getExpression(omp_type).first;
+      else  if (getExpression(omp_type).second !=  NULL)
+        expString =  getExpression(omp_type).second->unparseToString();
+
+      if (expString.size()>0)
+        result += "," + expString;
+      result += ")";
+    }
+  }// end clauses
+  return result; 
+}
+
+//! Convert a variable list to x,y,z ,without parenthesis.
+std::string OmpAttribute::toOpenMPString(std::vector<std::pair<std::string,SgNode* > >var_list)
+{
+  string result;
+  std::vector<std::pair<std::string,SgNode* > >::iterator iter;
+  for (iter=var_list.begin();iter!=var_list.end();iter++)
+  {
+    if (iter != var_list.begin())
+      result +=",";
+    result+=(*iter).first;
+  }
+  return result;
+}
+
+
+//! Get the variable list associated with a construct
+std::vector<std::pair<std::string,SgNode* > >
+        OmpAttribute::getVariableList(omp_construct_enum targetConstruct)
+{
+  return variable_lists[targetConstruct];
+}
+//! Check if a variable list is associated with a construct
+bool OmpAttribute::hasVariableList(omp_construct_enum omp_type)
+{
+  vector<std::pair<std::string,SgNode* > > var_list = variable_lists[omp_type];
+  return (var_list.size()!=0);
+}
+
+std::string OmpAttribute::toOpenMPString()
+{
+  string result; // Should not add "#pragma ", which is automatically generated by SgPragmaDeclaration
+  // Convert directive first
+  result += toOpenMPString(omp_type);
+
+  // Convert clauses then
+  vector<omp_construct_enum> clause_vector = getClauses();
+  vector<omp_construct_enum>::iterator iter;
+  for (iter=clause_vector.begin();iter!=clause_vector.end();iter++)
+  {  
+    if (iter==clause_vector.begin())
+     result+= " "; // space between directive and first clause
+    else
+      result+= ",";
+    result+= toOpenMPString(*iter);
+  }
+  return result;
+}
+
+//! pretty print of OmpAttribute, ideally should reproduce a legal OpenMP pragma
+void OmpAttribute::print()
+{ 
+  std::cout<<"----------------------"<<std::endl;
+  SgPragmaDeclaration* pragma = getPragmaDeclaration();
+  if (pragma)
+   std::cout<<"Original OpenMP pragma is:\n\t\t#pragma "<<pragma->get_pragma()->get_pragma()<<std::endl;
+  std::cout<<"Reproduced OpenMP pragma is:\n";
+  // Generate OpenMP pragma from OmpAttribute
+  cout<<"\t\t#pragma "<<toOpenMPString();
+  cout<<std::endl;
+
+}//end print
+
+//! It does not set omp_type and pragma, leaving constructors to do it
+void OmpAttribute::init()
+    {   
+      //TODO, complete this!
+        parent = NULL;
+
+	isOrphaned = false;
+        hasName = false;
+
+        schedule_kind = e_schedule_none;
+        wrapperCount=0;
+    }
+
+
+} //end namespace OmpSupport

Copied: branches/testonly/src/frontend/SageIII/OmpAttribute.h (from rev 128, trunk/src/frontend/SageIII/OmpAttribute.h)
===================================================================
--- branches/testonly/src/frontend/SageIII/OmpAttribute.h	                        (rev 0)
+++ branches/testonly/src/frontend/SageIII/OmpAttribute.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,295 @@
+/*!
+ * ROSE persistent attribute to represent OpenMP 3.0 C/C++ directives
+ * All things go to the OmpSupport namespace to avoid conflicts 
+ */
+// Goal: share it by both OpenMP translation and automatic OpenMP insertion
+//
+// Liao 9/17, 2008
+
+#include <rose.h>
+#include <iostream>
+#include <string>
+#include <map>
+
+namespace OmpSupport{
+
+ // OpenMP construct name list
+ // We put all directive and clause types into one enumerate type
+ // since some internal data structure(map) have to access 
+ // both directives and clauses uniformly
+  enum	omp_construct_enum {
+     e_unknown = 0, 
+
+  // 16 directives as OpenMP 3.0
+     e_parallel,
+     e_for,
+     e_sections,
+     e_section,
+     e_single,
+
+     e_master, 
+     e_critical,
+     e_barrier,
+     e_atomic,
+     e_flush,
+
+     e_threadprivate,
+     e_parallel_for,
+     e_parallel_sections,
+     e_task,
+     e_taskwait, 
+     // we have both ordered directive and ordered clause, 
+    //so make the name explicit
+     e_ordered_directive,
+
+  // 15 clauses for OpenMP 3.0
+    // 7 data-sharing attributes clauses
+     e_default, // the clause
+     e_shared,
+     e_private,
+     e_firstprivate,
+     e_lastprivate,
+     e_copyin,
+     e_copyprivate,
+
+     //8 misc clauses
+     e_if, // used with omp parallel or omp task
+     e_num_threads, // for omp parallel only
+     e_nowait,
+     e_ordered_clause,
+     e_reduction,
+     e_schedule,
+     e_collapse,
+     e_untied, 
+
+ // Simple values for some clauses
+   
+     //4 values for default clause 
+     //C/C++ default values
+     e_default_none,
+     e_default_shared,
+     //Fortran default values
+     e_default_private,
+     e_default_firstprivate,
+
+
+     // reduction operations
+     //8 operand for C/C++
+     e_reduction_plus,
+     e_reduction_minus,
+     e_reduction_mul,
+     e_reduction_bitand,
+     e_reduction_bitor,
+
+     e_reduction_bitxor,
+     e_reduction_logand,
+     e_reduction_logor, 
+
+     // TODO more reduction intrinsic procedure name for Fortran  
+     e_reduction_min, //?
+     e_reduction_max,
+
+     //5 schedule policies
+     e_schedule_none,
+     e_schedule_static,
+     e_schedule_dynamic,
+     e_schedule_guided,
+     e_schedule_auto,
+     e_schedule_runtime,
+
+  // not an OpenMP construct
+     e_not_omp
+  }; //end omp_construct_enum
+
+  //! Output omp_construct_enum to a string: 
+  // Better using OmpSupport::toString() to avoid ambiguous 
+  std::string toString(omp_construct_enum omp_type);
+
+  //! Check if an OpenMP construct is a directive
+  bool isDirective(omp_construct_enum omp_type);
+
+  //! Check if an OpenMP construct is a clause
+  bool isClause(omp_construct_enum omp_type);
+
+  class OmpAttribute;
+  //! Some utility functions to manipulate OmpAttribute
+  //
+  //! A builder for OmpAttribute
+  OmpAttribute* buildOmpAttribute(enum omp_construct_enum directive_type, SgNode* context_node);
+
+  //! Add OmpAttribute to a SgNode
+  void addOmpAttribute(OmpAttribute* ompattribute, SgNode* node);
+
+  //! Get OmpAttribute from a SgNode, return NULL if not found
+  OmpAttribute* getOmpAttribute(SgNode* node);
+
+//------------------------------------------------------------------
+//------------------------------------------------------------------
+// By default, the persistent attribute attached to an OpenMP pragma node in SAGE III AST
+// Attaching to pragma is easier since a few directives have no obvious 
+// associated code blocks, like threadprivate.
+//
+// The attribute can also be attached by a scope affected by OpenMP. This is used during
+// automatic parallelization when the corresponding pragma is not yet generated.
+//
+// A cure-all approach is used to simplify the handling. 
+// OmpAttribute is implemented using a 'flat' data structure encompass all 
+// possible directives, clauses
+// and their various contents, if any.
+//
+// different types of pragmas need different information in some cases
+// e.g.
+//    'omp for' needs scheduling type 
+//------------------------------------------------------------------
+//------------------------------------------------------------------
+class OmpAttribute : public AstAttribute 
+{
+ public:
+   //It is recommended to use OmpSupport::buildOmpAttribute() instead of 
+   //using the constructors here
+  //!Default constructors
+   OmpAttribute()
+    {
+      mNode = NULL;
+      omp_type = e_unknown;
+      init();
+    }
+   //! Constructor for known directive type and originating pragma/scope node
+   OmpAttribute(omp_construct_enum omptye, SgNode* mynode):
+   mNode(mynode),omp_type(omptye){ 
+     /*The initialization order has to match the declaration order, 
+      * otherwise get a compilation warning*/
+        init();
+   }
+
+  //! Get the associated SgPragmaDeclaration if any
+  SgPragmaDeclaration* getPragmaDeclaration();
+
+  //! Get the associated SgNode, can be SgPragmaDeclaration or others( during parallelization)
+  SgNode* getNode();
+
+   //!-----------clauses----------------
+   //!Add a clause into an OpenMP directive, the content of the clause is set by other interface, such as addVariable(), addExpression() , setReductionOperator() etc.
+   void addClause(omp_construct_enum clause_type);
+   //! Check if a directive has a clause of the specified type 
+   bool hasClause(omp_construct_enum clause_type);
+
+   //! Get all existing clauses
+   std::vector<omp_construct_enum> getClauses();
+
+   //!--------var list --------------
+   //! Add a variable into a variable list of a construct
+   void addVariable(omp_construct_enum targetConstruct, const std::string& varString);
+   //! Check if a variable list is associated with a construct
+   bool hasVariableList(omp_construct_enum);
+   //! Get the variable list associated with a construct
+   std::vector<std::pair<std::string,SgNode* > >
+     getVariableList(omp_construct_enum);
+
+   //! Find the relevant clauses for a variable 
+   std::vector<enum omp_construct_enum> get_clauses(const std::string& variable);
+
+   //!--------Expressions -----------------------------
+   //! Add an expression to a clause
+   void addExpression(omp_construct_enum targetConstruct, const std::string& expString, SgExpression*    sgexp=NULL); 
+
+   //! Get expression of a clause
+   std::pair<std::string, SgExpression*>  
+   getExpression(omp_construct_enum targetConstruct);
+
+   //!--------values for some clauses ----------
+   //! Get reduction operator from reduction(op:kind)
+   void setReductionOperator(omp_construct_enum operatorx);
+   omp_construct_enum getReductionOperator();
+   
+   // default () value
+   void setDefaultValue(omp_construct_enum valuex);
+   omp_construct_enum getDefaultValue();
+
+   // Schedule kind
+   omp_construct_enum getScheduleKind(); 
+   void setScheduleKind(omp_construct_enum kindx);
+
+   //! Check if a variable is inside a variable list of a clause/directive.
+   bool isInConstruct(const std::string & variable, enum omp_construct_enum);
+
+   //! Set name for named critical section
+   void setCriticalName(const std::string & name);
+   std::string  getCriticalName() {return name;};
+   bool isNamedCritical(){return hasName;};
+
+   //!Pretty print the OmpAttribute
+   void print(); 
+   //! Convert OmpAttribute to a legal OpenMP pragma string, 
+   //not named toString() to void ambiguous with OmpAttribute::toString()
+   std::string toOpenMPString();
+//------------------hide the implementation details, could be changed anytime!!
+private:  
+   //! The associated SgNode for this attribute, could be SgPragmaDeclaration or other nodes
+   SgNode*  mNode; 
+
+   //!Directive information: type of OpenMP directive
+   enum omp_construct_enum  omp_type; 
+
+   //! Clause information 
+   // vector is used to preserve the order of clauses in the directive
+   // map is used to fast query if a clause exists or not
+   // Some clauses are allowed to appear more than once, merge the content into the first occurrence in our implementation.
+   std::vector<omp_construct_enum> clauses;
+   std::map<omp_construct_enum,bool> clause_map;
+
+   //variable lists------------------- 
+   //appeared within some directives and clauses
+   //The clauses/directive are: flush, threadprivate, private, firstprivate, 
+   //  shared, copyin, reduction, lastprivate, copyprivate
+   // We use a pair of (name, SgNode) for each variable 
+   // It is highly possible that a variable having more than one OpenMP properties.
+   // For example, a variable can be both firstprivate and lastprivate.
+   std::map<omp_construct_enum, std::vector<std::pair<std::string,SgNode* > > > variable_lists; 
+   // A reverse map from a variable to the clauses the variable appears
+   std::map<std::string, std::vector<omp_construct_enum> > var_clauses;
+
+   // expressions ----------------------
+   // e.g.: if (exp), num_threads(exp), schedule(,exp), collapse(exp)
+   std::map<omp_construct_enum, std::pair<std::string, SgExpression*> > expressions;
+
+   // values for some clauses -------------------------
+  // values for default() clause: data scoping information
+   // choices are: none,shared, private, firstprivate
+   omp_construct_enum default_scope; 
+   
+   //value for reduction operation: + -, * & | etc
+   omp_construct_enum reduction_operator;
+
+   // value for omp for's schedule policies
+   omp_construct_enum schedule_kind;
+
+   // Only used for omp critical to indicate if it is named or not
+   // name for the directive, only used for omp critical
+   bool hasName; 
+   std::string name; 
+ 
+   // Misc fields  --------------------------------
+   // help translation and analysis   
+   bool isOrphaned; //true if parent omp parallel is not in the static lexical scope
+
+  // Additional information to help translation
+   int wrapperCount; // the shared variables from the same scope which needs wrapper
+
+   //optional information
+   OmpAttribute * parent; //upper-level OMP pragma's attribute
+
+   //!Member functions --------------------------------- 
+    //! Initialize internal data
+    void init() ;
+
+   //! Convert entire directives and clauses to string ,
+    // invoke OmpSupport::toString() to stringify the enumerate type internally
+   std::string toOpenMPString(omp_construct_enum omp_type);
+
+   //! Convert a variable list to x,y,z ,without parenthesis.
+   std::string toOpenMPString(std::vector<std::pair<std::string,SgNode* > >);
+  }; // end class OmpAttribute
+
+
+} //end namespace OmpSupport

Modified: branches/testonly/src/frontend/SageIII/astMerge/fixupTraversal.C
===================================================================
--- branches/testonly/src/frontend/SageIII/astMerge/fixupTraversal.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/astMerge/fixupTraversal.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -59,14 +59,6 @@
   // Keep a count of the number of IR nodes tested (whose data members are evaluated)
      numberOfNodesTested++;
 
-  // Only traverse list of IR node pointers on each IR node.
-     typedef vector<pair<SgNode**,string> > DataMemberVectorType;
-
-  // We require the reference version of this function because we want to update the (referenced) pointer values.
-  // Question: Can this be a const ref for the dataMemberMap?  This would avoid copying of STL maps.
-  // DataMemberMapType dataMemberMap = node->returnDataMemberPointers();
-     const DataMemberVectorType & dataMemberVector = node->returnDataMemberReferenceToPointers();
-
   // printf ("dataMemberVector.size() = %ld \n",dataMemberVector.size());
      bool traceReplacement = false;
 #if 0
@@ -79,162 +71,146 @@
 #endif
      if (traceReplacement == true)
         {
-          printf ("FixupTraversal::visit: node = %p = %s dataMemberVector.size() = %zu \n",node,node->class_name().c_str(),dataMemberVector.size());
+          printf ("FixupTraversal::visit: node = %p = %s \n",node,node->class_name().c_str());
         }
 
-     DataMemberVectorType::const_iterator i = dataMemberVector.begin();
-     while (i != dataMemberVector.end())
-        {
-       // Ignore the parent pointer since it will be reset differently if required
-          SgNode** pointerToKey = i->first;
+     struct Replacer: public ReferenceToPointerHandler {
+       FixupTraversal& ft;
+       bool traceReplacement;
+       SgNode* node;
+       Replacer(FixupTraversal& ft, bool traceReplacement, SgNode* node): ft(ft), traceReplacement(traceReplacement), node(node) {}
+       virtual void operator()(SgNode*& key, const SgName& debugStringName) {
+         // Keep a count of the number of IR nodes evaluated.
+            ft.numberOfDataMemberPointersEvaluated++;
+         // Keep a count of the number of IR data members that are non-null
+            ft.numberOfValidDataMemberPointersEvaluated++;
 
-       // Keep a count of the number of IR nodes evaluated.
-          numberOfDataMemberPointersEvaluated++;
+            const string& debugString = debugStringName.getString();
 
-       // DQ (5/20/2006): Data members that are NULL will have been put into the dataMemberVector as NULL pointers so we have to skip over them.
-          if (pointerToKey != NULL)
-             {
-            // For node, this is the reference to the field containing a pointer 
-            // to another IR node (this will be a key into the replacementMap).
-               SgNode* key           = *(i->first);
-            // printf ("key  = %p = %p = %s \n",key,dynamic_cast<SgNode*>(key),key != NULL ? key->class_name().c_str() : "NULL");
-            // printf ("pointerToKey != NULL: key  = %p \n",key);
+         // DQ (2/8/2007): Only handle non-NULL valued pointers (only valid pointers to IR nodes that need be reset).
+         // However, since we have few NULL pointers in the AST by design this is not a significant optimization.
+            if (key != NULL)
+               {
+              // Keep a count of the number of IR data members that are non-null (where the key is also non-null)
+                 ft.numberOfValidDataMemberPointersWithValidKeyEvaluated++;
 
-            // Keep a count of the number of IR data members that are non-null
-               numberOfValidDataMemberPointersEvaluated++;
-
-            // DQ (2/8/2007): Only handle non-NULL valued pointers (only valid pointers to IR nodes that need be reset).
-            // However, since we have few NULL pointers in the AST by design this is not a significant optimization.
-               if (key != NULL)
-                  {
-                 // Keep a count of the number of IR data members that are non-null (where the key is also non-null)
-                    numberOfValidDataMemberPointersWithValidKeyEvaluated++;
-
-                 // printf ("key  = %p = %p = %s \n",key,dynamic_cast<SgNode*>(key),key->class_name().c_str());
-                 // printf ("key  = %p = %s \n",key,key->class_name().c_str());
-                 // printf ("key  = %p \n",key);
+              // printf ("key  = %p = %p = %s \n",key,dynamic_cast<SgNode*>(key),key->class_name().c_str());
+              // printf ("key  = %p = %s \n",key,key->class_name().c_str());
+              // printf ("key  = %p \n",key);
 #if 0
-                 // This is the field name of the data member (helps with debugging to know what it is)
-                    const string & debugString  = i->second;
+              // This is the field name of the data member (helps with debugging to know what it is)
+                 const string & debugString  = i->second;
 
-                 // Lookup the key in the replacementMap.  If present then the replacement map stores the 
-                 // values required to reset the pointer FROM the unshared IR node and TO the shared IR node.
-                    ReplacementMapTraversal::ReplacementMapType::const_iterator lowerBound = replacementMap.lower_bound(key);
-                    ReplacementMapTraversal::ReplacementMapType::const_iterator upperBound = replacementMap.upper_bound(key);
+              // Lookup the key in the replacementMap.  If present then the replacement map stores the 
+              // values required to reset the pointer FROM the unshared IR node and TO the shared IR node.
+                 ReplacementMapTraversal::ReplacementMapType::const_iterator lowerBound = replacementMap.lower_bound(key);
+                 ReplacementMapTraversal::ReplacementMapType::const_iterator upperBound = replacementMap.upper_bound(key);
 
-                    if (lowerBound == upperBound)
-                       {
-                      // Keep a count of the number of case where the replacement list was empty.
-                         numberOfValidDataMemberPointersWithValidKeyButNotInReplacementMap++;
+                 if (lowerBound == upperBound)
+                    {
+                   // Keep a count of the number of case where the replacement list was empty.
+                      numberOfValidDataMemberPointersWithValidKeyButNotInReplacementMap++;
 #if 0
-                         if (traceReplacement == true)
-                            {
-                              ROSE_ASSERT(key != NULL);
-                              ROSE_ASSERT(node != NULL);
-                              printf ("debugString = %s \n",debugString.c_str());
-                           // printf ("node = %p \n",node);
-                              printf ("node = %p = %s \n",node,node->class_name().c_str());
-                              printf ("key  = %p \n",key);
-                           // printf ("dynamic_cast<SgNode*>(key) = %p \n",dynamic_cast<SgNode*>(key));
-                           // printf ("key  = %p = %s \n",key,dynamic_cast<SgNode*>(key)->class_name().c_str());
-                           // printf ("FixupTraversal::visit(): Key not present in replacementMap, node = %p = %s: key = %p = %s at data member %s is not in the replacementMap to be updated to a shared IR node \n",
-                           //      node,node->class_name().c_str(),key,key->class_name().c_str(),debugString.c_str());
-                            }
+                      if (traceReplacement == true)
+                         {
+                           ROSE_ASSERT(key != NULL);
+                           ROSE_ASSERT(node != NULL);
+                           printf ("debugString = %s \n",debugString.c_str());
+                        // printf ("node = %p \n",node);
+                           printf ("node = %p = %s \n",node,node->class_name().c_str());
+                           printf ("key  = %p \n",key);
+                        // printf ("dynamic_cast<SgNode*>(key) = %p \n",dynamic_cast<SgNode*>(key));
+                        // printf ("key  = %p = %s \n",key,dynamic_cast<SgNode*>(key)->class_name().c_str());
+                        // printf ("FixupTraversal::visit(): Key not present in replacementMap, node = %p = %s: key = %p = %s at data member %s is not in the replacementMap to be updated to a shared IR node \n",
+                        //      node,node->class_name().c_str(),key,key->class_name().c_str(),debugString.c_str());
+                         }
 #endif
-                       }
-                      else
-                       {
-                      // Keep a count of the number of case where the replacement list was valid.
-                         numberOfValidDataMemberPointersWithValidKeyAndInReplacementMap++;
-                       }
-                    
-                 // Loop over all those in the replacement map that need to have child pointers to be updated
-                    int loopCounter = 0;
-                    while (lowerBound != upperBound)
-                       {
-                         SgNode* originalNode = (replacementMap.lower_bound(key))->second;
+                    }
+                   else
+                    {
+                   // Keep a count of the number of case where the replacement list was valid.
+                      numberOfValidDataMemberPointersWithValidKeyAndInReplacementMap++;
+                    }
+                 
+              // Loop over all those in the replacement map that need to have child pointers to be updated
+                 int loopCounter = 0;
+                 while (lowerBound != upperBound)
+                    {
+                      SgNode* originalNode = (replacementMap.lower_bound(key))->second;
 
-                      // Keep a count of the number of case where the replacement list was valid.
-                         numberOfValidDataMemberPointersWithValidKeyAndInReplacementMapEvaluated++;
+                   // Keep a count of the number of case where the replacement list was valid.
+                      numberOfValidDataMemberPointersWithValidKeyAndInReplacementMapEvaluated++;
 
-                         if (traceReplacement == true)
-                            {
-                              printf ("FixupTraversal::visit(): Set the key (IR node) (%p = %s) on %p = %s to %p = %s \n",key,debugString.c_str(),node,node->class_name().c_str(),originalNode,originalNode->class_name().c_str());
-                            }
+                      if (traceReplacement == true)
+                         {
+                           printf ("FixupTraversal::visit(): Set the key (IR node) (%p = %s) on %p = %s to %p = %s \n",key,debugString.c_str(),node,node->class_name().c_str(),originalNode,originalNode->class_name().c_str());
+                         }
 
-                         ROSE_ASSERT(*pointerToKey == key);
+                      if (key != originalNode)
+                         {
+                        // Now reset the pointer to the subtree identified as redundent with
+                        // a subtree in the original AST to the subtree in the original AST.
+                        // *pointerToKey = node;
+                           key = originalNode;
 
-                         if (key != originalNode)
-                            {
-                           // Now reset the pointer to the subtree identified as redundent with
-                           // a subtree in the original AST to the subtree in the original AST.
-                           // *pointerToKey = node;
-                              *pointerToKey = originalNode;
+                        // Keep a count of the number of IR nodes that are reset.
+                           numberOfValidDataMemberPointersReset++;
+                         }
 
-                           // Keep a count of the number of IR nodes that are reset.
-                              numberOfValidDataMemberPointersReset++;
-                            }
+                      lowerBound++;
+                      loopCounter++;
+                    }
 
-                         lowerBound++;
-                         loopCounter++;
-                       }
-
-                 // DQ (2/8/2007): If the loop trip is only 0 or 1 then we don't need a loop here!
-                 // I think that by design the loop trip is at most 1!
-                 // printf ("FixupTraversal::visit(): loop from replacementMap.lower_bound(key) to replacementMap.upper_bound(key): loopCounter = %d \n",loopCounter);
-                    ROSE_ASSERT(loopCounter < 2);
-                 // end of block for "if(key != NULL)"
+              // DQ (2/8/2007): If the loop trip is only 0 or 1 then we don't need a loop here!
+              // I think that by design the loop trip is at most 1!
+              // printf ("FixupTraversal::visit(): loop from replacementMap.lower_bound(key) to replacementMap.upper_bound(key): loopCounter = %d \n",loopCounter);
+                 ROSE_ASSERT(loopCounter < 2);
+              // end of block for "if(key != NULL)"
 #else
-                 // Since the ReplacementMapTraversal::ReplacementMapType is a now a map rather 
-                 // than a multi-map, the use of it is simple and should be more efficient.
+              // Since the ReplacementMapTraversal::ReplacementMapType is a now a map rather 
+              // than a multi-map, the use of it is simple and should be more efficient.
 
-                 // Keep a count of the number of case where the replacement list was valid.
-                    numberOfValidDataMemberPointersWithValidKeyAndInReplacementMapEvaluated++;
+              // Keep a count of the number of case where the replacement list was valid.
+                 ft.numberOfValidDataMemberPointersWithValidKeyAndInReplacementMapEvaluated++;
 
-                 // Check that the key is in the map
-                 // DQ (2/19/2007): This is more efficient since it looks up the element from the map only once.
-                    ReplacementMapTraversal::ReplacementMapType::const_iterator replacementMap_it = replacementMap.find(key);
-                    if (replacementMap_it != replacementMap.end())
-                       {
-                         SgNode* originalNode = replacementMap_it->second;
+              // Check that the key is in the map
+              // DQ (2/19/2007): This is more efficient since it looks up the element from the map only once.
+                 ReplacementMapTraversal::ReplacementMapType::const_iterator replacementMap_it = ft.replacementMap.find(key);
+                 if (replacementMap_it != ft.replacementMap.end())
+                    {
+                      SgNode* originalNode = replacementMap_it->second;
 
-                         ROSE_ASSERT(*pointerToKey == key);
+                      if (traceReplacement == true)
+                         {
+                           printf ("FixupTraversal::visit(): Set the key (IR node) (%p = %s) on %p = %s to %p = %s \n",key,debugString.c_str(),node,node->class_name().c_str(),originalNode,originalNode->class_name().c_str());
+                         }
 
-                         if (traceReplacement == true)
-                            {
-                              const string & debugString  = i->second;
-                              printf ("FixupTraversal::visit(): Set the key (IR node) (%p = %s) on %p = %s to %p = %s \n",key,debugString.c_str(),node,node->class_name().c_str(),originalNode,originalNode->class_name().c_str());
-                            }
+                   // Skip the trival case of resetting the pointer value to itself!
+                      if (key != originalNode)
+                         {
+                        // Now reset the pointer to the subtree identified as redundent with a
+                        // subtree in the original AST to the subtree in the original (merged) AST.
+                           key = originalNode;
 
-                      // Skip the trival case of resetting the pointer value to itself!
-                         if (key != originalNode)
-                            {
-                           // Now reset the pointer to the subtree identified as redundent with a
-                           // subtree in the original AST to the subtree in the original (merged) AST.
-                              *pointerToKey = originalNode;
-
-                           // Keep a count of the number of IR nodes that are reset.
-                              numberOfValidDataMemberPointersReset++;
-                            }
-                       }
-                      else
-                       {
-                      // printf ("replacementMap_it == replacementMap.end() \n");
-                       }
+                        // Keep a count of the number of IR nodes that are reset.
+                           ft.numberOfValidDataMemberPointersReset++;
+                         }
+                    }
+                   else
+                    {
+                   // printf ("replacementMap_it == replacementMap.end() \n");
+                    }
 #endif
-                  }
-                 else
-                  {
-                 // printf ("key == NULL \n");
-                  }
-             }
-            else
-             {
-            // printf ("pointerToKey == NULL \n");
-             }
-          
-          i++;
+               }
+              else
+               {
+              // printf ("key == NULL \n");
+               }
         }
+     };
+
+     Replacer r(*this, traceReplacement, node);
+     node->processDataMemberReferenceToPointers(&r);
    }
 
 void

Modified: branches/testonly/src/frontend/SageIII/astMerge/merge.C
===================================================================
--- branches/testonly/src/frontend/SageIII/astMerge/merge.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/astMerge/merge.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -630,7 +630,7 @@
                     int nextErrorCode = 0;
 #if 1
                     int fileIndex = 0;
-                    SgFile* newFile = new SgFile ( argc, argv, nextErrorCode, fileIndex, project );
+                    SgFile* newFile = determineFileType( vector<string>(argv, argv+argc), nextErrorCode,  project );
                     ROSE_ASSERT (newFile != NULL);
 
                     newFile->set_parent(project);

Modified: branches/testonly/src/frontend/SageIII/astMerge/nullifyAST.C
===================================================================
--- branches/testonly/src/frontend/SageIII/astMerge/nullifyAST.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/astMerge/nullifyAST.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -38,22 +38,11 @@
 
      if (nullifyIRchildren == true)
         {
-       // Only traverse the new part of the AST
-          typedef vector<pair<SgNode**,string> > DataMemberMapType;
-          DataMemberMapType dataMemberMap = node->returnDataMemberReferenceToPointers();
-
-          DataMemberMapType::iterator i = dataMemberMap.begin();
-          while (i != dataMemberMap.end())
-             {
-            // Ignore the parent pointer since it will be reset differently if required
-               SgNode** pointerToKey = i->first;
-            // SgNode* key           = *(i->first);
-            // string & debugString  = i->second;
-
-               *pointerToKey = NULL;
-
-               i++;
-             }
+          struct Nullifier: public ReferenceToPointerHandler {
+            virtual void operator()(SgNode*& n, const SgName&) {n = NULL;}
+          };
+          Nullifier nf;
+          node->processDataMemberReferenceToPointers(&nf);
         }
    }
 

Modified: branches/testonly/src/frontend/SageIII/astPostProcessing/fixupDefiningAndNondefiningDeclarations.C
===================================================================
--- branches/testonly/src/frontend/SageIII/astPostProcessing/fixupDefiningAndNondefiningDeclarations.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/astPostProcessing/fixupDefiningAndNondefiningDeclarations.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -59,13 +59,19 @@
           printf ("In FixupAstDefiningAndNondefiningDeclarations: node = %p = %s definingDeclaration = %p firstNondefiningDeclaration = %p \n",
                node,node->class_name().c_str(),definingDeclaration,firstNondefiningDeclaration);
 #endif
+
+
+#if 0 //FMZ (6/8/2008): caused core dump when read in a .rmod file
           if (definingDeclaration == NULL && firstNondefiningDeclaration == NULL)  
              {
                printf ("Error: declaration = %p = %s definingDeclaration         = %p \n",declaration,declaration->sage_class_name(),definingDeclaration);
                printf ("Error: declaration = %p = %s firstNondefiningDeclaration = %p \n",declaration,declaration->sage_class_name(),firstNondefiningDeclaration);
              }
           ROSE_ASSERT(definingDeclaration != NULL || firstNondefiningDeclaration != NULL);
+#endif
 
+
+
 #if 0
           printf ("In FixupAstDefiningAndNondefiningDeclarations: declaration            = %p = %s get_name() = %s \n",declaration,declaration->class_name().c_str(),SageInterface::get_name(declaration).c_str());
           printf ("                                               definingDeclaration    = %p get_name() = %s \n",definingDeclaration,(definingDeclaration != NULL) ? SageInterface::get_name(definingDeclaration).c_str() : "empty name");
@@ -445,7 +451,6 @@
                   }
                ROSE_ASSERT(declaration->hasExplicitScope() == false || declaration->get_scope() == definingDeclaration->get_scope());
 
-               ROSE_ASSERT(firstNondefiningDeclaration != NULL);
                if (firstNondefiningDeclaration != NULL)
                   {
 #if 0
@@ -484,6 +489,13 @@
                     ROSE_ASSERT(declaration->hasExplicitScope() == false || declaration->get_scope() == firstNondefiningDeclaration->get_scope());
                  // firstNondefiningDeclaration->set_scope();
                   }
+                  else
+                  { //Liao,10/31/2008
+                     //dump some debugging information before assertion 
+                    declaration->get_file_info()->display("fixupDefiningAndNondefiningDeclarations.C assertion:");
+
+                    ROSE_ASSERT(firstNondefiningDeclaration != NULL);
+                  }
                break;
              }
 

Modified: branches/testonly/src/frontend/SageIII/astTokenStream/linearizeAST.C
===================================================================
--- branches/testonly/src/frontend/SageIII/astTokenStream/linearizeAST.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/astTokenStream/linearizeAST.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -2,16 +2,16 @@
 // rose.C: Example (default) ROSE Preprocessor: used for testing ROSE infrastructure
 
 #include "linearizeAST.h"
-InheritedAttribute::InheritedAttribute () : loopNestDepth(0) {};
-InheritedAttribute::InheritedAttribute ( const InheritedAttribute & X ) {};
+LinInheritedAttribute::LinInheritedAttribute () : loopNestDepth(0) {};
+LinInheritedAttribute::LinInheritedAttribute ( const LinInheritedAttribute & X ) {};
 
 LinSynthesizedAttribute::LinSynthesizedAttribute() {};
 
 
-InheritedAttribute
+LinInheritedAttribute
 LinearizeAST::evaluateInheritedAttribute (
      SgNode* astNode,
-     InheritedAttribute inheritedAttribute )
+     LinInheritedAttribute inheritedAttribute )
    {
 
      if( (isSgLocatedNode(astNode)!=NULL) && ( (isSgScopeStatement(astNode)!=NULL)||(isSgValueExp(astNode)!=NULL)||(isSgVarRefExp(astNode)!=NULL)|| (isSgLocatedNode(astNode)->get_file_info()->isCompilerGenerated() == false)) ){
@@ -38,7 +38,7 @@
 LinSynthesizedAttribute
 LinearizeAST::evaluateSynthesizedAttribute (
      SgNode* astNode,
-     InheritedAttribute inheritedAttribute,
+     LinInheritedAttribute inheritedAttribute,
      SubTreeSynthesizedAttributes synthesizedAttributeList )
    {
      LinSynthesizedAttribute returnAttribute;
@@ -92,7 +92,7 @@
 linearize_subtree( SgNode* node )
    {
   // Build the inherited attribute
-     InheritedAttribute inheritedAttribute;
+     LinInheritedAttribute inheritedAttribute;
 
      LinearizeAST myTraversal;
 

Modified: branches/testonly/src/frontend/SageIII/astTokenStream/linearizeAST.h
===================================================================
--- branches/testonly/src/frontend/SageIII/astTokenStream/linearizeAST.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/astTokenStream/linearizeAST.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -7,13 +7,13 @@
 #include "rose.h"
 #include <stack>
 
-class InheritedAttribute
+class LinInheritedAttribute
    {
      public:
           int loopNestDepth;
 
-          InheritedAttribute ();
-          InheritedAttribute ( const InheritedAttribute & X );
+          LinInheritedAttribute ();
+          LinInheritedAttribute ( const LinInheritedAttribute & X );
    };
 
 class LinSynthesizedAttribute
@@ -23,7 +23,7 @@
    };
 
 
-class LinearizeAST : public SgTopDownBottomUpProcessing<InheritedAttribute,LinSynthesizedAttribute>
+class LinearizeAST : public SgTopDownBottomUpProcessing<LinInheritedAttribute,LinSynthesizedAttribute>
    {
      private:
 	  //The idea is to create an inorder ordering of the nodes using a SgTopDownBottomUp
@@ -52,13 +52,13 @@
 
 
        // Functions required
-          InheritedAttribute evaluateInheritedAttribute (
+          LinInheritedAttribute evaluateInheritedAttribute (
              SgNode* astNode, 
-             InheritedAttribute inheritedAttribute );
+             LinInheritedAttribute inheritedAttribute );
 
           LinSynthesizedAttribute evaluateSynthesizedAttribute (
              SgNode* astNode,
-             InheritedAttribute inheritedAttribute,
+             LinInheritedAttribute inheritedAttribute,
              SubTreeSynthesizedAttributes synthesizedAttributeList );
 
 	  std::vector<SgNode*>

Modified: branches/testonly/src/frontend/SageIII/astVisualization/wholeAST.C
===================================================================
--- branches/testonly/src/frontend/SageIII/astVisualization/wholeAST.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/astVisualization/wholeAST.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1114,6 +1114,7 @@
                   }
 
                case V_SgClassDeclaration:
+               case V_SgModuleStatement:
                case V_SgTemplateInstantiationDecl:
                   {
                     SgClassDeclaration* classDeclaration = isSgClassDeclaration(node);

Modified: branches/testonly/src/frontend/SageIII/attachPreprocessingInfo.C
===================================================================
--- branches/testonly/src/frontend/SageIII/attachPreprocessingInfo.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/attachPreprocessingInfo.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -333,8 +333,10 @@
   // DQ (12/10/2007): Declare Fortran specific lexical pass function explicitly.
   // extern int getFortranFixedFormatPreprocessorDirectives( std::string fileName );
   // extern int getFortranFreeFormatPreprocessorDirectives ( std::string fileName );
+#ifdef USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
      extern std::list <stream_element*>* getFortranFixedFormatPreprocessorDirectives( std::string fileName );
      extern std::list <stream_element*>* getFortranFreeFormatPreprocessorDirectives ( std::string fileName );
+#endif
 
   // Check if current AST node is an SgFile object
   // if ((currentFilePtr = dynamic_cast<SgFile*>(n)) != NULL)
@@ -358,6 +360,7 @@
             // currentListOfAttributes       = getPreprocessorDirectives( Sg_File_Info::getFilenameFromID(currentFileNameId) );
                if (currentFilePtr->get_Fortran_only() == true)
                   {
+#ifdef USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
                  // This is either of two different kinds of Fortran program: fixed format or free format
                  //    * fix format is used for older Fortran code, F77 and earlier, and 
                  //    * free format is used for newer codes, F90 and later
@@ -431,6 +434,10 @@
                        {
                          printf ("Done with processing of separate lexical pass to gather Fortran specific CPP directives and comments from the token stream \n");
                        }
+#else // for !USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+                    fprintf(stderr, "Fortran parser not enabled\n");
+                    abort();
+#endif // USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
                   }
                  else
                   {
@@ -1261,13 +1268,13 @@
                printf ("Adding preinclude file = %s \n",i->c_str());
 
        // DQ (4/7/2006): This currently fails
-          //first.force_include( i->c_str(), copyOf_i == preincludeList.rend() );
+          first.force_include( i->c_str(), copyOf_i == preincludeList.rend() );
 //          first.force_include( i->c_str(), false);
           
           if(SgProject::get_verbose() >= 1)
                printf ("DONE: Adding preinclude file = %s \n",i->c_str());
         }
-#if 0
+#if 1
 
                                  
      if(SgProject::get_verbose() >= 1)

Copied: branches/testonly/src/frontend/SageIII/dwarfSupport.C (from rev 128, trunk/src/frontend/SageIII/dwarfSupport.C)
===================================================================
--- branches/testonly/src/frontend/SageIII/dwarfSupport.C	                        (rev 0)
+++ branches/testonly/src/frontend/SageIII/dwarfSupport.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,3134 @@
+// This file represents initial support in the ROSE AST for Dwarf debug information.
+// Dwarf is generated when source code is compiled using a compiler's debug mode.
+// the Dwarf information is represented a special sections in the file format of 
+// the binary executable.  These sections are read using libdwarf (open source
+// library used for reading and writing dwarf sections).  In ROSE we read the
+// Dwarf information and build special IR nodes into the AST.  This work effects
+// only AST for binary executable files (the ROSE Binary AST).
+
+
+// DONE: Dwarf support handles sections: .debug_info, .debug_line
+// TODO: Add support for sections: .debug_pubnames, .debug_pubtypes, and .debug_macinfo
+
+
+#include "rose.h"
+
+// Allow "string" and "pair" to be used (whether or not USE_ROSE_DWARF_SUPPORT id defined to be true).
+using namespace std;
+
+
+// This is controled by using the --with-dwarf configure command line option.
+#if USE_ROSE_DWARF_SUPPORT
+
+#define DIE_STACK_SIZE 300
+static Dwarf_Die die_stack[DIE_STACK_SIZE];
+
+#define PUSH_DIE_STACK(x) { die_stack[indent_level] = x; }
+#define POP_DIE_STACK { die_stack[indent_level] = 0; }
+
+int indent_level = 0;
+bool local_symbols_already_began = false;
+
+bool check_tag_tree = false;
+
+int check_error;
+
+#define DWARF_CHECK_ERROR(str) {\
+        printf("*** DWARF CHECK: %s ***\n", str);\
+        check_error ++; \
+}
+
+#define DWARF_CHECK_ERROR2(str1, str2) {\
+        printf("*** DWARF CHECK: %s: %s ***\n", str1, str2);\
+        check_error ++; \
+}
+
+#define DWARF_CHECK_ERROR3(str1, str2,strexpl) {\
+        printf("*** DWARF CHECK: %s -> %s: %s ***\n", str1, str2,strexpl);\
+        check_error ++; \
+}
+
+typedef struct {
+    int checks;
+    int errors;
+} Dwarf_Check_Result;
+
+Dwarf_Check_Result tag_tree_result;
+Dwarf_Check_Result type_offset_result;
+Dwarf_Check_Result decl_file_result;
+
+bool info_flag = true;
+
+// Dwarf variables
+Dwarf_Debug rose_dwarf_dbg;
+Dwarf_Error rose_dwarf_error;
+
+int verbose = 1;
+// bool dense = false;
+
+bool ellipsis            = false;
+
+int break_after_n_units = INT_MAX;
+
+char cu_name[BUFSIZ];
+bool cu_name_flag = false;
+Dwarf_Unsigned cu_offset = 0;
+
+std::string program_name = "roseDwarfReader";
+
+
+
+void
+print_error(Dwarf_Debug dbg, string msg, int dwarf_code, Dwarf_Error err)
+   {
+  // Simple error message function
+     printf ("Error: %s \n",msg.c_str());
+     ROSE_ASSERT(false);
+   }
+
+void
+print_source_intro(Dwarf_Die cu_die)
+   {
+     Dwarf_Off off = 0;
+     int ores = dwarf_dieoffset(cu_die, &off, &rose_dwarf_error);
+
+     if (ores == DW_DLV_OK)
+        {
+          printf("Source lines (from CU-DIE at .debug_info offset %llu):\n",(unsigned long long) off);
+        }
+       else
+        {
+          printf("Source lines (for the CU-DIE at unknown location):\n");
+        }
+   }
+
+
+char *
+makename(char *s)
+{
+    char *newstr;
+
+    if (!s) {
+        return strdup("");
+    }
+
+    newstr = strdup(s);
+    if (newstr == 0) {
+        fprintf(stderr, "Out of memory mallocing %d bytes\n",
+                (int) strlen(s));
+        exit(1);
+    }
+    return newstr;
+}
+
+string
+get_TAG_name (Dwarf_Debug dbg, Dwarf_Half val)
+{
+	switch (val) {
+	case DW_TAG_array_type:
+			return "DW_TAG_array_type";
+	case DW_TAG_class_type:
+			return "DW_TAG_class_type";
+	case DW_TAG_entry_point:
+			return "DW_TAG_entry_point";
+	case DW_TAG_enumeration_type:
+			return "DW_TAG_enumeration_type";
+	case DW_TAG_formal_parameter:
+			return "DW_TAG_formal_parameter";
+	case DW_TAG_imported_declaration:
+			return "DW_TAG_imported_declaration";
+	case DW_TAG_label:
+			return "DW_TAG_label";
+	case DW_TAG_lexical_block:
+			return "DW_TAG_lexical_block";
+	case DW_TAG_member:
+			return "DW_TAG_member";
+	case DW_TAG_pointer_type:
+			return "DW_TAG_pointer_type";
+	case DW_TAG_reference_type:
+			return "DW_TAG_reference_type";
+	case DW_TAG_compile_unit:
+			return "DW_TAG_compile_unit";
+	case DW_TAG_string_type:
+			return "DW_TAG_string_type";
+	case DW_TAG_structure_type:
+			return "DW_TAG_structure_type";
+	case DW_TAG_subroutine_type:
+			return "DW_TAG_subroutine_type";
+	case DW_TAG_typedef:
+			return "DW_TAG_typedef";
+	case DW_TAG_union_type:
+			return "DW_TAG_union_type";
+	case DW_TAG_unspecified_parameters:
+			return "DW_TAG_unspecified_parameters";
+	case DW_TAG_variant:
+			return "DW_TAG_variant";
+	case DW_TAG_common_block:
+			return "DW_TAG_common_block";
+	case DW_TAG_common_inclusion:
+			return "DW_TAG_common_inclusion";
+	case DW_TAG_inheritance:
+			return "DW_TAG_inheritance";
+	case DW_TAG_inlined_subroutine:
+			return "DW_TAG_inlined_subroutine";
+	case DW_TAG_module:
+			return "DW_TAG_module";
+	case DW_TAG_ptr_to_member_type:
+			return "DW_TAG_ptr_to_member_type";
+	case DW_TAG_set_type:
+			return "DW_TAG_set_type";
+	case DW_TAG_subrange_type:
+			return "DW_TAG_subrange_type";
+	case DW_TAG_with_stmt:
+			return "DW_TAG_with_stmt";
+	case DW_TAG_access_declaration:
+			return "DW_TAG_access_declaration";
+	case DW_TAG_base_type:
+			return "DW_TAG_base_type";
+	case DW_TAG_catch_block:
+			return "DW_TAG_catch_block";
+	case DW_TAG_const_type:
+			return "DW_TAG_const_type";
+	case DW_TAG_constant:
+			return "DW_TAG_constant";
+	case DW_TAG_enumerator:
+			return "DW_TAG_enumerator";
+	case DW_TAG_file_type:
+			return "DW_TAG_file_type";
+	case DW_TAG_friend:
+			return "DW_TAG_friend";
+	case DW_TAG_namelist:
+			return "DW_TAG_namelist";
+	case DW_TAG_namelist_item:
+			return "DW_TAG_namelist_item";
+	case DW_TAG_packed_type:
+			return "DW_TAG_packed_type";
+	case DW_TAG_subprogram:
+			return "DW_TAG_subprogram";
+	case DW_TAG_template_type_parameter:
+			return "DW_TAG_template_type_parameter";
+	case DW_TAG_template_value_parameter:
+			return "DW_TAG_template_value_parameter";
+	case DW_TAG_thrown_type:
+			return "DW_TAG_thrown_type";
+	case DW_TAG_try_block:
+			return "DW_TAG_try_block";
+	case DW_TAG_variant_part:
+			return "DW_TAG_variant_part";
+	case DW_TAG_variable:
+			return "DW_TAG_variable";
+	case DW_TAG_volatile_type:
+			return "DW_TAG_volatile_type";
+	case DW_TAG_dwarf_procedure:
+			return "DW_TAG_dwarf_procedure";
+	case DW_TAG_restrict_type:
+			return "DW_TAG_restrict_type";
+	case DW_TAG_interface_type:
+			return "DW_TAG_interface_type";
+	case DW_TAG_namespace:
+			return "DW_TAG_namespace";
+	case DW_TAG_imported_module:
+			return "DW_TAG_imported_module";
+	case DW_TAG_unspecified_type:
+			return "DW_TAG_unspecified_type";
+	case DW_TAG_partial_unit:
+			return "DW_TAG_partial_unit";
+	case DW_TAG_imported_unit:
+			return "DW_TAG_imported_unit";
+	case DW_TAG_mutable_type:
+			return "DW_TAG_mutable_type";
+	case DW_TAG_condition:
+			return "DW_TAG_condition";
+	case DW_TAG_shared_type:
+			return "DW_TAG_shared_type";
+	case DW_TAG_lo_user:
+			return "DW_TAG_lo_user";
+	case DW_TAG_MIPS_loop:
+			return "DW_TAG_MIPS_loop";
+	case DW_TAG_HP_array_descriptor:
+			return "DW_TAG_HP_array_descriptor";
+	case DW_TAG_format_label:
+			return "DW_TAG_format_label";
+	case DW_TAG_function_template:
+			return "DW_TAG_function_template";
+	case DW_TAG_class_template:
+			return "DW_TAG_class_template";
+	case DW_TAG_GNU_BINCL:
+			return "DW_TAG_GNU_BINCL";
+	case DW_TAG_GNU_EINCL:
+			return "DW_TAG_GNU_EINCL";
+	case DW_TAG_ALTIUM_circ_type:
+			return "DW_TAG_ALTIUM_circ_type";
+	case DW_TAG_ALTIUM_mwa_circ_type:
+			return "DW_TAG_ALTIUM_mwa_circ_type";
+	case DW_TAG_ALTIUM_rev_carry_type:
+			return "DW_TAG_ALTIUM_rev_carry_type";
+	case DW_TAG_ALTIUM_rom:
+			return "DW_TAG_ALTIUM_rom";
+	case DW_TAG_upc_shared_type:
+			return "DW_TAG_upc_shared_type";
+	case DW_TAG_upc_strict_type:
+			return "DW_TAG_upc_strict_type";
+	case DW_TAG_upc_relaxed_type:
+			return "DW_TAG_upc_relaxed_type";
+	case DW_TAG_PGI_kanji_type:
+			return "DW_TAG_PGI_kanji_type";
+	case DW_TAG_PGI_interface_block:
+			return "DW_TAG_PGI_interface_block";
+	case DW_TAG_SUN_function_template:
+			return "DW_TAG_SUN_function_template";
+	case DW_TAG_SUN_class_template:
+			return "DW_TAG_SUN_class_template";
+	case DW_TAG_SUN_struct_template:
+			return "DW_TAG_SUN_struct_template";
+	case DW_TAG_SUN_union_template:
+			return "DW_TAG_SUN_union_template";
+	case DW_TAG_SUN_indirect_inheritance:
+			return "DW_TAG_SUN_indirect_inheritance";
+	case DW_TAG_SUN_codeflags:
+			return "DW_TAG_SUN_codeflags";
+	case DW_TAG_SUN_memop_info:
+			return "DW_TAG_SUN_memop_info";
+	case DW_TAG_SUN_omp_child_func:
+			return "DW_TAG_SUN_omp_child_func";
+	case DW_TAG_SUN_rtti_descriptor:
+			return "DW_TAG_SUN_rtti_descriptor";
+	case DW_TAG_SUN_dtor_info:
+			return "DW_TAG_SUN_dtor_info";
+	case DW_TAG_SUN_dtor:
+			return "DW_TAG_SUN_dtor";
+	case DW_TAG_SUN_f90_interface:
+			return "DW_TAG_SUN_f90_interface";
+	case DW_TAG_SUN_fortran_vax_structure:
+			return "DW_TAG_SUN_fortran_vax_structure";
+	case DW_TAG_SUN_hi:
+			return "DW_TAG_SUN_hi";
+	case DW_TAG_hi_user:
+			return "DW_TAG_hi_user";
+
+	default:
+		{ 
+		  char buf[100]; 
+		  char *n; 
+		  snprintf(buf,sizeof(buf),"<Unknown TAG value 0x%x>",(int)val);
+        fprintf(stderr,"TAG of %d (0x%x) is unknown to dwarfdump. " "Continuing. \n",(int)val,(int)val );  
+		  n = makename(buf);
+		  return n;
+		}
+	}
+
+}
+
+#if 0
+void
+print_attribute(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Half attr,Dwarf_Attribute attr_in,bool print_information,char **srcfiles, Dwarf_Signed cnt, SgAsmDwarfConstruct* asmDwarfConstruct)
+   {
+  // This function is not implemented!
+
+     printf ("Error: print_attribute is not implemented! \n");
+  // ROSE_ASSERT(false);
+   }
+#else
+
+string
+get_AT_name (Dwarf_Debug dbg, Dwarf_Half val)
+{
+	switch (val) {
+	case DW_AT_sibling:
+			return "DW_AT_sibling";
+	case DW_AT_location:
+			return "DW_AT_location";
+	case DW_AT_name:
+			return "DW_AT_name";
+	case DW_AT_ordering:
+			return "DW_AT_ordering";
+	case DW_AT_subscr_data:
+			return "DW_AT_subscr_data";
+	case DW_AT_byte_size:
+			return "DW_AT_byte_size";
+	case DW_AT_bit_offset:
+			return "DW_AT_bit_offset";
+	case DW_AT_bit_size:
+			return "DW_AT_bit_size";
+	case DW_AT_element_list:
+			return "DW_AT_element_list";
+	case DW_AT_stmt_list:
+			return "DW_AT_stmt_list";
+	case DW_AT_low_pc:
+			return "DW_AT_low_pc";
+	case DW_AT_high_pc:
+			return "DW_AT_high_pc";
+	case DW_AT_language:
+			return "DW_AT_language";
+	case DW_AT_member:
+			return "DW_AT_member";
+	case DW_AT_discr:
+			return "DW_AT_discr";
+	case DW_AT_discr_value:
+			return "DW_AT_discr_value";
+	case DW_AT_visibility:
+			return "DW_AT_visibility";
+	case DW_AT_import:
+			return "DW_AT_import";
+	case DW_AT_string_length:
+			return "DW_AT_string_length";
+	case DW_AT_common_reference:
+			return "DW_AT_common_reference";
+	case DW_AT_comp_dir:
+			return "DW_AT_comp_dir";
+	case DW_AT_const_value:
+			return "DW_AT_const_value";
+	case DW_AT_containing_type:
+			return "DW_AT_containing_type";
+	case DW_AT_default_value:
+			return "DW_AT_default_value";
+	case DW_AT_inline:
+			return "DW_AT_inline";
+	case DW_AT_is_optional:
+			return "DW_AT_is_optional";
+	case DW_AT_lower_bound:
+			return "DW_AT_lower_bound";
+	case DW_AT_producer:
+			return "DW_AT_producer";
+	case DW_AT_prototyped:
+			return "DW_AT_prototyped";
+	case DW_AT_return_addr:
+			return "DW_AT_return_addr";
+	case DW_AT_start_scope:
+			return "DW_AT_start_scope";
+	case DW_AT_bit_stride:
+			return "DW_AT_bit_stride";
+	case DW_AT_upper_bound:
+			return "DW_AT_upper_bound";
+	case DW_AT_abstract_origin:
+			return "DW_AT_abstract_origin";
+	case DW_AT_accessibility:
+			return "DW_AT_accessibility";
+	case DW_AT_address_class:
+			return "DW_AT_address_class";
+	case DW_AT_artificial:
+			return "DW_AT_artificial";
+	case DW_AT_base_types:
+			return "DW_AT_base_types";
+	case DW_AT_calling_convention:
+			return "DW_AT_calling_convention";
+	case DW_AT_count:
+			return "DW_AT_count";
+	case DW_AT_data_member_location:
+			return "DW_AT_data_member_location";
+	case DW_AT_decl_column:
+			return "DW_AT_decl_column";
+	case DW_AT_decl_file:
+			return "DW_AT_decl_file";
+	case DW_AT_decl_line:
+			return "DW_AT_decl_line";
+	case DW_AT_declaration:
+			return "DW_AT_declaration";
+	case DW_AT_discr_list:
+			return "DW_AT_discr_list";
+	case DW_AT_encoding:
+			return "DW_AT_encoding";
+	case DW_AT_external:
+			return "DW_AT_external";
+	case DW_AT_frame_base:
+			return "DW_AT_frame_base";
+	case DW_AT_friend:
+			return "DW_AT_friend";
+	case DW_AT_identifier_case:
+			return "DW_AT_identifier_case";
+	case DW_AT_macro_info:
+			return "DW_AT_macro_info";
+	case DW_AT_namelist_item:
+			return "DW_AT_namelist_item";
+	case DW_AT_priority:
+			return "DW_AT_priority";
+	case DW_AT_segment:
+			return "DW_AT_segment";
+	case DW_AT_specification:
+			return "DW_AT_specification";
+	case DW_AT_static_link:
+			return "DW_AT_static_link";
+	case DW_AT_type:
+			return "DW_AT_type";
+	case DW_AT_use_location:
+			return "DW_AT_use_location";
+	case DW_AT_variable_parameter:
+			return "DW_AT_variable_parameter";
+	case DW_AT_virtuality:
+			return "DW_AT_virtuality";
+	case DW_AT_vtable_elem_location:
+			return "DW_AT_vtable_elem_location";
+	case DW_AT_allocated:
+			return "DW_AT_allocated";
+	case DW_AT_associated:
+			return "DW_AT_associated";
+	case DW_AT_data_location:
+			return "DW_AT_data_location";
+	case DW_AT_byte_stride:
+			return "DW_AT_byte_stride";
+	case DW_AT_entry_pc:
+			return "DW_AT_entry_pc";
+	case DW_AT_use_UTF8:
+			return "DW_AT_use_UTF8";
+	case DW_AT_extension:
+			return "DW_AT_extension";
+	case DW_AT_ranges:
+			return "DW_AT_ranges";
+	case DW_AT_trampoline:
+			return "DW_AT_trampoline";
+	case DW_AT_call_column:
+			return "DW_AT_call_column";
+	case DW_AT_call_file:
+			return "DW_AT_call_file";
+	case DW_AT_call_line:
+			return "DW_AT_call_line";
+	case DW_AT_description:
+			return "DW_AT_description";
+	case DW_AT_binary_scale:
+			return "DW_AT_binary_scale";
+	case DW_AT_decimal_scale:
+			return "DW_AT_decimal_scale";
+	case DW_AT_small:
+			return "DW_AT_small";
+	case DW_AT_decimal_sign:
+			return "DW_AT_decimal_sign";
+	case DW_AT_digit_count:
+			return "DW_AT_digit_count";
+	case DW_AT_picture_string:
+			return "DW_AT_picture_string";
+	case DW_AT_mutable:
+			return "DW_AT_mutable";
+	case DW_AT_threads_scaled:
+			return "DW_AT_threads_scaled";
+	case DW_AT_explicit:
+			return "DW_AT_explicit";
+	case DW_AT_object_pointer:
+			return "DW_AT_object_pointer";
+	case DW_AT_endianity:
+			return "DW_AT_endianity";
+	case DW_AT_elemental:
+			return "DW_AT_elemental";
+	case DW_AT_pure:
+			return "DW_AT_pure";
+	case DW_AT_recursive:
+			return "DW_AT_recursive";
+	case DW_AT_HP_block_index:
+			return "DW_AT_HP_block_index";
+	case DW_AT_MIPS_fde:
+			return "DW_AT_MIPS_fde";
+	case DW_AT_MIPS_loop_begin:
+			return "DW_AT_MIPS_loop_begin";
+	case DW_AT_MIPS_tail_loop_begin:
+			return "DW_AT_MIPS_tail_loop_begin";
+	case DW_AT_MIPS_epilog_begin:
+			return "DW_AT_MIPS_epilog_begin";
+	case DW_AT_MIPS_loop_unroll_factor:
+			return "DW_AT_MIPS_loop_unroll_factor";
+	case DW_AT_MIPS_software_pipeline_depth:
+			return "DW_AT_MIPS_software_pipeline_depth";
+	case DW_AT_MIPS_linkage_name:
+			return "DW_AT_MIPS_linkage_name";
+	case DW_AT_MIPS_stride:
+			return "DW_AT_MIPS_stride";
+	case DW_AT_MIPS_abstract_name:
+			return "DW_AT_MIPS_abstract_name";
+	case DW_AT_MIPS_clone_origin:
+			return "DW_AT_MIPS_clone_origin";
+	case DW_AT_MIPS_has_inlines:
+			return "DW_AT_MIPS_has_inlines";
+	case DW_AT_MIPS_stride_byte:
+			return "DW_AT_MIPS_stride_byte";
+	case DW_AT_MIPS_stride_elem:
+			return "DW_AT_MIPS_stride_elem";
+	case DW_AT_MIPS_ptr_dopetype:
+			return "DW_AT_MIPS_ptr_dopetype";
+	case DW_AT_MIPS_allocatable_dopetype:
+			return "DW_AT_MIPS_allocatable_dopetype";
+	case DW_AT_MIPS_assumed_shape_dopetype:
+			return "DW_AT_MIPS_assumed_shape_dopetype";
+	case DW_AT_MIPS_assumed_size:
+			return "DW_AT_MIPS_assumed_size";
+	case DW_AT_HP_raw_data_ptr:
+			return "DW_AT_HP_raw_data_ptr";
+	case DW_AT_HP_pass_by_reference:
+			return "DW_AT_HP_pass_by_reference";
+	case DW_AT_HP_opt_level:
+			return "DW_AT_HP_opt_level";
+	case DW_AT_HP_prof_version_id:
+			return "DW_AT_HP_prof_version_id";
+	case DW_AT_HP_opt_flags:
+			return "DW_AT_HP_opt_flags";
+	case DW_AT_HP_cold_region_low_pc:
+			return "DW_AT_HP_cold_region_low_pc";
+	case DW_AT_HP_cold_region_high_pc:
+			return "DW_AT_HP_cold_region_high_pc";
+	case DW_AT_HP_all_variables_modifiable:
+			return "DW_AT_HP_all_variables_modifiable";
+	case DW_AT_HP_linkage_name:
+			return "DW_AT_HP_linkage_name";
+	case DW_AT_HP_prof_flags:
+			return "DW_AT_HP_prof_flags";
+	case DW_AT_sf_names:
+			return "DW_AT_sf_names";
+	case DW_AT_src_info:
+			return "DW_AT_src_info";
+	case DW_AT_mac_info:
+			return "DW_AT_mac_info";
+	case DW_AT_src_coords:
+			return "DW_AT_src_coords";
+	case DW_AT_body_begin:
+			return "DW_AT_body_begin";
+	case DW_AT_body_end:
+			return "DW_AT_body_end";
+	case DW_AT_GNU_vector:
+			return "DW_AT_GNU_vector";
+	case DW_AT_ALTIUM_loclist:
+			return "DW_AT_ALTIUM_loclist";
+	case DW_AT_PGI_lbase:
+			return "DW_AT_PGI_lbase";
+	case DW_AT_PGI_soffset:
+			return "DW_AT_PGI_soffset";
+	case DW_AT_PGI_lstride:
+			return "DW_AT_PGI_lstride";
+	case DW_AT_upc_threads_scaled:
+			return "DW_AT_upc_threads_scaled";
+	case DW_AT_SUN_template:
+			return "DW_AT_SUN_template";
+	case DW_AT_SUN_alignment:
+			return "DW_AT_SUN_alignment";
+	case DW_AT_SUN_vtable:
+			return "DW_AT_SUN_vtable";
+	case DW_AT_SUN_count_guarantee:
+			return "DW_AT_SUN_count_guarantee";
+	case DW_AT_SUN_command_line:
+			return "DW_AT_SUN_command_line";
+	case DW_AT_SUN_vbase:
+			return "DW_AT_SUN_vbase";
+	case DW_AT_SUN_compile_options:
+			return "DW_AT_SUN_compile_options";
+	case DW_AT_SUN_language:
+			return "DW_AT_SUN_language";
+	case DW_AT_SUN_browser_file:
+			return "DW_AT_SUN_browser_file";
+	case DW_AT_SUN_vtable_abi:
+			return "DW_AT_SUN_vtable_abi";
+	case DW_AT_SUN_func_offsets:
+			return "DW_AT_SUN_func_offsets";
+	case DW_AT_SUN_cf_kind:
+			return "DW_AT_SUN_cf_kind";
+	case DW_AT_SUN_vtable_index:
+			return "DW_AT_SUN_vtable_index";
+	case DW_AT_SUN_omp_tpriv_addr:
+			return "DW_AT_SUN_omp_tpriv_addr";
+	case DW_AT_SUN_omp_child_func:
+			return "DW_AT_SUN_omp_child_func";
+	case DW_AT_SUN_func_offset:
+			return "DW_AT_SUN_func_offset";
+	case DW_AT_SUN_memop_type_ref:
+			return "DW_AT_SUN_memop_type_ref";
+	case DW_AT_SUN_profile_id:
+			return "DW_AT_SUN_profile_id";
+	case DW_AT_SUN_memop_signature:
+			return "DW_AT_SUN_memop_signature";
+	case DW_AT_SUN_obj_dir:
+			return "DW_AT_SUN_obj_dir";
+	case DW_AT_SUN_obj_file:
+			return "DW_AT_SUN_obj_file";
+	case DW_AT_SUN_original_name:
+			return "DW_AT_SUN_original_name";
+	case DW_AT_SUN_hwcprof_signature:
+			return "DW_AT_SUN_hwcprof_signature";
+	case DW_AT_SUN_amd64_parmdump:
+			return "DW_AT_SUN_amd64_parmdump";
+	case DW_AT_SUN_part_link_name:
+			return "DW_AT_SUN_part_link_name";
+	case DW_AT_SUN_link_name:
+			return "DW_AT_SUN_link_name";
+	case DW_AT_SUN_pass_with_const:
+			return "DW_AT_SUN_pass_with_const";
+	case DW_AT_SUN_return_with_const:
+			return "DW_AT_SUN_return_with_const";
+	case DW_AT_SUN_import_by_name:
+			return "DW_AT_SUN_import_by_name";
+	case DW_AT_SUN_f90_pointer:
+			return "DW_AT_SUN_f90_pointer";
+	case DW_AT_SUN_pass_by_ref:
+			return "DW_AT_SUN_pass_by_ref";
+	case DW_AT_SUN_f90_allocatable:
+			return "DW_AT_SUN_f90_allocatable";
+	case DW_AT_SUN_f90_assumed_shape_array:
+			return "DW_AT_SUN_f90_assumed_shape_array";
+	case DW_AT_SUN_c_vla:
+			return "DW_AT_SUN_c_vla";
+	case DW_AT_SUN_return_value_ptr:
+			return "DW_AT_SUN_return_value_ptr";
+	case DW_AT_SUN_dtor_start:
+			return "DW_AT_SUN_dtor_start";
+	case DW_AT_SUN_dtor_length:
+			return "DW_AT_SUN_dtor_length";
+	case DW_AT_SUN_dtor_state_initial:
+			return "DW_AT_SUN_dtor_state_initial";
+	case DW_AT_SUN_dtor_state_final:
+			return "DW_AT_SUN_dtor_state_final";
+	case DW_AT_SUN_dtor_state_deltas:
+			return "DW_AT_SUN_dtor_state_deltas";
+	case DW_AT_SUN_import_by_lname:
+			return "DW_AT_SUN_import_by_lname";
+	case DW_AT_SUN_f90_use_only:
+			return "DW_AT_SUN_f90_use_only";
+	case DW_AT_SUN_namelist_spec:
+			return "DW_AT_SUN_namelist_spec";
+	case DW_AT_SUN_is_omp_child_func:
+			return "DW_AT_SUN_is_omp_child_func";
+	case DW_AT_SUN_fortran_main_alias:
+			return "DW_AT_SUN_fortran_main_alias";
+	case DW_AT_SUN_fortran_based:
+			return "DW_AT_SUN_fortran_based";
+	case DW_AT_hi_user:
+			return "DW_AT_hi_user";
+
+	default:
+		{ 
+        char buf[100]; 
+        char *n; 
+        snprintf(buf,sizeof(buf),"<Unknown AT value 0x%x>",(int)val);
+        fprintf(stderr,"AT of %d (0x%x) is unknown to dwarfdump. Continuing. \n",(int)val,(int)val );  
+        n = makename(buf);
+        return n; 
+		}
+	}
+}
+
+string
+get_LANG_name (Dwarf_Debug dbg, Dwarf_Half val)
+{
+	switch (val) {
+	case DW_LANG_C89:
+			return "DW_LANG_C89";
+	case DW_LANG_C:
+			return "DW_LANG_C";
+	case DW_LANG_Ada83:
+			return "DW_LANG_Ada83";
+	case DW_LANG_C_plus_plus:
+			return "DW_LANG_C_plus_plus";
+	case DW_LANG_Cobol74:
+			return "DW_LANG_Cobol74";
+	case DW_LANG_Cobol85:
+			return "DW_LANG_Cobol85";
+	case DW_LANG_Fortran77:
+			return "DW_LANG_Fortran77";
+	case DW_LANG_Fortran90:
+			return "DW_LANG_Fortran90";
+	case DW_LANG_Pascal83:
+			return "DW_LANG_Pascal83";
+	case DW_LANG_Modula2:
+			return "DW_LANG_Modula2";
+	case DW_LANG_Java:
+			return "DW_LANG_Java";
+	case DW_LANG_C99:
+			return "DW_LANG_C99";
+	case DW_LANG_Ada95:
+			return "DW_LANG_Ada95";
+	case DW_LANG_Fortran95:
+			return "DW_LANG_Fortran95";
+	case DW_LANG_PLI:
+			return "DW_LANG_PLI";
+	case DW_LANG_ObjC:
+			return "DW_LANG_ObjC";
+	case DW_LANG_ObjC_plus_plus:
+			return "DW_LANG_ObjC_plus_plus";
+	case DW_LANG_UPC:
+			return "DW_LANG_UPC";
+	case DW_LANG_D:
+			return "DW_LANG_D";
+	case DW_LANG_lo_user:
+			return "DW_LANG_lo_user";
+	case DW_LANG_Mips_Assembler:
+			return "DW_LANG_Mips_Assembler";
+	case DW_LANG_Upc:
+			return "DW_LANG_Upc";
+	case DW_LANG_ALTIUM_Assembler:
+			return "DW_LANG_ALTIUM_Assembler";
+	case DW_LANG_SUN_Assembler:
+			return "DW_LANG_SUN_Assembler";
+	case DW_LANG_hi_user:
+			return "DW_LANG_hi_user";
+
+	default:
+		{ 
+        char buf[100]; 
+        char *n; 
+        snprintf(buf,sizeof(buf),"<Unknown LANG value 0x%x>",(int)val);
+        fprintf(stderr,"LANG of %d (0x%x) is unknown to dwarfdump. Continuing. \n",(int)val,(int)val );  
+        n = makename(buf);
+        return n; 
+		} 
+	}
+}
+
+
+// Typedef for function pointer type used in get_small_encoding_integer_and_name() function paramter.
+typedef string(*encoding_type_func) (Dwarf_Debug dbg, Dwarf_Half val);
+
+int
+get_small_encoding_integer_and_name( Dwarf_Debug dbg, Dwarf_Attribute attrib, Dwarf_Unsigned * uval_out, char *attr_name, string * string_out, encoding_type_func val_as_string, Dwarf_Error * err)
+   {
+     Dwarf_Unsigned uval = 0;
+     char buf[100];              /* The strings are small. */
+     int vres = dwarf_formudata(attrib, &uval, err);
+
+     if (vres != DW_DLV_OK)
+        {
+          Dwarf_Signed sval = 0;
+
+          vres = dwarf_formsdata(attrib, &sval, err);
+          if (vres != DW_DLV_OK)
+             {
+               if (string_out != 0)
+                  {
+                    snprintf(buf, sizeof(buf),"%s has a bad form.", attr_name);
+                    *string_out = makename(buf);
+                  }
+               return vres;
+             }
+          *uval_out = (Dwarf_Unsigned) sval;
+        }
+       else
+        {
+          *uval_out = uval;
+        }
+
+     if (string_out)
+          *string_out = val_as_string(dbg, (Dwarf_Half) uval);
+
+     return DW_DLV_OK;
+   }
+
+// static void formx_unsigned(Dwarf_Unsigned u, struct esb_s *esbp)
+static void formx_unsigned(Dwarf_Unsigned u, string *esbp)
+   {
+     char small_buf[40];
+     snprintf(small_buf, sizeof(small_buf),"%llu", (unsigned long long)u);
+  // esb_append(esbp, small_buf);
+     *esbp += small_buf;
+   }
+
+// static void formx_signed(Dwarf_Signed u, struct esb_s *esbp)
+void formx_signed(Dwarf_Signed u, string *esbp)
+   {
+     char small_buf[40];
+     snprintf(small_buf, sizeof(small_buf),"%lld", (long long)u);
+  // esb_append(esbp, small_buf);
+     *esbp += small_buf;
+   }
+
+/* We think this is an integer. Figure out how to print it.
+   In case the signedness is ambiguous (such as on 
+   DW_FORM_data1 (ie, unknown signedness) print two ways.
+*/
+// static int formxdata_print_value(Dwarf_Attribute attrib, struct esb_s *esbp, Dwarf_Error * err)
+int formxdata_print_value(Dwarf_Attribute attrib, string *esbp, Dwarf_Error * err)
+   {
+    Dwarf_Signed tempsd = 0;
+    Dwarf_Unsigned tempud = 0;
+    int sres = 0;
+    int ures = 0;
+    Dwarf_Error serr = 0;
+    ures = dwarf_formudata(attrib, &tempud, err);
+    sres = dwarf_formsdata(attrib, &tempsd, &serr);
+    if(ures == DW_DLV_OK) {
+      if(sres == DW_DLV_OK) {
+
+     // if(tempud == tempsd)
+        if((Dwarf_Signed)tempud == tempsd)
+        {
+           /* Data is the same value, so makes no difference which
+                we print. */
+           formx_unsigned(tempud,esbp);
+        } else {
+           formx_unsigned(tempud,esbp);
+        // esb_append(esbp,"(as signed = ");
+           *esbp += "(as signed = ";
+           formx_signed(tempsd,esbp);
+        // esb_append(esbp,")");
+           *esbp += ")";
+        }
+      } else if (sres == DW_DLV_NO_ENTRY) {
+        formx_unsigned(tempud,esbp);
+      } else /* DW_DLV_ERROR */{
+        formx_unsigned(tempud,esbp);
+      }
+      return DW_DLV_OK;
+    } else  if (ures == DW_DLV_NO_ENTRY) {
+      if(sres == DW_DLV_OK) {
+        formx_signed(tempsd,esbp);
+        return sres;
+      } else if (sres == DW_DLV_NO_ENTRY) {
+        return sres;
+      } else /* DW_DLV_ERROR */{
+        *err = serr;
+        return sres;
+      }
+    } 
+    /* else ures ==  DW_DLV_ERROR */ 
+    if(sres == DW_DLV_OK) {
+        formx_signed(tempsd,esbp);
+    } else if (sres == DW_DLV_NO_ENTRY) {
+        return ures;
+    } 
+    /* DW_DLV_ERROR */
+    return ures;
+}
+
+
+
+/* Fill buffer with attribute value.
+   We pass in tag so we can try to do the right thing with
+   broken compiler DW_TAG_enumerator 
+
+   We append to esbp's buffer.
+
+*/
+// static void get_attr_value(Dwarf_Debug dbg, Dwarf_Half tag, Dwarf_Attribute attrib,char **srcfiles, Dwarf_Signed cnt, struct esb_s *esbp)
+void get_attr_value(Dwarf_Debug dbg, Dwarf_Half tag, Dwarf_Attribute attrib,char **srcfiles, Dwarf_Signed cnt, string *esbp)
+{
+    Dwarf_Half theform;
+    char* temps;
+    Dwarf_Block *tempb;
+    Dwarf_Signed tempsd = 0;
+    Dwarf_Unsigned tempud = 0;
+    int i;
+    Dwarf_Half attr;
+    Dwarf_Off off;
+    Dwarf_Die die_for_check;
+    Dwarf_Half tag_for_check;
+    Dwarf_Bool tempbool;
+    Dwarf_Addr addr = 0;
+    int fres;
+    int bres;
+    int wres;
+    int dres;
+    Dwarf_Half direct_form = 0;
+    char small_buf[100];
+
+  // DQ: Added these here instead of in global scope
+     Dwarf_Off fde_offset_for_cu_low = DW_DLV_BADOFFSET;
+     Dwarf_Off fde_offset_for_cu_high = DW_DLV_BADOFFSET;
+
+
+    fres = dwarf_whatform(attrib, &theform, &rose_dwarf_error);
+    /* depending on the form and the attribute, process the form */
+    if (fres == DW_DLV_ERROR) {
+        print_error(dbg, "dwarf_whatform cannot find attr form", fres,rose_dwarf_error);
+    } else if (fres == DW_DLV_NO_ENTRY) {
+        return;
+    }
+
+    dwarf_whatform_direct(attrib, &direct_form, &rose_dwarf_error);
+    /* ignore errors in dwarf_whatform_direct() */
+
+
+    switch (theform) {
+    case DW_FORM_addr:
+        bres = dwarf_formaddr(attrib, &addr, &rose_dwarf_error);
+        if (bres == DW_DLV_OK) {
+            snprintf(small_buf, sizeof(small_buf), "%#llx",(unsigned long long) addr);
+         // esb_append(esbp, small_buf);
+            *esbp += small_buf;
+        } else {
+            print_error(dbg, "addr formwith no addr?!", bres, rose_dwarf_error);
+        }
+        break;
+    case DW_FORM_ref_addr:
+        /* DW_FORM_ref_addr is not accessed thru formref: ** it is an
+           address (global section offset) in ** the .debug_info
+           section. */
+        bres = dwarf_global_formref(attrib, &off, &rose_dwarf_error);
+        if (bres == DW_DLV_OK) {
+            snprintf(small_buf, sizeof(small_buf),"<global die offset %llu>",(unsigned long long) off);
+         // esb_append(esbp, small_buf);
+            *esbp += small_buf;
+        } else {
+            print_error(dbg,"DW_FORM_ref_addr form with no reference?!",bres, rose_dwarf_error);
+        }
+        break;
+    case DW_FORM_ref1:
+    case DW_FORM_ref2:
+    case DW_FORM_ref4:
+    case DW_FORM_ref8:
+    case DW_FORM_ref_udata:
+       {
+        bres = dwarf_formref(attrib, &off, &rose_dwarf_error);
+        if (bres != DW_DLV_OK) {
+            print_error(dbg, "ref formwith no ref?!", bres, rose_dwarf_error);
+        }
+        /* do references inside <> to distinguish them ** from
+           constants. In dense form this results in <<>>. Ugly for
+           dense form, but better than ambiguous. davea 9/94 */
+        snprintf(small_buf, sizeof(small_buf), "<%llu>", off);
+     // esb_append(esbp, small_buf);
+        *esbp += small_buf;
+
+     // DQ: Added bool directly
+        bool check_type_offset = false;
+
+        if (check_type_offset) {
+            wres = dwarf_whatattr(attrib, &attr, &rose_dwarf_error);
+            if (wres == DW_DLV_ERROR) {
+
+            } else if (wres == DW_DLV_NO_ENTRY) {
+            }
+            if (attr == DW_AT_type) {
+                dres = dwarf_offdie(dbg, cu_offset + off,&die_for_check, &rose_dwarf_error);
+                type_offset_result.checks++;
+                if (dres != DW_DLV_OK) {
+                    type_offset_result.errors++;
+                    DWARF_CHECK_ERROR
+                        ("DW_AT_type offset does not point to type info")
+                } else {
+                    int tres2;
+
+                    tres2 =
+                        dwarf_tag(die_for_check, &tag_for_check, &rose_dwarf_error);
+                    if (tres2 == DW_DLV_OK) {
+                        switch (tag_for_check) {
+                        case DW_TAG_array_type:
+                        case DW_TAG_class_type:
+                        case DW_TAG_enumeration_type:
+                        case DW_TAG_pointer_type:
+                        case DW_TAG_reference_type:
+                        case DW_TAG_string_type:
+                        case DW_TAG_structure_type:
+                        case DW_TAG_subroutine_type:
+                        case DW_TAG_typedef:
+                        case DW_TAG_union_type:
+                        case DW_TAG_ptr_to_member_type:
+                        case DW_TAG_set_type:
+                        case DW_TAG_subrange_type:
+                        case DW_TAG_base_type:
+                        case DW_TAG_const_type:
+                        case DW_TAG_file_type:
+                        case DW_TAG_packed_type:
+                        case DW_TAG_thrown_type:
+                        case DW_TAG_volatile_type:
+                            /* OK */
+                            break;
+                        default:
+                            type_offset_result.errors++;
+                            DWARF_CHECK_ERROR("DW_AT_type offset does not point to type info")
+                                break;
+                        }
+                        dwarf_dealloc(dbg, die_for_check, DW_DLA_DIE);
+                    } else {
+                        type_offset_result.errors++;
+                        DWARF_CHECK_ERROR("DW_AT_type offset does not exist")
+                    }
+                }
+            }
+        }
+        break;
+       }
+    case DW_FORM_block:
+    case DW_FORM_block1:
+    case DW_FORM_block2:
+    case DW_FORM_block4:
+        fres = dwarf_formblock(attrib, &tempb, &rose_dwarf_error);
+        if (fres == DW_DLV_OK) {
+         // for (i = 0; i < tempb->bl_len; i++) {
+            for (i = 0; i < (int) tempb->bl_len; i++) {
+                snprintf(small_buf, sizeof(small_buf), "%02x",*(i + (unsigned char *) tempb->bl_data));
+             // esb_append(esbp, small_buf);
+                *esbp += small_buf;
+            }
+            dwarf_dealloc(dbg, tempb, DW_DLA_BLOCK);
+        } else {
+            print_error(dbg, "DW_FORM_blockn cannot get block\n", fres,rose_dwarf_error);
+        }
+        break;
+    case DW_FORM_data1:
+    case DW_FORM_data2:
+    case DW_FORM_data4:
+    case DW_FORM_data8:
+        fres = dwarf_whatattr(attrib, &attr, &rose_dwarf_error);
+        if (fres == DW_DLV_ERROR) {
+            print_error(dbg, "FORM_datan cannot get attr", fres, rose_dwarf_error);
+        } else if (fres == DW_DLV_NO_ENTRY) {
+            print_error(dbg, "FORM_datan cannot get attr", fres, rose_dwarf_error);
+        } else {
+            switch (attr) {
+            case DW_AT_ordering:
+            case DW_AT_byte_size:
+            case DW_AT_bit_offset:
+            case DW_AT_bit_size:
+            case DW_AT_inline:
+            case DW_AT_language:
+            case DW_AT_visibility:
+            case DW_AT_virtuality:
+            case DW_AT_accessibility:
+            case DW_AT_address_class:
+            case DW_AT_calling_convention:
+            case DW_AT_discr_list:      /* DWARF3 */
+            case DW_AT_encoding:
+            case DW_AT_identifier_case:
+            case DW_AT_MIPS_loop_unroll_factor:
+            case DW_AT_MIPS_software_pipeline_depth:
+            case DW_AT_decl_column:
+            case DW_AT_decl_file:
+            case DW_AT_decl_line:
+            case DW_AT_call_column:
+            case DW_AT_call_file:
+            case DW_AT_call_line:
+            case DW_AT_start_scope:
+            case DW_AT_byte_stride:
+            case DW_AT_bit_stride:
+            case DW_AT_count:
+            case DW_AT_stmt_list:
+            case DW_AT_MIPS_fde:
+               {
+                wres = get_small_encoding_integer_and_name(dbg,
+                                                           attrib,
+                                                           &tempud,
+                                                           /* attrname */
+                                                           (char *) NULL,
+                                                           /* err_string 
+                                                            */ 
+                                                           (string*)NULL,
+                                                           (encoding_type_func) 0,
+                                                           &rose_dwarf_error);
+
+                if (wres == DW_DLV_OK) {
+                    snprintf(small_buf, sizeof(small_buf), "%llu",tempud);
+                 // esb_append(esbp, small_buf);
+                    *esbp += small_buf;
+
+                    if (attr == DW_AT_decl_file || attr == DW_AT_call_file) {
+                     // if (srcfiles && tempud > 0 && tempud <= cnt)
+                        if (srcfiles && (int)tempud > 0 && (int)tempud <= cnt) {
+                            /* added by user request */
+                            /* srcfiles is indexed starting at 0, but
+                               DW_AT_decl_file defines that 0 means no
+                               file, so tempud 1 means the 0th entry in
+                               srcfiles, thus tempud-1 is the correct
+                               index into srcfiles.  */
+                            char *fname = srcfiles[tempud - 1];
+
+                         // esb_append(esbp, " ");
+                         // esb_append(esbp, fname);
+                            *esbp += " ";
+                            *esbp += fname;
+                       }
+
+                       bool check_decl_file = false;
+
+                       if(check_decl_file) {
+                           decl_file_result.checks++;
+                           /* Zero is always a legal index, it means
+                              no source name provided. */
+                        // if(tempud > cnt)
+                           if( (int)tempud > cnt) {
+                               decl_file_result.errors++;
+                               DWARF_CHECK_ERROR2(get_AT_name(dbg,attr).c_str(),"does not point to valid file info");
+                           }
+                       }
+                    }
+                } else {
+                    print_error(dbg, "Cannot get encoding attribute ..",wres, rose_dwarf_error);
+                }
+                break;
+               }
+
+            case DW_AT_const_value:
+                wres = formxdata_print_value(attrib,esbp, &rose_dwarf_error);
+                if(wres == DW_DLV_OK){
+                    /* String appended already. */
+                } else if (wres == DW_DLV_NO_ENTRY) {
+                    /* nothing? */
+                } else {
+                   print_error(dbg,"Cannot get DW_AT_const_value ",wres,rose_dwarf_error);
+                }
+  
+                
+                break;
+            case DW_AT_upper_bound:
+            case DW_AT_lower_bound:
+            default:
+                wres = formxdata_print_value(attrib,esbp, &rose_dwarf_error);
+                if (wres == DW_DLV_OK) {
+                    /* String appended already. */
+                } else if (wres == DW_DLV_NO_ENTRY) {
+                    /* nothing? */
+                } else {
+                    print_error(dbg, "Cannot get formsdata..", wres,rose_dwarf_error);
+                }
+                break;
+            }
+        }
+        if (cu_name_flag) {
+            if (attr == DW_AT_MIPS_fde) {
+                if (fde_offset_for_cu_low == DW_DLV_BADOFFSET) {
+                    fde_offset_for_cu_low
+                        = fde_offset_for_cu_high = tempud;
+                } else if (tempud < fde_offset_for_cu_low) {
+                    fde_offset_for_cu_low = tempud;
+                } else if (tempud > fde_offset_for_cu_high) {
+                    fde_offset_for_cu_high = tempud;
+                }
+            }
+        }
+        break;
+    case DW_FORM_sdata:
+        wres = dwarf_formsdata(attrib, &tempsd, &rose_dwarf_error);
+        if (wres == DW_DLV_OK) {
+            snprintf(small_buf, sizeof(small_buf), "%lld", tempsd);
+         // esb_append(esbp, small_buf);
+            *esbp += small_buf;
+        } else if (wres == DW_DLV_NO_ENTRY) {
+            /* nothing? */
+        } else {
+            print_error(dbg, "Cannot get formsdata..", wres, rose_dwarf_error);
+        }
+        break;
+    case DW_FORM_udata:
+        wres = dwarf_formudata(attrib, &tempud, &rose_dwarf_error);
+        if (wres == DW_DLV_OK) {
+            snprintf(small_buf, sizeof(small_buf), "%llu", tempud);
+         // esb_append(esbp, small_buf);
+            *esbp += small_buf;
+        } else if (wres == DW_DLV_NO_ENTRY) {
+            /* nothing? */
+        } else {
+            print_error(dbg, "Cannot get formudata....", wres, rose_dwarf_error);
+        }
+        break;
+    case DW_FORM_string:
+    case DW_FORM_strp:
+        wres = dwarf_formstring(attrib, &temps, &rose_dwarf_error);
+        if (wres == DW_DLV_OK) {
+         // esb_append(esbp, temps);
+            *esbp += temps;
+        } else if (wres == DW_DLV_NO_ENTRY) {
+            /* nothing? */
+        } else {
+            print_error(dbg, "Cannot get a formstr (or a formstrp)....",wres, rose_dwarf_error);
+        }
+
+        break;
+    case DW_FORM_flag:
+        wres = dwarf_formflag(attrib, &tempbool, &rose_dwarf_error);
+        if (wres == DW_DLV_OK) {
+            if (tempbool) {
+                snprintf(small_buf, sizeof(small_buf), "yes(%d)",tempbool);
+             // esb_append(esbp, small_buf);
+                *esbp += small_buf;
+            } else {
+                snprintf(small_buf, sizeof(small_buf), "no");
+             // esb_append(esbp, small_buf);
+                *esbp += small_buf;
+            }
+        } else if (wres == DW_DLV_NO_ENTRY) {
+            /* nothing? */
+        } else {
+            print_error(dbg, "Cannot get formflag/p....", wres, rose_dwarf_error);
+        }
+        break;
+    case DW_FORM_indirect:
+        /* We should not ever get here, since the true form was
+           determined and direct_form has the DW_FORM_indirect if it is
+           used here in this attr. */
+     // esb_append(esbp, get_FORM_name(dbg, theform));
+
+       printf ("Error: If we should never get here then make this an error! \n");
+       ROSE_ASSERT(false);
+
+     // *esbp += get_FORM_name(dbg, theform);
+        break;
+    default:
+        print_error(dbg, "dwarf_whatform unexpected value", DW_DLV_OK,rose_dwarf_error);
+    }
+    if (verbose && direct_form && direct_form == DW_FORM_indirect)
+    {
+     // char *form_indir = " (used DW_FORM_indirect) ";
+        char *form_indir = strdup(" (used DW_FORM_indirect) ");
+
+     // esb_append(esbp, form_indir);
+        *esbp += form_indir;
+    }
+}
+
+void
+print_attribute(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Half attr, Dwarf_Attribute attr_in,bool print_information,char **srcfiles, Dwarf_Signed cnt, SgAsmDwarfConstruct* asmDwarfConstruct)
+   {
+     Dwarf_Attribute attrib = 0;
+     Dwarf_Unsigned uval = 0;
+     string atname;
+     string valname;
+     int tres = 0;
+     Dwarf_Half tag = 0;
+
+  // Added C++ string support to replace C style string support
+     string esb_base;
+
+     atname = get_AT_name(dbg, attr);
+
+  // printf ("In print_attribute(): attribute type (atname) = %s asmDwarfConstruct = %s \n",atname.c_str(),asmDwarfConstruct->class_name().c_str());
+
+  // Set the name in the SgAsmDwarfConstruct (base class)
+  // asmDwarfConstruct->set_name(atname);
+
+  /* the following gets the real attribute, even in the face of an 
+     incorrect doubling, or worse, of attributes */
+     attrib = attr_in;
+
+  /* do not get attr via dwarf_attr: if there are (erroneously) 
+     multiple of an attr in a DIE, dwarf_attr will not get the
+     second, erroneous one and dwarfdump will print the first one
+     multiple times. Oops. */
+
+     tres = dwarf_tag(die, &tag, &rose_dwarf_error);
+     if (tres == DW_DLV_ERROR)
+        {
+          tag = 0;
+        }
+       else
+        {
+          if (tres == DW_DLV_NO_ENTRY)
+             {
+               tag = 0;
+             }
+            else
+             {
+            /* ok */
+             }
+        }
+
+#if 0
+  // This is just Dwarf error checking.
+
+  // DQ: added bool value directly
+     bool check_attr_tag = true;
+
+     if (check_attr_tag)
+        {
+          string tagname = "<tag invalid>";
+
+          attr_tag_result.checks++;
+          if (tres == DW_DLV_ERROR)
+             {
+               attr_tag_result.errors++;
+               DWARF_CHECK_ERROR3(tagname.c_str(),get_AT_name(dbg, attr).c_str(),"check the tag-attr combination.");
+             }
+            else
+             {
+               if (tres == DW_DLV_NO_ENTRY)
+                  {
+                    attr_tag_result.errors++;
+                    DWARF_CHECK_ERROR3(tagname.c_str(),get_AT_name(dbg, attr).c_str(),"check the tag-attr combination..")
+                  }
+                 else 
+                  {
+                    if (tag_attr_combination(tag, attr))
+                       {
+                      /* OK */
+                       }
+                      else
+                       {
+                         attr_tag_result.errors++;
+                         tagname = get_TAG_name(dbg, tag);
+                         DWARF_CHECK_ERROR3(tagname.c_str(),get_AT_name(dbg, attr).c_str(),"check the tag-attr combination")
+                       }
+                  }
+             }
+        }
+#endif
+
+     switch (attr)
+        {
+          case DW_AT_language:
+             {
+            // get_small_encoding_integer_and_name(dbg, attrib, &uval,"DW_AT_language", &valname,get_LANG_name, &rose_dwarf_error);
+               get_small_encoding_integer_and_name(dbg, attrib, &uval,strdup("DW_AT_language"), &valname,get_LANG_name, &rose_dwarf_error);
+
+            // The language is only set in the SgAsmDwarfCompilationUnit IR node.
+               SgAsmDwarfCompilationUnit* asmDwarfCompilationUnit = isSgAsmDwarfCompilationUnit(asmDwarfConstruct);
+               ROSE_ASSERT(asmDwarfCompilationUnit != NULL);
+            // printf ("Setting language string in SgAsmDwarfCompilationUnit valname = %s \n",valname.c_str());
+               asmDwarfCompilationUnit->set_language(valname);
+               break;
+             }
+
+#if 0
+       // DQ: Initially, let's limit the number of dependent functions required to make some progress and generating IR nodes from Dwarf.
+
+          case DW_AT_accessibility:
+               get_small_encoding_integer_and_name(dbg, attrib, &uval,"DW_AT_accessibility",&valname, get_ACCESS_name,&rose_dwarf_error);
+               break;
+          case DW_AT_visibility:
+               get_small_encoding_integer_and_name(dbg, attrib, &uval,"DW_AT_visibility",&valname, get_VIS_name,&rose_dwarf_error);
+               break;
+          case DW_AT_virtuality:
+               get_small_encoding_integer_and_name(dbg, attrib, &uval,"DW_AT_virtuality",&valname,get_VIRTUALITY_name, &rose_dwarf_error);
+               break;
+          case DW_AT_identifier_case:
+               get_small_encoding_integer_and_name(dbg, attrib, &uval,"DW_AT_identifier",&valname, get_ID_name,&rose_dwarf_error);
+               break;
+          case DW_AT_inline:
+               get_small_encoding_integer_and_name(dbg, attrib, &uval,"DW_AT_inline", &valname,get_INL_name, &rose_dwarf_error);
+               break;
+          case DW_AT_encoding:
+               get_small_encoding_integer_and_name(dbg, attrib, &uval,"DW_AT_encoding", &valname,get_ATE_name, &rose_dwarf_error);
+               break;
+          case DW_AT_ordering:
+               get_small_encoding_integer_and_name(dbg, attrib, &uval,"DW_AT_ordering", &valname,get_ORD_name, &rose_dwarf_error);
+               break;
+          case DW_AT_calling_convention:
+               get_small_encoding_integer_and_name(dbg, attrib, &uval,"DW_AT_calling_convention",&valname, get_CC_name,&rose_dwarf_error);
+               break;
+          case DW_AT_discr_list:      /* DWARF3 */
+               get_small_encoding_integer_and_name(dbg, attrib, &uval,"DW_AT_discr_list",&valname, get_DSC_name,&rose_dwarf_error);
+               break;
+
+          case DW_AT_location:
+          case DW_AT_data_member_location:
+          case DW_AT_vtable_elem_location:
+          case DW_AT_string_length:
+          case DW_AT_return_addr:
+          case DW_AT_use_location:
+          case DW_AT_static_link:
+          case DW_AT_frame_base:
+        /* value is a location description or location list */
+
+            // valname = "Need to use C++ class!!!";
+            // printf ("DW_AT_frame_base: This should be replaced by the C++ string object! \n");
+            // ROSE_ASSERT(false);
+
+            // esb_empty_string(&esb_base);
+            // get_location_list(dbg, die, attrib, &esb_base);
+            // valname = esb_get_string(&esb_base);
+
+               get_location_list(dbg, die, attrib, &esb_base);
+               valname = esb_base;
+               break;
+
+          case DW_AT_SUN_func_offsets:
+
+            // printf ("DW_AT_SUN_func_offsets: This should be replaced by the C++ string object! \n");
+            // get_FLAG_BLOCK_string(dbg, attrib);
+            // valname = esb_get_string(&esb_base);
+
+               get_FLAG_BLOCK_string(dbg, attrib, esb_base);
+               valname = esb_base;
+               break;
+
+          case DW_AT_SUN_cf_kind:
+             {
+               Dwarf_Half kind;
+               Dwarf_Unsigned tempud;
+               Dwarf_Error err;
+               int wres;
+               wres = dwarf_formudata (attrib,&tempud, &err);
+               if(wres == DW_DLV_OK) {
+                   kind = tempud;
+                   valname = get_ATCF_name(dbg, kind);
+               } else if (wres == DW_DLV_NO_ENTRY) {
+                   valname = "?";
+               } else {
+                   print_error(dbg,"Cannot get formudata....",wres,err);
+                   valname = "??";
+               }
+
+               break;
+             }
+
+          case DW_AT_upper_bound:
+             {
+               Dwarf_Half theform;
+               int rv;
+               rv = dwarf_whatform(attrib,&theform,&rose_dwarf_error);
+            /* depending on the form and the attribute, process the form */
+               if(rv == DW_DLV_ERROR) {
+                    print_error(dbg, "dwarf_whatform cannot find attr form",rv, rose_dwarf_error);
+               } else if (rv == DW_DLV_NO_ENTRY) {
+                   break;
+               }
+
+               switch (theform)
+                  {
+                    case DW_FORM_block1:
+                      // valname = "Need to use C++ class!!!";
+                      // printf ("This should be replaced by the C++ string object! \n");
+                      // ROSE_ASSERT(false);
+
+                      // get_location_list(dbg, die, attrib, &esb_base);
+                      // valname = esb_get_string(&esb_base);
+
+                         get_location_list(dbg, die, attrib, &esb_base);
+                         valname = esb_base;
+                         break;
+
+                     default:
+                      // valname = "Need to use C++ class!!!";
+                      // printf ("This should be replaced by the C++ string object! \n");
+                      // ROSE_ASSERT(false);
+
+                      // esb_empty_string(&esb_base);
+                      // get_attr_value(dbg, tag, attrib, srcfiles, cnt, &esb_base);
+                      // valname = esb_get_string(&esb_base);
+
+                         get_attr_value(dbg, tag, attrib, srcfiles, cnt, &esb_base);
+                         valname = esb_base;
+                         break;
+                  }
+               break;
+             }
+
+          case DW_AT_high_pc:
+             {
+               Dwarf_Half theform;
+               int rv;
+               rv = dwarf_whatform(attrib,&theform,&rose_dwarf_error);
+            /* depending on the form and the attribute, process the form */
+               if(rv == DW_DLV_ERROR)
+                  {
+                    print_error(dbg, "dwarf_whatform cannot find attr form",rv, rose_dwarf_error);
+                  }
+                 else
+                  {
+                    if (rv == DW_DLV_NO_ENTRY)
+                       {
+                         break;
+                       }
+                  }
+
+            // esb_empty_string(&esb_base);
+               get_attr_value(dbg, tag, attrib, srcfiles, cnt, &esb_base);
+               if( theform != DW_FORM_addr)
+                  {
+                 /* New in DWARF4: other forms are not an address
+                    but are instead offset from pc.
+                    One could test for DWARF4 here before adding
+                    this string, but that seems unnecessary as this
+                    could not happen with DWARF3 or earlier. 
+                    A normal consumer would have to add this value to
+                    DW_AT_low_pc to get a true pc. */
+                 // esb_append(&esb_base,"<offset-from-lowpc>");
+                    esb_base += "<offset-from-lowpc>";
+                  }
+
+            // valname = esb_get_string(&esb_base);
+               valname = esb_base;
+             }
+#endif
+          default:
+            // valname = "Need to use C++ class!!!";
+            // printf ("This should be replaced by the C++ string object! \n");
+            // ROSE_ASSERT(false);
+               esb_base = "";
+               get_attr_value(dbg, tag, attrib, srcfiles, cnt, &esb_base);
+               valname = esb_base;
+            // esb_empty_string(&esb_base);
+            // get_attr_value(dbg, tag, attrib, srcfiles, cnt, &esb_base);
+            // valname = esb_get_string(&esb_base);
+               break;
+        }
+
+  // printf ("In print_attribute: setting name for asmDwarfConstruct = %s using valname = %s \n",asmDwarfConstruct->class_name().c_str(),valname.c_str());
+
+  // Set the name in the base class to valname
+  // if ( isSgAsmDwarfSubprogram(asmDwarfConstruct) || isSgAsmDwarfvariable(asmDwarfConstruct) )
+  //      asmDwarfConstruct->set_name(valname);
+
+  // Set the name in the base clas only when the input attribute is DW_AT_name.
+     if (attr == DW_AT_name)
+        {
+          asmDwarfConstruct->set_name(valname);
+        }
+
+#if 0
+  // Supress Dwarf output
+     if (print_information)
+        {
+          printf("\t\t%-28s%s\n", atname.c_str(), valname.c_str());
+        }
+#endif
+   }
+#endif
+
+
+/* print info about die */
+// void
+SgAsmDwarfConstruct* 
+build_dwarf_IR_node_from_print_one_die(Dwarf_Debug dbg, Dwarf_Die die, bool print_information, char **srcfiles, Dwarf_Signed cnt /* , SgAsmDwarfCompilationUnit* asmDwarfCompilationUnit */)
+   {
+     Dwarf_Signed i;
+     Dwarf_Off offset, overall_offset;
+     string tagname;
+     Dwarf_Half tag;
+     Dwarf_Signed atcnt;
+     Dwarf_Attribute *atlist;
+     int tres;
+     int ores;
+     int atres;
+
+     tres = dwarf_tag(die, &tag, &rose_dwarf_error);
+     if (tres != DW_DLV_OK)
+        {
+          print_error(dbg, "accessing tag of die!", tres, rose_dwarf_error);
+        }
+
+     tagname = get_TAG_name(dbg, tag);
+  // printf ("In build_dwarf_IR_node_from_print_one_die(): tag = %d tagname = %s \n",tag,tagname.c_str());
+
+     ores = dwarf_dieoffset(die, &overall_offset, &rose_dwarf_error);
+     if (ores != DW_DLV_OK)
+        {
+          print_error(dbg, "dwarf_dieoffset", ores, rose_dwarf_error);
+        }
+
+     ores = dwarf_die_CU_offset(die, &offset, &rose_dwarf_error);
+     if (ores != DW_DLV_OK)
+        {
+          print_error(dbg, "dwarf_die_CU_offset", ores, rose_dwarf_error);
+        }
+
+  // if (!dst_format && print_information)
+     if (print_information)
+        {
+          if (indent_level == 0)
+            {
+           // printf("\nCOMPILE_UNIT<header overall offset = %llu>:\n",overall_offset - offset);
+
+           // Initialize the information in the SgAsmDwarfCompilationUnit IR node
+
+            }
+           else
+            {
+           // if (local_symbols_already_began == false && indent_level == 1 && !dense)
+              if (local_symbols_already_began == false && indent_level == 1)
+                 {
+                // printf("\nLOCAL_SYMBOLS:\n");
+                   local_symbols_already_began = true;
+                 }
+            }
+
+      // printf("<%d><%5llu GOFF=%llu>\t%s\n", indent_level, offset,overall_offset, tagname.c_str());
+       }
+
+     atres = dwarf_attrlist(die, &atlist, &atcnt, &rose_dwarf_error);
+     if (atres == DW_DLV_ERROR)
+        {
+          print_error(dbg, "dwarf_attrlist", atres, rose_dwarf_error);
+        }
+       else
+        {
+          if (atres == DW_DLV_NO_ENTRY)
+             {
+            /* indicates there are no attrs.  It is not an error. */
+            // printf ("No attributes found (not an error) \n");
+               atcnt = 0;
+             }
+        }
+
+     if (indent_level == 0)
+        {
+       // This is the CU header
+        }
+       else
+        {
+       // These are local symbols
+        }
+
+  // Build the ROSE dwarf construct IR node (use a factory design to build the appropriate IR nodes
+#if 0
+  // This is used to limit the Dwarf representation to just the SgAsmDwarfCompilationUnit IR nodes
+  // (the test file from BGL has 1200+ CU's so this is useful for debugging).
+     SgAsmDwarfConstruct* asmDwarfConstruct = NULL;
+     if (tag == DW_TAG_compile_unit)
+        {
+          asmDwarfConstruct = SgAsmDwarfConstruct::createDwarfConstruct( tag, indent_level, offset, overall_offset );
+        }
+#else
+  // This will cause all Dwarf IR nodes to be properly represented in the AST.
+     SgAsmDwarfConstruct* asmDwarfConstruct = SgAsmDwarfConstruct::createDwarfConstruct( tag, indent_level, offset, overall_offset );
+#endif
+  // printf ("Handle attributes: atcnt = %d \n",(int)atcnt);
+
+  // Setup attribute specific fields in the different kinds of Dwarf nodes
+     for (i = 0; i < atcnt; i++)
+        {
+          Dwarf_Half attr;
+          int ares;
+
+          ares = dwarf_whatattr(atlist[i], &attr, &rose_dwarf_error);
+          if (ares == DW_DLV_OK)
+             {
+               if (asmDwarfConstruct != NULL)
+                  {
+                    print_attribute(dbg, die, attr,atlist[i],print_information, srcfiles, cnt, asmDwarfConstruct);
+                  }
+                 else
+                  {
+                 // printf ("Skipping print_attribute since asmDwarfConstruct == NULL \n");
+                  }
+
+               if (indent_level == 0)
+                  {
+                 // This is the CU header
+                  }
+                 else
+                  {
+                 // These are local symbols
+                  }
+             }
+            else
+             {
+               print_error(dbg, "dwarf_whatattr entry missing", ares, rose_dwarf_error);
+             }
+        }
+
+     for (i = 0; i < atcnt; i++)
+        {
+          dwarf_dealloc(dbg, atlist[i], DW_DLA_ATTR);
+        }
+
+     if (atres == DW_DLV_OK)
+        {
+          dwarf_dealloc(dbg, atlist, DW_DLA_LIST);
+        }
+
+#if 0
+  // if (dense && print_information)
+     if (false && print_information)
+        {
+          printf("\n\n");
+        }
+#endif
+
+     return asmDwarfConstruct;
+   }
+
+
+
+/* recursively follow the die tree */
+// void build_dwarf_IR_node_from_die_and_children(Dwarf_Debug dbg, Dwarf_Die in_die_in,char **srcfiles, Dwarf_Signed cnt, SgAsmDwarfCompilationUnit* asmDwarfCompilationUnit)
+// void build_dwarf_IR_node_from_die_and_children(Dwarf_Debug dbg, Dwarf_Die in_die_in,char **srcfiles, Dwarf_Signed cnt, SgAsmDwarfConstruct* parentDwarfConstruct )
+SgAsmDwarfConstruct* 
+build_dwarf_IR_node_from_die_and_children(Dwarf_Debug dbg, Dwarf_Die in_die_in,char **srcfiles, Dwarf_Signed cnt, SgAsmDwarfConstruct* parentDwarfConstruct )
+   {
+  // NOTE: The first time this function is called the parentDwarfConstruct is NULL.
+
+     Dwarf_Die child;
+     Dwarf_Die sibling;
+     Dwarf_Error err;
+  // int tres;
+     int cdres;
+     Dwarf_Die in_die = in_die_in;
+
+     SgAsmDwarfConstruct* astDwarfConstruct = NULL;
+
+  // printf ("Inside of build_dwarf_IR_node_from_die_and_children() \n");
+
+     for (;;)
+        {
+       // printf ("Top of loop in build_dwarf_IR_node_from_die_and_children() \n");
+
+          PUSH_DIE_STACK(in_die);
+
+#if 0
+       // DQ: This just does error checking on dwarf format
+
+          if (check_tag_tree)
+             {
+               tag_tree_result.checks++;
+               if (indent_level == 0)
+                  {
+                    Dwarf_Half tag;
+
+                    tres = dwarf_tag(in_die, &tag, &err);
+                    if (tres != DW_DLV_OK)
+                       {
+                         tag_tree_result.errors++;
+                         DWARF_CHECK_ERROR("Tag-tree root is not DW_TAG_compile_unit")
+                       }
+                      else
+                         if (tag == DW_TAG_compile_unit)
+                            {
+                              /* OK */
+                            }
+                           else
+                            {
+                              tag_tree_result.errors++;
+                              DWARF_CHECK_ERROR("tag-tree root is not DW_TAG_compile_unit")
+                            }
+                  }
+                 else
+                  {
+                    Dwarf_Half tag_parent, tag_child;
+                    int pres;
+                    int cres;
+                    string ctagname = "<child tag invalid>";
+                    string ptagname = "<parent tag invalid>";
+
+                    pres = dwarf_tag(die_stack[indent_level - 1], &tag_parent,&err);
+                    cres = dwarf_tag(in_die, &tag_child, &err);
+
+                    if (pres != DW_DLV_OK)
+                         tag_parent = 0;
+
+                    if (cres != DW_DLV_OK)
+                         tag_child = 0;
+
+                    if (cres != DW_DLV_OK || pres != DW_DLV_OK) 
+                       {
+                         if (cres == DW_DLV_OK)
+                            {
+                              ctagname = get_TAG_name(dbg, tag_child);
+                            }
+
+                         if (pres == DW_DLV_OK)
+                            {
+                              ptagname = get_TAG_name(dbg, tag_parent);
+                            }
+
+                         DWARF_CHECK_ERROR3(ptagname.c_str(),ctagname.c_str(),"Tag-tree relation is not standard..");
+                      }
+                     else
+                      {
+#if 0
+                     // DQ (11/7/2008): This is error checking and I want to remove the dependence upon dwarfdump code.
+                        if (tag_tree_combination(tag_parent, tag_child))
+                           {
+                          /* OK */
+                           }
+                          else
+                           {
+                             DWARF_CHECK_ERROR3(get_TAG_name(dbg, tag_parent).c_str(),get_TAG_name(dbg, tag_child).c_str(),"tag-tree relation is not standard.");
+                           }
+#endif
+                      }
+                  }
+             }
+#endif
+
+#if 1
+       // Suppress output!
+
+       // DQ (11/4/2008): This is the location were we will have to generate IR nodes using each debug info entry (die)
+       // printf ("Calling print_one_die to output the information about each specific debug info entry (die) \n");
+
+       /* here to pre-descent processing of the die */
+       // SgAsmDwarfConstruct* astDwarfConstruct = build_dwarf_IR_node_from_print_one_die(dbg, in_die, /* info_flag */ true, srcfiles, cnt /* , asmDwarfCompilationUnit */ );
+          astDwarfConstruct = build_dwarf_IR_node_from_print_one_die(dbg, in_die, /* info_flag */ true, srcfiles, cnt /* , asmDwarfCompilationUnit */ );
+
+       // parentDwarfConstruct->set_child(astDwarfConstruct);
+          if (parentDwarfConstruct != NULL && astDwarfConstruct != NULL)
+             {
+            // printf ("Push children onto parent IR node! \n");
+
+            // if (parentDwarfConstruct->get_children() == NULL)
+            //      parentDwarfConstruct->set_children(new SgAsmDwarfConstructList());
+#if 1
+            // When this work we know that we have the child support for Dwarf IR nodes in place (in all the right places).
+               ROSE_ASSERT(parentDwarfConstruct->get_children() != NULL);
+               parentDwarfConstruct->get_children()->get_list().push_back(astDwarfConstruct);
+#else
+            // Optional support for parents without child support implemented yet!
+            // I want to know what IR nodes require it and how many there are.
+               if (parentDwarfConstruct->get_children() != NULL)
+                  {
+                    parentDwarfConstruct->get_children()->get_list().push_back(astDwarfConstruct);
+                  }
+                 else
+                  {
+                    printf ("Error: Sorry not implemented (child support on IR nodes %s \n",parentDwarfConstruct->class_name().c_str());
+                  }
+#endif
+               astDwarfConstruct->set_parent(parentDwarfConstruct);
+             }
+
+       // printf ("Process children \n");
+#endif
+          cdres = dwarf_child(in_die, &child, &err);
+       /* child first: we are doing depth-first walk */
+          if (cdres == DW_DLV_OK)
+             {
+               indent_level++;
+               if(indent_level >= DIE_STACK_SIZE )
+                  {
+                    print_error(dbg,"compiled in DIE_STACK_SIZE limit exceeded",DW_DLV_OK,err);
+                  }
+
+            // printf ("Processing child dwarf nodes: calling build_dwarf_IR_node_from_die_and_children() \n");
+
+            // Old function: print_die_and_children(dbg, child, srcfiles, cnt);
+
+            // Ignore the return result (children are added to the parent).
+#if 0
+               build_dwarf_IR_node_from_die_and_children(dbg, child, srcfiles, cnt, astDwarfConstruct);
+#else
+               if (astDwarfConstruct != NULL)
+                    build_dwarf_IR_node_from_die_and_children(dbg, child, srcfiles, cnt, astDwarfConstruct);
+#endif
+               indent_level--;
+
+               if (indent_level == 0)
+                    local_symbols_already_began = false;
+
+               dwarf_dealloc(dbg, child, DW_DLA_DIE);
+             }
+            else
+             {
+               if (cdres == DW_DLV_ERROR)
+                  {
+                    print_error(dbg, "dwarf_child", cdres, err);
+                  }
+             }
+
+       // printf ("Process siblings \n");
+          cdres = dwarf_siblingof(dbg, in_die, &sibling, &err);
+          if (cdres == DW_DLV_OK)
+             {
+            /* print_die_and_children(dbg, sibling, srcfiles, cnt); We
+               loop around to actually print this, rather than
+               recursing. Recursing is horribly wasteful of stack
+               space. */
+             }
+            else 
+             {
+               if (cdres == DW_DLV_ERROR)
+                  {
+                    print_error(dbg, "dwarf_siblingof", cdres, err);
+                  }
+             }
+
+       /* Here do any post-descent (ie post-dwarf_child) processing of the in_die. */
+
+       // printf ("Process post-dwarf_child \n");
+
+          POP_DIE_STACK;
+          if (in_die != in_die_in)
+             {
+            /* Dealloc our in_die, but not the argument die, it belongs 
+               to our caller. Whether the siblingof call worked or not. 
+             */
+               dwarf_dealloc(dbg, in_die, DW_DLA_DIE);
+             }
+
+          if (cdres == DW_DLV_OK)
+             {
+            /* Set to process the sibling, loop again. */
+               in_die = sibling;
+             }
+            else
+             {
+            /* We are done, no more siblings at this level. */
+               break;
+             }
+
+       // printf ("Bottom of loop in build_dwarf_IR_node_from_die_and_children() \n");
+        }  /* end for loop on siblings */
+
+  // ROSE_ASSERT(astDwarfConstruct != NULL);
+
+     return astDwarfConstruct;
+   }
+
+
+void
+build_dwarf_line_numbers_this_cu(Dwarf_Debug dbg, Dwarf_Die cu_die, SgAsmDwarfCompilationUnit* asmDwarfCompilationUnit)
+   {
+  // This function build the IR nodes in the AST that hold the mappings of instruction addresses 
+  // to source line and column numbers.  From this we generate STL maps and higher level interfaces 
+  // that make the information easier to use.
+
+     Dwarf_Signed linecount = 0;
+     Dwarf_Line *linebuf = NULL;
+     Dwarf_Signed i = 0;
+     Dwarf_Addr pc = 0;
+     Dwarf_Unsigned lineno = 0;
+     Dwarf_Signed column = 0;
+     char* filename;
+
+     int lres = 0;
+     int sres = 0;
+     int ares = 0;
+     int lires = 0;
+     int cores = 0;
+
+  // printf ("Inside of build_dwarf_line_numbers_this_cu() (using .debug_line section) \n");
+
+  // printf("\n.debug_line: line number info for a single cu\n");
+
+  // printf ("Setting verbose > 1 (verbose==2) \n");
+  // verbose = 2;
+
+     ROSE_ASSERT(asmDwarfCompilationUnit->get_line_info() == NULL);
+
+     SgAsmDwarfLineList* asmDwarfLineList = new SgAsmDwarfLineList();
+
+     asmDwarfCompilationUnit->set_line_info(asmDwarfLineList);
+     asmDwarfLineList->set_parent(asmDwarfCompilationUnit);
+
+     ROSE_ASSERT(asmDwarfCompilationUnit->get_line_info() != NULL);
+
+#if 0
+     if (verbose > 1)
+        {
+          print_source_intro(cu_die);
+          build_dwarf_IR_node_from_print_one_die(dbg, cu_die, /* print_information= */ 1,/* srcfiles= */ 0, /* cnt= */ 0 /* , asmDwarfCompilationUnit */ );
+
+          lres = dwarf_print_lines(cu_die, &rose_dwarf_error);
+          if (lres == DW_DLV_ERROR)
+             {
+               print_error(dbg, "dwarf_srclines details", lres, rose_dwarf_error);
+             }
+
+          printf ("Exiting print_line_numbers_this_cu prematurely! \n");
+          return;
+       }
+#endif
+
+     lres = dwarf_srclines(cu_die, &linebuf, &linecount, &rose_dwarf_error);
+     if (lres == DW_DLV_ERROR)
+        {
+          print_error(dbg, "dwarf_srclines", lres, rose_dwarf_error);
+        }
+       else
+        {
+          if (lres == DW_DLV_NO_ENTRY)
+             {
+            /* no line information is included */
+             }
+            else
+             {
+#if 0
+            // Suppress output!
+               print_source_intro(cu_die);
+               if (verbose)
+                  {
+                    build_dwarf_IR_node_from_print_one_die(dbg, cu_die, /* print_information= */ 1,/* srcfiles= */ 0, /* cnt= */ 0 /* , asmDwarfCompilationUnit */ );
+                  }
+#endif
+            // Output a header for the data
+            // printf("<source>\t[row,column]\t<pc>\t//<new statement or basic block\n");
+
+               for (i = 0; i < linecount; i++)
+                  {
+                    Dwarf_Line line = linebuf[i];
+
+                    sres = dwarf_linesrc(line, &filename, &rose_dwarf_error);
+                    ares = dwarf_lineaddr(line, &pc, &rose_dwarf_error);
+
+                    if (sres == DW_DLV_ERROR)
+                       {
+                         print_error(dbg, "dwarf_linesrc", sres, rose_dwarf_error);
+                       }
+
+                    if (sres == DW_DLV_NO_ENTRY)
+                       {
+                         filename = strdup("<unknown>");
+                       }
+
+                    if (ares == DW_DLV_ERROR)
+                       {
+                         print_error(dbg, "dwarf_lineaddr", ares, rose_dwarf_error);
+                       }
+
+                    if (ares == DW_DLV_NO_ENTRY)
+                       {
+                         pc = 0;
+                       }
+
+                    lires = dwarf_lineno(line, &lineno, &rose_dwarf_error);
+                    if (lires == DW_DLV_ERROR)
+                       {
+                         print_error(dbg, "dwarf_lineno", lires, rose_dwarf_error);
+                       }
+
+                    if (lires == DW_DLV_NO_ENTRY)
+                       {
+                         lineno = -1LL;
+                       }
+
+                    cores = dwarf_lineoff(line, &column, &rose_dwarf_error);
+                    if (cores == DW_DLV_ERROR)
+                       {
+                         print_error(dbg, "dwarf_lineoff", cores, rose_dwarf_error);
+                       }
+
+                    if (cores == DW_DLV_NO_ENTRY)
+                       {
+                         column = -1LL;
+                       }
+
+                 // printf("%s:\t[%3llu,%2lld]\t%#llx", filename, lineno,column, pc);
+
+                 // Build an IR node to represent the instruction address for each line.
+                 // This uses the static maps in the Sg_File_Info to support a table similar 
+                 // to Dwarf's and which maps filenames to integers and back.  This avoids
+                 // building and deleting a Sg_File_Info object.
+                    int filename_id = Sg_File_Info::addFilenameToMap(filename);
+
+                 // Now build the IR node to store the raw information from dwarf.
+                    SgAsmDwarfLine* lineInfo = new SgAsmDwarfLine(pc, filename_id, lineno, column);
+
+                    asmDwarfLineList->get_line_list().push_back(lineInfo);
+
+                    if (sres == DW_DLV_OK)
+                         dwarf_dealloc(dbg, filename, DW_DLA_STRING);
+
+#if 0
+                 // DQ: The remainer of this code block is the output of information that sumarizes the previous entry.
+
+                    Dwarf_Bool newstatement = 0;
+                    Dwarf_Bool lineendsequence = 0;
+                    Dwarf_Bool new_basic_block = 0;
+                    int nsres;
+
+                    nsres = dwarf_linebeginstatement(line, &newstatement, &rose_dwarf_error);
+                    if (nsres == DW_DLV_OK)
+                       {
+#if 0
+                      // Suppress output!
+                         if (newstatement)
+                            {
+                              printf("\t// new statement");
+                            }
+#endif
+                       }
+                      else
+                         if (nsres == DW_DLV_ERROR)
+                            {
+                              print_error(dbg, "linebeginstatment failed", nsres,rose_dwarf_error);
+                            }
+
+                    nsres = dwarf_lineblock(line, &new_basic_block, &rose_dwarf_error);
+                    if (nsres == DW_DLV_OK)
+                       {
+#if 0
+                      // Suppress output!
+                         if (new_basic_block)
+                            {
+                              printf("\t// new basic block");
+                            }
+#endif
+                       }
+                      else
+                         if (nsres == DW_DLV_ERROR)
+                            {
+                              print_error(dbg, "lineblock failed", nsres, rose_dwarf_error);
+                            }
+
+                    nsres = dwarf_lineendsequence(line, &lineendsequence, &rose_dwarf_error);
+                    if (nsres == DW_DLV_OK)
+                       {
+#if 0
+                      // Suppress output!
+                         if (lineendsequence)
+                            {
+                              printf("\t// end of text sequence");
+                            }
+#endif
+                       }
+                      else
+                         if (nsres == DW_DLV_ERROR)
+                            {
+                              print_error(dbg, "lineblock failed", nsres, rose_dwarf_error);
+                            }
+#endif
+
+#if 0
+                 // Suppress output!
+                    printf("\n");
+#endif
+                  }
+
+               dwarf_srclines_dealloc(dbg, linebuf, linecount);
+             }
+        }
+
+  // printf ("Now generate the static maps to use to lookup the instruction address to source position mappings \n");
+     asmDwarfLineList->buildInstructionAddressSourcePositionMaps(asmDwarfCompilationUnit);
+  // printf ("DONE: Now generate the maps to use to lookup the instruction address to source position mappings \n");
+
+#if 0
+  // Run a second time to test that the maps are not regenerated (this is just a test)
+     printf ("Run a second time to test that the maps are not regenerated ... \n");
+     DwarfInstructionSourceMapReturnType returnValue = asmDwarfLineList->buildInstructionAddressSourcePositionMaps();
+     printf ("DONE: Run a second time to test that the maps are not regenerated ... \n");
+#endif
+
+#if 1
+  // Output the line information from the generated maps (debugging information).
+  // printf ("SgProject::get_verbose() = %d \n",SgProject::get_verbose());
+     if (SgProject::get_verbose() > 0)
+        {
+          asmDwarfLineList->display("Inside of build_dwarf_line_numbers_this_cu()");
+        }
+#endif
+   }
+
+
+/* process each compilation unit in .debug_info */
+void
+build_dwarf_IR_nodes(Dwarf_Debug dbg, SgAsmInterpretation* asmInterpretation)
+   {
+     Dwarf_Unsigned cu_header_length = 0;
+     Dwarf_Unsigned abbrev_offset = 0;
+     Dwarf_Half version_stamp = 0;
+     Dwarf_Half address_size = 0;
+     Dwarf_Die cu_die = NULL;
+     Dwarf_Unsigned next_cu_offset = 0;
+     int nres = DW_DLV_OK;
+     int   cu_count = 0;
+
+  // printf("\n.debug_info\n");
+
+     ROSE_ASSERT(asmInterpretation->get_dwarf_info() == NULL);
+
+#if 0
+     SgAsmDwarfCompilationUnit* asmDwarfCompilationUnit = new SgAsmDwarfCompilationUnit();
+
+     asmInterpretation->set_dwarf_info(asmDwarfCompilationUnit);
+     asmDwarfCompilationUnit->set_parent(asmInterpretation);
+
+     ROSE_ASSERT(asmInterpretation->get_dwarf_info() != NULL);
+#endif
+
+#if 1
+     SgAsmDwarfCompilationUnitList* asmDwarfCompilationUnitList = new SgAsmDwarfCompilationUnitList();
+
+     asmInterpretation->set_dwarf_info(asmDwarfCompilationUnitList);
+     asmDwarfCompilationUnitList->set_parent(asmInterpretation);
+
+     ROSE_ASSERT(asmInterpretation->get_dwarf_info() != NULL);
+#endif
+
+  // This permits restricting number of CU's read so that we can have a 
+  // manageable problem to debug the Dwarf represnetation in ROSE.
+     int compilationUnitCounter = 0;
+  // int compilationUnitLimit   = 10;
+     int compilationUnitLimit   = 1000000;
+
+  /* Loop until it fails.  */
+     while ( ((nres = dwarf_next_cu_header(dbg, &cu_header_length, &version_stamp,&abbrev_offset, &address_size,&next_cu_offset, &rose_dwarf_error)) == DW_DLV_OK) && (compilationUnitCounter < compilationUnitLimit) )
+        {
+#if 0
+       // printf ("In loop over the headers: nres = %d \n",nres);
+       // printf ("next_cu_offset   = %lu \n",(unsigned long) next_cu_offset);
+          printf ("cu_header_length = %lu \n",(unsigned long) cu_header_length);
+#endif
+
+       // printf ("Processing CU: %d \n",compilationUnitCounter);
+          compilationUnitCounter++;
+
+#if 0
+       // This permits restricting size of the CU's read so that we can have a 
+       // manageable problem to debug the Dwarf represnetation in ROSE.
+          if (cu_header_length > 500)
+             {
+               printf ("Skipping the handling of this CU (too large for debugging): cu_header_length = %lu \n",(unsigned long) cu_header_length);
+               continue;
+             }
+#endif
+
+       // printf ("loop count: cu_count = %d \n",cu_count);
+
+          ROSE_ASSERT(cu_count < break_after_n_units);
+#if 0
+          if (cu_count >=  break_after_n_units)
+             {
+               printf("Break at %d\n",cu_count);
+
+               printf ("I think this should be an error for now! \n");
+               ROSE_ASSERT(false);
+
+               break;
+             }
+#endif
+
+#if 0
+          printf ("cu_name_flag = %s \n",cu_name_flag ? "true" : "false");
+#endif
+
+       // error status variable
+          int sres = 0;
+
+       // printf ("Setting cu_name_flag == true \n");
+       // cu_name_flag = true;
+       // cu_name_flag = false;
+
+          ROSE_ASSERT(cu_name_flag == false);
+
+#if 0
+       // DQ: I think that this code is unimportant to the construction or IR nodes!
+
+          if (cu_name_flag)
+             {
+               int tres = 0;
+               Dwarf_Half tag = 0;
+               Dwarf_Attribute attrib = 0;
+               Dwarf_Half theform = 0;
+               int fres = 0;
+               int ares = 0;
+
+               sres = dwarf_siblingof(dbg, NULL, &cu_die, &rose_dwarf_error);
+               if (sres != DW_DLV_OK)
+                  {
+                    print_error(dbg, "siblingof cu header", sres, rose_dwarf_error);
+                  }
+
+               tres = dwarf_tag(cu_die, &tag, &rose_dwarf_error);
+               if (tres != DW_DLV_OK)
+                  {
+                    print_error(dbg, "tag of cu die", tres, rose_dwarf_error);
+                  }
+
+               ares = dwarf_attr(cu_die, DW_AT_name, &attrib, &rose_dwarf_error);
+               if (ares != DW_DLV_OK)
+                  {
+                    print_error(dbg, "dwarf DW_AT_name ", ares, rose_dwarf_error);
+                  }
+
+               fres = dwarf_whatform(attrib, &theform, &rose_dwarf_error);
+               if (fres != DW_DLV_OK)
+                  {
+                    print_error(dbg, "dwarf_whatform problem ", fres, rose_dwarf_error);
+                  }
+                 else
+                  {
+                    if (theform == DW_FORM_string || theform == DW_FORM_strp) 
+                       {
+                         char* temps;
+                         int strres;
+                         char* p;
+
+                         strres = dwarf_formstring(attrib, &temps, &rose_dwarf_error);
+                         p = temps;
+
+                         printf ("temps = %s \n",temps);
+
+                         if (strres != DW_DLV_OK)
+                            {
+                              print_error(dbg,"formstring failed unexpectedly",strres, rose_dwarf_error);
+                            }
+
+                         if (cu_name[0] != '/')
+                            {
+                              p = strrchr(temps, '/');
+                              if (p == NULL)
+                                 {
+                                   p = temps;
+                                 }
+                                else
+                                 {
+                                   p++;
+                                 }
+                            }
+
+                         if (strcmp(cu_name, p))
+                            {
+                              printf ("Exiting from loop... (continue) \n");
+                              continue;
+                            }
+                       }
+                      else
+                       {
+                         print_error(dbg,"dwarf_whatform unexpected value",fres, rose_dwarf_error);
+                       }
+                  }
+
+               dwarf_dealloc(dbg, attrib, DW_DLA_ATTR);
+               dwarf_dealloc(dbg, cu_die, DW_DLA_DIE);
+             }
+#endif
+
+#if 0
+          printf ("build_dwarf_IR_nodes(): verbose = %s \n",verbose ? "true" : "false");
+       // printf ("build_dwarf_IR_nodes(): dense   = %s \n",dense ? "true" : "false");
+#endif
+
+#if 0
+       // Supress output!
+          if (verbose)
+             {
+               printf("\nCU_HEADER:\n");
+               printf("\t\t%-28s%llu\n", "cu_header_length",cu_header_length);
+               printf("\t\t%-28s%d\n", "version_stamp", version_stamp);
+               printf("\t\t%-28s%llu\n", "abbrev_offset",abbrev_offset);
+               printf("\t\t%-28s%d", "address_size", address_size);
+             }
+
+          printf ("\nbuild_dwarf_IR_nodes(): Calling dwarf_siblingof() \n");
+#endif
+
+       /* process a single compilation unit in .debug_info. */
+          sres = dwarf_siblingof(dbg, NULL, &cu_die, &rose_dwarf_error);
+
+       // printf ("build_dwarf_IR_nodes(): status of call to dwarf_siblingof(): sres = %d \n",sres);
+
+          if (sres == DW_DLV_OK)
+             {
+#if 0
+               printf ("Processing sibling information \n");
+               printf ("info_flag    = %s \n",info_flag    ? "true" : "false");
+               printf ("cu_name_flag = %s \n",cu_name_flag ? "true" : "false");
+#endif
+            // printf ("Explicitly setting info_flag == true \n");
+               info_flag = true;
+
+            // if (info_flag || cu_name_flag)
+            //    {
+                    Dwarf_Signed cnt = 0;
+                    char **srcfiles = 0;
+
+                 // We need to call this function so that we can generate filenames to support the line number mapping below.
+                    int srcf = dwarf_srcfiles(cu_die, &srcfiles, &cnt, &rose_dwarf_error);
+
+                    if (srcf != DW_DLV_OK)
+                       {
+                      // I think we can make this an error.
+                         printf ("Error: No source file information found: (dwarf_srcfiles() != DW_DLV_OK) \n");
+                         ROSE_ASSERT(false);
+
+                         srcfiles = NULL;
+                         cnt = 0;
+                       }
+
+                 // This function call will traverse the list of child debug info entries and 
+                 // within this function we will generate the IR nodes specific to Dwarf. This
+                 // should define an course view of the AST which can be used to relate the binary
+                 // to the source code.
+
+                 // printf ("In print_infos(): Calling build_dwarf_IR_node_from_die_and_children() \n");
+                 // print_die_and_children(dbg, cu_die, srcfiles, cnt);
+                    SgAsmDwarfConstruct* asmDwarfConstruct = build_dwarf_IR_node_from_die_and_children(dbg, cu_die, srcfiles, cnt, NULL);
+                    ROSE_ASSERT(asmDwarfConstruct != NULL);
+
+#if 0
+                    SgAsmDwarfCompilationUnit* asmDwarfCompilationUnit = isSgAsmDwarfCompilationUnit(asmDwarfConstruct);
+                    ROSE_ASSERT(asmDwarfCompilationUnit != NULL);
+
+                    asmInterpretation->set_dwarf_info(asmDwarfCompilationUnit);
+                    asmDwarfCompilationUnit->set_parent(asmInterpretation);
+
+                    ROSE_ASSERT(asmInterpretation->get_dwarf_info() != NULL);
+#else
+                 // Handle the case of many Dwarf Compile Units
+                 // asmInterpretation->get_dwarf_info()->get_cu_list().push_back(asmDwarfCompilationUnit);
+                    SgAsmDwarfCompilationUnit* asmDwarfCompilationUnit = isSgAsmDwarfCompilationUnit(asmDwarfConstruct);
+                    ROSE_ASSERT(asmDwarfCompilationUnit != NULL);
+
+                    asmDwarfCompilationUnitList->get_cu_list().push_back(asmDwarfCompilationUnit);
+                    asmDwarfCompilationUnit->set_parent(asmDwarfCompilationUnitList);
+#endif
+
+                    if (srcf == DW_DLV_OK)
+                       {
+                         int si;
+
+                         for (si = 0; si < cnt; ++si)
+                            {
+                              dwarf_dealloc(dbg, srcfiles[si], DW_DLA_STRING);
+                            }
+                         dwarf_dealloc(dbg, srcfiles, DW_DLA_LIST);
+                       }
+            //    }
+
+            // printf ("Explicitly setting line_flag == true \n");
+               bool line_flag = true;
+
+               if (line_flag)
+                  {
+                 // printf ("\n\nOutput the line information by calling print_line_numbers_this_cu() \n");
+                 // print_line_numbers_this_cu(dbg, cu_die);
+                    build_dwarf_line_numbers_this_cu(dbg, cu_die, asmDwarfCompilationUnit);
+                  }
+                 else
+                  {
+                    printf ("Skipping line number <--> instruction address mapping information \n");
+                  }
+
+               dwarf_dealloc(dbg, cu_die, DW_DLA_DIE);
+             }
+            else
+             {
+               if (sres == DW_DLV_NO_ENTRY)
+                  {
+                 /* do nothing I guess. */
+                  }
+                 else
+                  {
+                    print_error(dbg, "Regetting cu_die", sres, rose_dwarf_error);
+                  }
+             }
+
+          ++cu_count;
+          cu_offset = next_cu_offset;
+        }
+
+  // printf ("error checking: nres = %d \n",nres);
+
+     if (nres == DW_DLV_ERROR)
+        {
+          string errmsg = dwarf_errmsg(rose_dwarf_error);
+          Dwarf_Unsigned myerr = dwarf_errno(rose_dwarf_error);
+
+          fprintf(stderr, "%s ERROR:  %s:  %s (%lu)\n",program_name.c_str(), "attempting to print .debug_info",errmsg.c_str(), (unsigned long) myerr);
+       // fprintf(stderr, "attempting to continue.\n");
+
+       // printf ("Error: nres = %d \n",nres);
+       // ROSE_ASSERT(false);
+        }
+
+  // printf ("Exiting print_infos() \n");
+   }
+
+
+// DQ (11/10/2008):
+/*! \brief This traversal permits symbols to be commented out from the DOT graphs.
+
+ */
+void commentOutSymbolsFromDotGraph (SgNode* node)
+   {
+  // Remove the symbols and related symbol lists so that the generated DOT file will be simpler.
+  // To do this we add an attribute that implements the virtual commentOutNodeInGraph() member 
+  // function and return "true".
+
+  // Define the attribute class containing the virtual function "commentOutNodeInGraph()"
+     class SymbolPruningAttribute : public AstAttribute
+        {
+       // This is a persistant attribute used to mark locations in the AST where we don't want IR nodes to be generated for the DOT graph.
+
+          public:
+               bool commentOutNodeInGraph() { return true; }
+               virtual AstAttribute* copy() { return new SymbolPruningAttribute(*this); }
+               virtual ~SymbolPruningAttribute() {}
+        };
+
+  // Define the traversal class over the AST
+     class CommentOutSymbolsFromDotGraph : public SgSimpleProcessing
+        {
+          public:
+               void visit ( SgNode* node )
+                  {
+
+                     SgAsmGenericSymbolList* genericSymbolList = isSgAsmGenericSymbolList(node);
+                     if (genericSymbolList != NULL)
+                        {
+                          SymbolPruningAttribute* att = new SymbolPruningAttribute();
+                          genericSymbolList->addNewAttribute("SymbolPruningAttribute",att);
+                        }
+
+                     SgAsmElfSymbolList* elfSymbolList = isSgAsmElfSymbolList(node);
+                     if (elfSymbolList != NULL)
+                        {
+                          SymbolPruningAttribute* att = new SymbolPruningAttribute();
+                          elfSymbolList->addNewAttribute("SymbolPruningAttribute",att);
+                        }
+
+                     SgAsmGenericSymbol* genericSymbol = isSgAsmGenericSymbol(node);
+                     if (genericSymbol != NULL)
+                        {
+                          SymbolPruningAttribute* att = new SymbolPruningAttribute();
+                          genericSymbol->addNewAttribute("SymbolPruningAttribute",att);
+                        }
+                  }
+        };
+
+     CommentOutSymbolsFromDotGraph traversal;
+     traversal.traverse(node,preorder);
+   }
+
+// DQ (11/10/2008):
+/*! \brief This traversal permits non-dwarf IR nodes to be commented out from the DOT graphs.
+
+ */
+void commentOutEvertythingButDwarf (SgNode* node)
+   {
+  // Remove the symbols and related symbol lists so that the generated DOT file will be simpler.
+  // To do this we add an attribute that implements the virtual commentOutNodeInGraph() member 
+  // function and return "true".
+
+  // Define the attribute class containing the virtual function "commentOutNodeInGraph()"
+     class SymbolPruningAttribute : public AstAttribute
+        {
+       // This is a persistant attribute used to mark locations in the AST where we don't want IR nodes to be generated for the DOT graph.
+
+          public:
+               bool commentOutNodeInGraph() { return true; }
+               virtual AstAttribute* copy() { return new SymbolPruningAttribute(*this); }
+               virtual ~SymbolPruningAttribute() {}
+        };
+
+  // Define the traversal class over the AST
+     class CommentOutSymbolsFromDotGraph : public SgSimpleProcessing
+        {
+          public:
+               void visit ( SgNode* node )
+                  {
+                  // Remove sections to make the Dwarf graph dominate (assume symbols were alread removed)!
+
+                     SgAsmGenericSectionList* genericSectionList = isSgAsmGenericSectionList(node);
+                     if (genericSectionList != NULL)
+                        {
+                          SymbolPruningAttribute* att = new SymbolPruningAttribute();
+                          genericSectionList->addNewAttribute("SymbolPruningAttribute",att);
+                        }
+
+                     SgAsmGenericSection* genericSection = isSgAsmGenericSection(node);
+                     if (genericSection != NULL)
+                        {
+                          SymbolPruningAttribute* att = new SymbolPruningAttribute();
+                          genericSection->addNewAttribute("SymbolPruningAttribute",att);
+                        }
+
+                     SgAsmElfSectionTableEntry* elfSectionTableEntry = isSgAsmElfSectionTableEntry(node);
+                     if (elfSectionTableEntry != NULL)
+                        {
+                          SymbolPruningAttribute* att = new SymbolPruningAttribute();
+                          elfSectionTableEntry->addNewAttribute("SymbolPruningAttribute",att);
+                        }
+
+                     SgAsmElfSegmentTableEntry* elfSegmentTableEntry = isSgAsmElfSegmentTableEntry(node);
+                     if (elfSegmentTableEntry != NULL)
+                        {
+                          SymbolPruningAttribute* att = new SymbolPruningAttribute();
+                          elfSegmentTableEntry->addNewAttribute("SymbolPruningAttribute",att);
+                        }
+
+                     SgAsmElfRelaEntry* elfRelaEntry = isSgAsmElfRelaEntry(node);
+                     if (elfRelaEntry != NULL)
+                        {
+                          SymbolPruningAttribute* att = new SymbolPruningAttribute();
+                          elfRelaEntry->addNewAttribute("SymbolPruningAttribute",att);
+                        }
+
+                     SgAsmElfRelaEntryList* elfRelaEntryList = isSgAsmElfRelaEntryList(node);
+                     if (elfRelaEntryList != NULL)
+                        {
+                          SymbolPruningAttribute* att = new SymbolPruningAttribute();
+                          elfRelaEntryList->addNewAttribute("SymbolPruningAttribute",att);
+                        }
+
+                     SgAsmElfDynamicEntryList* elfDynamicEntryList = isSgAsmElfDynamicEntryList(node);
+                     if (elfDynamicEntryList != NULL)
+                        {
+                          SymbolPruningAttribute* att = new SymbolPruningAttribute();
+                          elfDynamicEntryList->addNewAttribute("SymbolPruningAttribute",att);
+                        }
+
+                     SgAsmGenericFormat* genericFormat = isSgAsmGenericFormat(node);
+                     if (genericFormat != NULL)
+                        {
+                          SymbolPruningAttribute* att = new SymbolPruningAttribute();
+                          genericFormat->addNewAttribute("SymbolPruningAttribute",att);
+                        }
+
+                     SgAsmGenericDLLList* genericDLLList = isSgAsmGenericDLLList(node);
+                     if (genericDLLList != NULL)
+                        {
+                          SymbolPruningAttribute* att = new SymbolPruningAttribute();
+                          genericDLLList->addNewAttribute("SymbolPruningAttribute",att);
+                        }
+                  }
+        };
+
+  // Comment out the symbols (factored out)
+     commentOutSymbolsFromDotGraph(node);
+
+  // Now comment out the rest of the non-dwarf IR nodes.
+     CommentOutSymbolsFromDotGraph traversal;
+     traversal.traverse(node,preorder);
+   }
+
+
+void
+readDwarf ( SgAsmFile* asmFile )
+   {
+     ROSE_ASSERT(asmFile != NULL);
+
+     SgAsmGenericFile* genericFile = asmFile->get_genericFile();
+     ROSE_ASSERT(genericFile != NULL);
+
+     int fileDescriptor = genericFile->get_fd();
+
+     int dwarf_init_status = dwarf_init (fileDescriptor, DW_DLC_READ, NULL, NULL, &rose_dwarf_dbg, &rose_dwarf_error);
+  // printf ("dwarf_init_status = %d \n",dwarf_init_status);
+
+  // Test if the call to dwarf_init worked!
+  // ROSE_ASSERT(dwarf_init_status == DW_DLV_OK);
+     if (dwarf_init_status == DW_DLV_OK)
+        {
+       // I am unclear about the functionality of these two functions!
+       // dwarf_set_frame_rule_inital_value(rose_dwarf_dbg,global_config_file_data.cf_initial_rule_value);
+       // dwarf_set_frame_rule_table_size(rose_dwarf_dbg,global_config_file_data.cf_table_entry_count);
+
+       // Dwarf information will be attached to the main SgAsmInterpretation for the binary file.
+          SgAsmInterpretation* asmInterpretation = SageInterface::getMainInterpretation(asmFile);     
+
+       // Main function to read dwarf information
+          build_dwarf_IR_nodes(rose_dwarf_dbg,asmInterpretation);
+
+       // printf ("\n\nFinishing Dwarf handling... \n\n");
+          int dwarf_finish_status = dwarf_finish( rose_dwarf_dbg, &rose_dwarf_error);
+          ROSE_ASSERT(dwarf_finish_status == DW_DLV_OK);
+        }
+       else
+        {
+       // This might be a PE file (or just non-ELF)
+          if (SgProject::get_verbose() > 0)
+             {
+               printf ("No dwarf debug sections found! \n");
+             }
+        }
+
+  // DQ (11/10/2008): Added support to permit symbols to be removed from the DOT graph generation.
+  // This make the DOT files easier to manage since there can be thousands of symbols.  This also
+  // makes it easer to debug the ROSE dwarf AST.
+     SgBinaryFile* binaryFile = isSgBinaryFile(asmFile->get_parent());
+     ROSE_ASSERT (binaryFile != NULL);
+
+  // This is used to reduce the size of the DOT file to simplify debugging Dwarf stuff.
+     if (binaryFile->get_visualize_executable_file_format_skip_symbols() == true)
+        {
+          printf ("Calling commentOutSymbolsFromDotGraph() (for visualization of binary file format withouth symbols) \n");
+          commentOutSymbolsFromDotGraph(asmFile);
+        }
+
+  // Nothing but dwarf!
+     if (binaryFile->get_visualize_dwarf_only() == true)
+        {
+          printf ("Calling commentOutEvertythingButDwarf() (for visualization of Dwarf) \n");
+          commentOutEvertythingButDwarf(asmFile);
+        }
+   }
+
+
+
+
+SgAsmDwarfConstruct*
+SgAsmDwarfConstruct::createDwarfConstruct( int tag, int nesting_level, uint64_t offset, uint64_t overall_offset )
+   {
+  // This function implements the factory pattern.
+
+     SgAsmDwarfConstruct* returnConstruct = NULL;
+
+  // printf ("In SgAsmDwarfConstruct::createDwarfConstruct(): tag = %d nesting_level = %d \n",tag,nesting_level);
+
+  // This uses the libdwarf tag id values
+     switch(tag)
+        {
+       // case DW_TAG_: { returnConstruct = new SgAsmDwarf(nesting_level,offset,overall_offset); break; }
+
+          case DW_TAG_array_type: { returnConstruct = new SgAsmDwarfArrayType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_class_type: { returnConstruct = new SgAsmDwarfClassType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_entry_point: { returnConstruct = new SgAsmDwarfEntryPoint(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_enumeration_type: { returnConstruct = new SgAsmDwarfEnumerationType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_formal_parameter: { returnConstruct = new SgAsmDwarfFormalParameter(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_imported_declaration: { returnConstruct = new SgAsmDwarfImportedDeclaration(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_label: { returnConstruct = new SgAsmDwarfLabel(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_lexical_block: { returnConstruct = new SgAsmDwarfLexicalBlock(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_member: { returnConstruct = new SgAsmDwarfMember(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_pointer_type: { returnConstruct = new SgAsmDwarfPointerType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_reference_type: { returnConstruct = new SgAsmDwarfReferenceType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_compile_unit: { returnConstruct = new SgAsmDwarfCompilationUnit(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_string_type: { returnConstruct = new SgAsmDwarfStringType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_structure_type: { returnConstruct = new SgAsmDwarfStructureType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_subroutine_type: { returnConstruct = new SgAsmDwarfSubroutineType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_typedef: { returnConstruct = new SgAsmDwarfTypedef(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_union_type: { returnConstruct = new SgAsmDwarfUnionType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_unspecified_parameters: { returnConstruct = new SgAsmDwarfUnspecifiedParameters(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_variant: { returnConstruct = new SgAsmDwarfVariant(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_common_block: { returnConstruct = new SgAsmDwarfCommonBlock(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_common_inclusion: { returnConstruct = new SgAsmDwarfCommonInclusion(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_inheritance: { returnConstruct = new SgAsmDwarfInheritance(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_inlined_subroutine: { returnConstruct = new SgAsmDwarfInlinedSubroutine(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_module: { returnConstruct = new SgAsmDwarfModule(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_ptr_to_member_type: { returnConstruct = new SgAsmDwarfPtrToMemberType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_set_type: { returnConstruct = new SgAsmDwarfSetType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_subrange_type: { returnConstruct = new SgAsmDwarfSubrangeType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_with_stmt: { returnConstruct = new SgAsmDwarfWithStmt(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_access_declaration: { returnConstruct = new SgAsmDwarfAccessDeclaration(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_base_type: { returnConstruct = new SgAsmDwarfBaseType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_catch_block: { returnConstruct = new SgAsmDwarfCatchBlock(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_const_type: { returnConstruct = new SgAsmDwarfConstType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_constant: { returnConstruct = new SgAsmDwarfConstant(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_enumerator: { returnConstruct = new SgAsmDwarfEnumerator(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_file_type: { returnConstruct = new SgAsmDwarfFileType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_friend: { returnConstruct = new SgAsmDwarfFriend(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_namelist: { returnConstruct = new SgAsmDwarfNamelist(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_namelist_item: { returnConstruct = new SgAsmDwarfNamelistItem(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_packed_type: { returnConstruct = new SgAsmDwarfPackedType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_subprogram: { returnConstruct = new SgAsmDwarfSubprogram(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_template_type_parameter: { returnConstruct = new SgAsmDwarfTemplateTypeParameter(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_template_value_parameter: { returnConstruct = new SgAsmDwarfTemplateValueParameter(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_thrown_type: { returnConstruct = new SgAsmDwarfThrownType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_try_block: { returnConstruct = new SgAsmDwarfTryBlock(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_variant_part: { returnConstruct = new SgAsmDwarfVariantPart(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_variable: { returnConstruct = new SgAsmDwarfVariable(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_volatile_type: { returnConstruct = new SgAsmDwarfVolatileType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_dwarf_procedure: { returnConstruct = new SgAsmDwarfDwarfProcedure(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_restrict_type: { returnConstruct = new SgAsmDwarfRestrictType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_interface_type: { returnConstruct = new SgAsmDwarfInterfaceType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_namespace: { returnConstruct = new SgAsmDwarfNamespace(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_imported_module: { returnConstruct = new SgAsmDwarfImportedModule(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_unspecified_type: { returnConstruct = new SgAsmDwarfUnspecifiedType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_partial_unit: { returnConstruct = new SgAsmDwarfPartialUnit(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_imported_unit: { returnConstruct = new SgAsmDwarfImportedUnit(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_mutable_type: { returnConstruct = new SgAsmDwarfMutableType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_condition: { returnConstruct = new SgAsmDwarfCondition(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_shared_type: { returnConstruct = new SgAsmDwarfSharedType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_format_label: { returnConstruct = new SgAsmDwarfFormatLabel(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_function_template: { returnConstruct = new SgAsmDwarfFunctionTemplate(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_upc_shared_type: { returnConstruct = new SgAsmDwarfUpcSharedType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_upc_strict_type: { returnConstruct = new SgAsmDwarfUpcStrictType(nesting_level,offset,overall_offset); break; }
+          case DW_TAG_upc_relaxed_type: { returnConstruct = new SgAsmDwarfUpcRelaxedType(nesting_level,offset,overall_offset); break; }
+
+          default:
+             {
+            // Use AsmDwarfVariant as a default dwarf construct (we might want a SgAsmDwarfUnknownConstruct also).
+            // returnConstruct = new SgAsmDwarfVariant(nesting_level,offset,overall_offset);
+               returnConstruct = new SgAsmDwarfUnknownConstruct(nesting_level,offset,overall_offset);
+             }
+        }
+
+#if 0
+     printf ("createDwarfConstruct(): nesting_level = %d building: %s \n",nesting_level,returnConstruct->class_name().c_str());
+#endif
+
+     return returnConstruct;
+   }
+
+
+// endif for "if USE_ROSE_DWARF_SUPPORT" at top of file.
+#else
+
+// DQ (11/12/2008): Function defined so that java-port will not complain.
+SgAsmDwarfConstruct*
+SgAsmDwarfConstruct::createDwarfConstruct( int tag, int nesting_level, uint64_t offset, uint64_t overall_offset )
+   {
+  // This function implements the factory pattern.
+
+     SgAsmDwarfConstruct* returnConstruct = NULL;
+
+#if 1
+     printf ("Dwarf support not enabled (configure command-line option: --with-dwarf) \n");
+#endif
+
+     return returnConstruct;
+   }
+
+#endif
+
+
+
+
+
+
+// ***********************************************************************************
+// ***********************************************************************************
+// This code is independent of the "if USE_ROSE_DWARF_SUPPORT" at the top of this file
+// ***********************************************************************************
+// ***********************************************************************************
+
+std::pair<uint64_t,uint64_t>
+SgAsmDwarfLineList::instructionRange()
+   {
+     DwarfInstructionSourceMapReturnType maps = buildInstructionAddressSourcePositionMaps();
+
+     SgInstructionAddressSourcePositionMapPtrList & instruction_source_code_map = *(maps.first);
+
+     SgInstructionAddressSourcePositionMapPtrList::iterator lowerBound = instruction_source_code_map.begin();
+     SgInstructionAddressSourcePositionMapPtrList::reverse_iterator upperBound = instruction_source_code_map.rbegin();
+
+     return std::pair<uint64_t,uint64_t>(lowerBound->first,upperBound->first);
+   }
+ 
+std::pair<LineColumnFilePosition,LineColumnFilePosition>
+SgAsmDwarfLineList::sourceCodeRange( int file_id )
+   {
+     DwarfInstructionSourceMapReturnType maps = buildInstructionAddressSourcePositionMaps();
+
+     SgSourcePositionInstructionAddressMapPtrList & source_code_instruction_map = *(maps.second);
+
+     SgSourcePositionInstructionAddressMapPtrList::iterator lowerBound = source_code_instruction_map.begin();
+     SgSourcePositionInstructionAddressMapPtrList::reverse_iterator upperBound = source_code_instruction_map.rbegin();
+
+  // Find the first source position in the file specified by the input file_id
+     while ( (lowerBound != source_code_instruction_map.end()) && (lowerBound->first.first != file_id) )
+        {
+          lowerBound++;
+        }
+
+     while ( (upperBound != source_code_instruction_map.rend()) && (upperBound->first.first != file_id) )
+        {
+          upperBound++;
+        }
+
+     LineColumnFilePosition start(lowerBound->first.second);
+     LineColumnFilePosition end(upperBound->first.second);
+
+  // Check if this was a case of there not being any entries for this file
+     if (lowerBound == source_code_instruction_map.end())
+        {
+          ROSE_ASSERT(upperBound == source_code_instruction_map.rend());
+       // printf ("lowerBound == source_code_instruction_map.end() --- no entries for file %d \n",file_id);
+
+       // Reset the line and column information to indicate that there were no entries.
+          start = LineColumnFilePosition(std::pair<int,int>(-1,-1));
+          end = LineColumnFilePosition(std::pair<int,int>(-1,-1));
+        }
+
+     return std::pair<LineColumnFilePosition,LineColumnFilePosition>(start,end);
+   }
+ 
+
+uint64_t
+SgAsmDwarfLineList::sourceCodeToAddress ( FileIdLineColumnFilePosition sourcePosition )
+   {
+  // Return the nearest address for the source code position
+     int file_id = sourcePosition.first;
+  // int line    = sourcePosition.second.first;
+  // int column  = sourcePosition.second.second;
+
+     uint64_t returnAddress = NULL;
+
+     DwarfInstructionSourceMapReturnType maps = buildInstructionAddressSourcePositionMaps();
+     SgSourcePositionInstructionAddressMapPtrList & source_code_instruction_map = *(maps.second);
+
+     SgSourcePositionInstructionAddressMapPtrList::iterator lowerBound = source_code_instruction_map.lower_bound(sourcePosition);
+     SgSourcePositionInstructionAddressMapPtrList::iterator upperBound = source_code_instruction_map.upper_bound(sourcePosition);
+     
+     returnAddress = lowerBound->second;
+
+     if (lowerBound == source_code_instruction_map.begin())
+        {
+       // printf ("lowerBound == source_code_instruction_map.begin() \n");
+          if (lowerBound->first.first != file_id)
+             {
+            // printf ("This source position is not from a valide file in the map: file_id = %d lowerBound->first = %d \n",file_id,lowerBound->first.first);
+               returnAddress = NULL;
+             }
+        }
+
+     if (lowerBound == source_code_instruction_map.end())
+        {
+       // printf ("lowerBound == source_code_instruction_map.end() \n");
+#if 0
+          if (lowerBound->first.first != file_id)
+             {
+               printf ("This source position is not from a valide file in the map: file_id = %d lowerBound->first = %d \n",file_id,lowerBound->first.first);
+               returnAddress = NULL;
+             }
+            else
+             {
+               returnAddress = NULL;
+             }
+#else
+          returnAddress = NULL;
+#endif
+        }
+#if 0
+  // I think this is redundant code
+     if (upperBound == source_code_instruction_map.end())
+        {
+       // printf ("upperBound == source_code_instruction_map.end() \n");
+          returnAddress = NULL;
+        }
+#endif
+
+     return returnAddress;
+   }
+
+FileIdLineColumnFilePosition
+SgAsmDwarfLineList::addressToSourceCode ( uint64_t address )
+   {
+  // Set to default value
+     FileIdLineColumnFilePosition sourcePosition(0,std::pair<int,int>(0,0));
+
+     std::pair<uint64_t,uint64_t> validInstructionRange = instructionRange();
+     if ( (address < validInstructionRange.first) || (address > validInstructionRange.second) )
+        {
+       // printf ("Address out of range: address = 0x%lx  range (0x%lx, 0x%lx) \n",address,validInstructionRange.first,validInstructionRange.second);
+
+       // Set to error value
+          sourcePosition = FileIdLineColumnFilePosition(-1,std::pair<int,int>(-1,-1));
+        }
+       else
+        {
+          DwarfInstructionSourceMapReturnType maps = buildInstructionAddressSourcePositionMaps();
+          SgInstructionAddressSourcePositionMapPtrList & instruction_source_code_map = *(maps.first);
+
+          SgInstructionAddressSourcePositionMapPtrList::iterator lowerBound = instruction_source_code_map.lower_bound(address);
+
+       // Set the the lower bound found in the map
+          sourcePosition = lowerBound->second;
+
+#if 0
+          int file_id = sourcePosition.first;
+          int line    = sourcePosition.second.first;
+          int column  = sourcePosition.second.second;
+          string filename = Sg_File_Info::getFilenameFromID(file_id);
+
+       // printf ("address = 0x%lx maps to source position (file = %d = %s, line = %d, column = %d) \n",address,file_id,filename.c_str(),line,column);
+#endif
+        }
+
+  // return FileIdLineColumnFilePosition(-1,std::pair<int,int>(-1,-1));
+     return sourcePosition;
+   }
+
+
+void
+SgAsmDwarfLineList::display( const string & label )
+   {
+  // Note that once the maps are setup NULL is an acceptable value (perhaps it should be the default parameter!)
+     DwarfInstructionSourceMapReturnType maps = buildInstructionAddressSourcePositionMaps();
+
+  // Output the SgInstructionAddressSourcePositionMapPtrList map so the we can test the linear ordering of the addresses.
+     SgInstructionAddressSourcePositionMapPtrList & instruction_source_code_map = *(maps.first);
+     SgSourcePositionInstructionAddressMapPtrList & source_code_instruction_map = *(maps.second);
+
+     std::pair<uint64_t,uint64_t> addressRange = instructionRange();
+     printf ("addressRange = (0x%lx, 0x%lx) \n",addressRange.first,addressRange.second);
+
+  // Iterate over all the files in the static Sg_File_Info::get_fileidtoname_map
+  // int numberOfSourceFiles = Sg_File_Info::get_fileidtoname_map().size();
+     int numberOfSourceFiles = Sg_File_Info::numberOfSourceFiles();
+     printf ("numberOfSourceFiles = %d \n",numberOfSourceFiles);
+
+  // DQ: I think that the initial value is 1 not 0!
+     for (int i=1; i < numberOfSourceFiles; i++)
+        {
+          std::pair<LineColumnFilePosition,LineColumnFilePosition> sourceFileRange = sourceCodeRange( i );
+
+          std::string filename = Sg_File_Info::getFilenameFromID(i);
+
+          if ( (sourceFileRange.first.first < 0) && (sourceFileRange.second.first < 0) )
+             {
+               printf ("This file_id = %d is not a valid source file: filename = %s \n",i,filename.c_str());
+             }
+            else
+             {
+               printf ("Source range for file = %s (id = %d) [(line=%d, col=%d), (line=%d, col=%d)] \n",
+                    filename.c_str(),i,
+                    sourceFileRange.first.first, sourceFileRange.first.second, 
+                    sourceFileRange.second.first, sourceFileRange.second.second);
+             }
+        }
+
+
+     printf ("\n\nTest sourceCodeToAddress: \n");
+     FileIdLineColumnFilePosition s1(2,std::pair<int,int>(10,-1));
+     uint64_t instructionAddress1 = sourceCodeToAddress(s1);
+     printf ("sourceCodeToAddress(%d,%d,%d) = 0x%lx \n",s1.first,s1.second.first,s1.second.second,instructionAddress1);
+
+     FileIdLineColumnFilePosition s2(2,std::pair<int,int>(11,-1));
+     uint64_t instructionAddress2 = sourceCodeToAddress(s2);
+     printf ("sourceCodeToAddress(%d,%d,%d) = 0x%lx \n",s2.first,s2.second.first,s2.second.second,instructionAddress2);
+
+     FileIdLineColumnFilePosition s3(1,std::pair<int,int>(11,-1));
+     uint64_t instructionAddress3 = sourceCodeToAddress(s3);
+     printf ("sourceCodeToAddress(%d,%d,%d) = 0x%lx \n",s3.first,s3.second.first,s3.second.second,instructionAddress3);
+
+     for (int fileNumber = 1; fileNumber < 4; fileNumber++)
+        {
+          for (int lineNumber = -2; lineNumber < 35; lineNumber++)
+             {
+               for (int columnNumber = -2; columnNumber < 1; columnNumber++)
+                  {
+                    FileIdLineColumnFilePosition s(fileNumber,std::pair<int,int>(lineNumber,columnNumber));
+                    uint64_t instructionAddress = sourceCodeToAddress(s);
+                    printf ("sourceCodeToAddress(%d,%d,%d) = 0x%lx \n",s.first,s.second.first,s.second.second,instructionAddress);
+                  }
+             }
+        }
+
+     printf ("\n\nTest addressToSourceCode: (not tested yet) \n");
+
+     FileIdLineColumnFilePosition s1map = addressToSourceCode(instructionAddress1);
+     printf ("addressToSourceCode: address 0x%lx = (%d,%d,%d) \n",instructionAddress1,s1map.first,s1map.second.first,s1map.second.second);
+
+     for (uint64_t address = instructionAddress1-15; address < instructionAddress1+ 85; address++)
+        {
+          FileIdLineColumnFilePosition s_map = addressToSourceCode(address);
+          printf ("addressToSourceCode: address 0x%lx = (%d,%d,%d) \n",address,s_map.first,s_map.second.first,s_map.second.second);
+        }
+
+     printf ("\nOutput entries in instruction_source_code_map \n");
+     SgInstructionAddressSourcePositionMapPtrList::iterator it1 = instruction_source_code_map.begin();
+     while ( it1 != instruction_source_code_map.end() )
+        {
+          uint64_t address = it1->first;
+
+       // This is a std::map<uint64_t,std::pair<int,std::pair<int,int> > >, so we get
+       //    "it->second.first, it->second.second.first, it->second.second.second"
+       // for the last three terms.
+          int file_id = it1->second.first;
+          int line    = it1->second.second.first;
+          int column  = it1->second.second.second;
+
+          printf ("instruction_source_code_map[0x%lx] = (file=%d, line=%d, col=%d) \n",address, file_id, line, column);
+
+       // A test of the evaluation of ranges of lines for each instruction
+          SgInstructionAddressSourcePositionMapPtrList::iterator it1_lb = instruction_source_code_map.lower_bound(address);
+          SgInstructionAddressSourcePositionMapPtrList::iterator it1_ub = instruction_source_code_map.upper_bound(address);
+
+          if (it1_lb != it1_ub)
+             {
+               if (it1_ub != instruction_source_code_map.end())
+                  {
+                    printf ("   ----- range = [(file=%d, line=%d, col=%d), (file=%d, line=%d, col=%d)) \n",
+                         it1_lb->second.first, it1_lb->second.second.first, it1_lb->second.second.second,
+                         it1_ub->second.first, it1_ub->second.second.first, it1_ub->second.second.second);
+                  }
+                 else
+                  {
+                    printf ("   ----- range = [(file=%d, line=%d, col=%d), last_source_position) \n",
+                         it1_lb->second.first, it1_lb->second.second.first, it1_lb->second.second.second);
+                  }
+             }
+
+          it1++;
+        }
+
+     printf ("\nOutput entries in source_code_instruction_map \n");
+     SgSourcePositionInstructionAddressMapPtrList::iterator it2 = source_code_instruction_map.begin();
+     while ( it2 != source_code_instruction_map.end() )
+        {
+          uint64_t address = it2->second;
+
+       // This is a std::map<uint64_t,std::pair<int,std::pair<int,int> > >, so we get
+       //    "it->second.first, it->second.second.first, it->second.second.second"
+       // for the last three terms.
+          int file_id = it2->first.first;
+          int line    = it2->first.second.first;
+          int column  = it2->first.second.second;
+
+          printf ("source_code_instruction_map[file=%d, line=%d, col=%d] = 0x%lx \n",file_id, line, column, address);
+
+       // A test of the evaluation of ranges of instructions for each line of source code.
+          FileIdLineColumnFilePosition file_info(file_id,std::pair<int,int>(line,column));
+          SgSourcePositionInstructionAddressMapPtrList::iterator it2_lb = source_code_instruction_map.lower_bound(file_info);
+          SgSourcePositionInstructionAddressMapPtrList::iterator it2_ub = source_code_instruction_map.upper_bound(file_info);
+
+          if (it2_lb != it2_ub)
+             {
+               if (it2_ub != source_code_instruction_map.end())
+                  {
+                    printf ("   ----- range = [0x%lx, 0x%lx) \n",it2_lb->second,it2_ub->second);
+                  }
+                 else
+                  {
+                    printf ("   ----- range = [0x%lx, last_instruction) \n",it2_lb->second);
+                  }
+             }
+
+          it2++;
+        }
+   }
+
+
+
+
+

Copied: branches/testonly/src/frontend/SageIII/dwarfSupport.h (from rev 128, trunk/src/frontend/SageIII/dwarfSupport.h)
===================================================================
--- branches/testonly/src/frontend/SageIII/dwarfSupport.h	                        (rev 0)
+++ branches/testonly/src/frontend/SageIII/dwarfSupport.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,12 @@
+// This file is read by rose.h, if the USE_ROSE_DWARF_SUPPORT is set to 1
+// by the use of --with-dwarf=<path> in the ROSE configure command line.
+
+#include <dwarf.h>
+#include <libdwarf.h>
+
+// Main function to read dwarf.
+// void build_dwarf_IR_nodes(Dwarf_Debug dbg, SgAsmInterpretation* asmInterpretation);
+
+void readDwarf ( SgAsmFile* asmFile );
+
+

Copied: branches/testonly/src/frontend/SageIII/omp.h (from rev 128, trunk/src/frontend/SageIII/omp.h)
===================================================================
--- branches/testonly/src/frontend/SageIII/omp.h	                        (rev 0)
+++ branches/testonly/src/frontend/SageIII/omp.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,79 @@
+#ifndef _OMP_H
+#define _OMP_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *omp_lock_t;  /* represented as a pointer */
+typedef void *omp_nest_lock_t; /* represented as a pointer */
+
+/*
+ * Execution Environment Functions
+ */
+void omp_set_num_threads(int num);
+int omp_get_num_threads(void);
+int omp_get_max_threads(void);
+int omp_get_thread_num(void);
+int omp_get_num_procs(void);
+int omp_in_parallel(void);
+void omp_set_dynamic(int dynamic_thds);
+int omp_get_dynamic(void);
+void omp_set_nested(int n_nested);
+int omp_get_nested(void);
+
+/* 
+ * Timer routine
+ */
+double omp_get_wtime(void);
+double omp_get_wtick(void);
+
+/*
+ * Lock Functions
+ */
+void omp_init_lock(omp_lock_t *lock);
+void omp_init_nest_lock(omp_nest_lock_t *lock);
+void omp_destroy_lock(omp_lock_t *lock);
+void omp_destroy_nest_lock(omp_nest_lock_t *lock);
+void omp_set_lock(omp_lock_t *lock);
+void omp_set_nest_lock(omp_nest_lock_t *lock);
+void omp_unset_lock(omp_lock_t *lock);
+void omp_unset_nest_lock(omp_nest_lock_t *lock);
+int omp_test_lock(omp_lock_t *lock);
+int omp_test_nest_lock(omp_nest_lock_t *lock);
+
+/*
+ * FORTRAN Execution Environment Function Wrappers
+ */
+void omp_set_num_threads_(int *num);
+int omp_get_num_threads_(void);
+int omp_get_max_threads_(void);
+int omp_get_thread_num_(void);
+int omp_get_num_procs_(void);
+int omp_in_parallel_(void);
+void omp_set_dynamic_(int *dynamic_thds);
+int omp_get_dynamic_(void);
+void omp_set_nested_(int *n_nested);
+int omp_get_nested_(void);
+
+/*
+ * FORTRAN Lock Function Wrappers
+ */
+typedef unsigned int _omf77Lock_t;
+void omp_init_lock_(_omf77Lock_t *lock);
+void omp_init_nest_lock_(_omf77Lock_t *lock);
+void omp_destroy_lock_(_omf77Lock_t *lock);
+void omp_destroy_nest_lock_(_omf77Lock_t *lock);
+void omp_set_lock_(_omf77Lock_t *lock);
+void omp_set_nest_lock_(_omf77Lock_t *lock);
+void omp_unset_lock_(_omf77Lock_t *lock);
+void omp_unset_nest_lock_(_omf77Lock_t *lock);
+int omp_test_lock_(_omf77Lock_t *lock);
+int omp_test_nest_lock_(_omf77Lock_t *lock);
+
+#ifdef __cplusplus
+} /* closing brace for extern "C" */
+#endif
+
+#endif /* _OMP_H */
+

Deleted: branches/testonly/src/frontend/SageIII/preproc.C
===================================================================
--- branches/testonly/src/frontend/SageIII/preproc.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/preproc.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,2787 +0,0 @@
-#define yy_create_buffer Rose_C_Cxx__create_buffer
-#define yy_delete_buffer Rose_C_Cxx__delete_buffer
-#define yy_scan_buffer Rose_C_Cxx__scan_buffer
-#define yy_scan_string Rose_C_Cxx__scan_string
-#define yy_scan_bytes Rose_C_Cxx__scan_bytes
-#define yy_flex_debug Rose_C_Cxx__flex_debug
-#define yy_init_buffer Rose_C_Cxx__init_buffer
-#define yy_flush_buffer Rose_C_Cxx__flush_buffer
-#define yy_load_buffer_state Rose_C_Cxx__load_buffer_state
-#define yy_switch_to_buffer Rose_C_Cxx__switch_to_buffer
-#define yyin Rose_C_Cxx_in
-#define yyleng Rose_C_Cxx_leng
-#define yylex Rose_C_Cxx_lex
-#define yyout Rose_C_Cxx_out
-#define yyrestart Rose_C_Cxx_restart
-#define yytext Rose_C_Cxx_text
-
-#line 19 "../../../../testonly/src/frontend/SageIII/preproc.C"
-/* A lexical scanner generated by flex */
-
-/* Scanner skeleton version:
- * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
- */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-
-#include <stdio.h>
-#include <unistd.h>
-
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
-#include <stdlib.h>
-
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else	/* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_PROTOS
-#define YY_USE_CONST
-
-#endif	/* __STDC__ */
-#endif	/* ! __cplusplus */
-
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include <io.h>
-#include <stdlib.h>
-#define YY_USE_CONST
-#define YY_USE_PROTOS
-#endif
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index.  If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition.  This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.  The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START ((yy_start - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#define YY_BUF_SIZE 16384
-
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-
-extern int yyleng;
-extern FILE *yyin, *yyout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator).  This
- * avoids problems with code like:
- *
- * 	if ( condition_holds )
- *		yyless( 5 );
- *	else
- *		do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		*yy_cp = yy_hold_char; \
-		YY_RESTORE_YY_MORE_OFFSET \
-		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
-		} \
-	while ( 0 )
-
-#define unput(c) yyunput( c, yytext_ptr )
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-typedef unsigned int yy_size_t;
-
-
-struct yy_buffer_state
-	{
-	FILE *yy_input_file;
-
-	char *yy_ch_buf;		/* input buffer */
-	char *yy_buf_pos;		/* current position in input buffer */
-
-	/* Size of input buffer in bytes, not including room for EOB
-	 * characters.
-	 */
-	yy_size_t yy_buf_size;
-
-	/* Number of characters read into yy_ch_buf, not including EOB
-	 * characters.
-	 */
-	int yy_n_chars;
-
-	/* Whether we "own" the buffer - i.e., we know we created it,
-	 * and can realloc() it to grow it, and should free() it to
-	 * delete it.
-	 */
-	int yy_is_our_buffer;
-
-	/* Whether this is an "interactive" input source; if so, and
-	 * if we're using stdio for input, then we want to use getc()
-	 * instead of fread(), to make sure we stop fetching input after
-	 * each newline.
-	 */
-	int yy_is_interactive;
-
-	/* Whether we're considered to be at the beginning of a line.
-	 * If so, '^' rules will be active on the next match, otherwise
-	 * not.
-	 */
-	int yy_at_bol;
-
-	/* Whether to try to fill the input buffer when we reach the
-	 * end of it.
-	 */
-	int yy_fill_buffer;
-
-	int yy_buffer_status;
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
-	/* When an EOF's been seen but there's still some text to process
-	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
-	 * shouldn't try reading from the input source any more.  We might
-	 * still have a bunch of tokens to match, though, because of
-	 * possible backing-up.
-	 *
-	 * When we actually see the EOF, we change the status to "new"
-	 * (via yyrestart()), so that the user can continue scanning by
-	 * just pointing yyin at a new input file.
-	 */
-#define YY_BUFFER_EOF_PENDING 2
-	};
-
-static YY_BUFFER_STATE yy_current_buffer = 0;
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- */
-#define YY_CURRENT_BUFFER yy_current_buffer
-
-
-/* yy_hold_char holds the character lost when yytext is formed. */
-static char yy_hold_char;
-
-static int yy_n_chars;		/* number of characters read into yy_ch_buf */
-
-
-int yyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1;		/* whether we need to initialize */
-static int yy_start = 0;	/* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin.  A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void yyrestart YY_PROTO(( FILE *input_file ));
-
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
-
-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
-
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
-static void yy_flex_free YY_PROTO(( void * ));
-
-#define yy_new_buffer yy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_is_interactive = is_interactive; \
-	}
-
-#define yy_set_bol(at_bol) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_at_bol = at_bol; \
-	}
-
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
-
-#define yywrap() 1
-#define YY_SKIP_YYWRAP
-typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-typedef int yy_state_type;
-extern char *yytext;
-#define yytext_ptr yytext
-
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
-	yytext_ptr = yy_bp; \
-	yyleng = (int) (yy_cp - yy_bp); \
-	yy_hold_char = *yy_cp; \
-	*yy_cp = '\0'; \
-	yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 46
-#define YY_END_OF_BUFFER 47
-static yyconst short int yy_accept[143] =
-    {   0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,   47,   46,   25,   23,    7,    4,
-        5,   25,    6,    6,    2,    3,   25,   25,    6,   32,
-       35,   46,   38,   36,   38,   26,   31,   30,   46,   42,
-       40,   42,   42,   45,   44,   45,    9,    8,    6,    6,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        6,   33,   34,   37,   27,   29,   28,   41,   39,   43,
-        6,    0,    0,    0,    0,    0,   16,    0,    0,    0,
-        0,    6,    6,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    6,    6,    0,    0,   19,
-
-       20,    0,    0,    0,    0,    0,   14,    0,    0,    6,
-        6,    0,    0,   21,   15,   17,    0,    0,   13,    0,
-        6,    6,    0,   12,   18,    0,    0,    0,    0,    6,
-       11,   22,    0,    6,    0,    0,    6,    0,    1,    0,
-        6,    0
-    } ;
-
-static yyconst int yy_ec[256] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
-        4,    4,    4,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    1,    5,    6,    1,    1,    1,    1,    7,
-        8,    9,   10,    1,    1,    1,   11,   12,   12,   12,
-       12,   12,   12,   12,   12,   12,   12,    1,    1,    1,
-        1,    1,    1,    1,   13,   13,   14,   13,   13,   13,
-       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
-       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
-        1,   15,    1,    1,   16,    1,   17,   13,   18,   19,
-
-       20,   21,   22,   13,   23,   13,   13,   24,   13,   25,
-       26,   13,   13,   27,   28,   29,   30,   13,   31,   32,
-       13,   13,   33,    1,   34,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1
-    } ;
-
-static yyconst int yy_meta[35] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    2,    2,    1,    2,    2,    2,    2,    2,
-        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
-        2,    2,    1,    1
-    } ;
-
-static yyconst short int yy_base[152] =
-    {   0,
-        0,    0,    0,   33,   33,   34,   35,   37,   40,   47,
-       48,   53,   38,   51,  185,  186,  186,  186,  186,  186,
-      186,   56,    0,  155,  186,  186,   55,   74,  151,  186,
-      186,  179,  186,  186,  170,  186,  186,  186,   66,  186,
-      186,  171,  176,  186,  186,  167,  186,  186,    0,  160,
-       64,    0,  144,    0,  155,   53,   58,  151,  148,  155,
-      142,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-      141,  140,  147,   58,  148,  139,   63,  147,  139,  144,
-      135,  141,  137,  139,  135,  136,  136,  132,  128,  116,
-      116,  110,  113,  112,  106,  103,  111,  101,  102,  186,
-
-      186,  105,   98,  103,  103,   92,  186,  100,   97,   94,
-      102,   92,   96,  186,  186,  186,   94,   95,  186,   88,
-       85,   94,   87,  186,  186,   91,   88,   94,   95,   85,
-      186,  186,   90,   73,   70,   81,   56,  104,  186,   53,
-        0,  186,  137,  139,  141,  143,  145,  147,   40,  149,
-      151
-    } ;
-
-static yyconst short int yy_def[152] =
-    {   0,
-      143,  143,  142,    3,  144,  144,  145,  145,  146,  146,
-      147,  147,  148,  148,  142,  142,  142,  142,  142,  142,
-      142,  142,  149,  149,  142,  142,  142,  142,  149,  142,
-      142,  150,  142,  142,  142,  142,  142,  142,  151,  142,
-      142,  142,  142,  142,  142,  142,  142,  142,  149,  149,
-      142,   28,  142,   28,  142,  142,  142,  142,  142,  142,
-      149,  142,  142,  142,  142,  142,  142,  142,  142,  142,
-      149,  142,  142,  142,  142,  142,  142,  142,  142,  142,
-      142,  149,  149,  142,  142,  142,  142,  142,  142,  142,
-      142,  142,  142,  142,  142,  149,  149,  142,  142,  142,
-
-      142,  142,  142,  142,  142,  142,  142,  142,  142,  149,
-      149,  142,  142,  142,  142,  142,  142,  142,  142,  142,
-      149,  149,  142,  142,  142,  142,  142,  142,  142,  149,
-      142,  142,  142,  149,  142,  142,  149,  142,  142,  142,
-      149,    0,  142,  142,  142,  142,  142,  142,  142,  142,
-      142
-    } ;
-
-static yyconst short int yy_nxt[221] =
-    {   0,
-       17,   17,   18,   17,   19,   17,   20,   21,   17,   17,
-       22,   17,   23,   23,   17,   23,   23,   23,   23,   23,
-       23,   23,   23,   23,   23,   23,   23,   24,   23,   23,
-       23,   23,   25,   26,   27,   31,   31,   34,   28,   34,
-       45,   49,   37,   35,   38,   35,   46,   32,   32,   37,
-       41,   38,   29,   45,   39,   41,   51,  135,   42,   46,
-       52,   39,   43,   42,   47,   51,   48,   43,   66,   52,
-       67,  138,  138,  138,   53,   54,   74,   75,   77,   76,
-       86,   90,   78,   53,  141,   87,  128,   91,  128,  129,
-      140,  129,   55,   56,  135,  128,   57,   58,  129,  136,
-
-      137,  134,  139,   59,   60,  138,  138,  138,  133,  132,
-      131,  130,  127,  126,  125,  124,  123,  122,  121,  120,
-      119,  118,  117,  116,  115,  114,  113,  112,  111,  110,
-      109,  108,  107,  106,  105,  104,  139,   16,   16,   30,
-       30,   33,   33,   36,   36,   40,   40,   44,   44,   62,
-       62,   65,   65,  103,  102,  101,  100,   99,   98,   97,
-       96,   95,   94,   93,   92,   89,   88,   85,   84,   83,
-       82,   81,   80,   79,   73,   72,   71,   70,   69,   68,
-       64,   63,   61,   50,  142,   15,  142,  142,  142,  142,
-      142,  142,  142,  142,  142,  142,  142,  142,  142,  142,
-
-      142,  142,  142,  142,  142,  142,  142,  142,  142,  142,
-      142,  142,  142,  142,  142,  142,  142,  142,  142,  142
-    } ;
-
-static yyconst short int yy_chk[221] =
-    {   0,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    4,    5,    6,    7,    4,    8,
-       13,  149,    9,    7,    9,    8,   13,    5,    6,   10,
-       11,   10,    4,   14,    9,   12,   27,  140,   11,   14,
-       27,   10,   11,   12,   22,   51,   22,   12,   39,   51,
-       39,  135,  135,  135,   27,   28,   56,   56,   57,   56,
-       74,   77,   57,   51,  137,   74,  121,   77,  123,  121,
-      136,  123,   28,   28,  133,  128,   28,   28,  128,  133,
-
-      134,  130,  135,   28,   28,  138,  138,  138,  129,  127,
-      126,  122,  120,  118,  117,  113,  112,  111,  110,  109,
-      108,  106,  105,  104,  103,  102,   99,   98,   97,   96,
-       95,   94,   93,   92,   91,   90,  138,  143,  143,  144,
-      144,  145,  145,  146,  146,  147,  147,  148,  148,  150,
-      150,  151,  151,   89,   88,   87,   86,   85,   84,   83,
-       82,   81,   80,   79,   78,   76,   75,   73,   72,   71,
-       61,   60,   59,   58,   55,   53,   50,   46,   43,   42,
-       35,   32,   29,   24,   15,  142,  142,  142,  142,  142,
-      142,  142,  142,  142,  142,  142,  142,  142,  142,  142,
-
-      142,  142,  142,  142,  142,  142,  142,  142,  142,  142,
-      142,  142,  142,  142,  142,  142,  142,  142,  142,  142
-    } ;
-
-static yy_state_type yy_last_accepting_state;
-static char *yy_last_accepting_cpos;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-#define INITIAL 0
-#line 3 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-/* 
-    preproc.lex: This lexer currently recognizes C style comments, C++ style 
-    comments, preprocessor directives, and c/c++ linkage specifications.  
-    line/column/text information for each recognized directive is stored in 
-    ROSEAttributesList.  This information is used by the unparser.
-*/
-
-/*
--------------------------------------------------------------------------------------
-Originally written and modified by Markus Schordan and Dan Quinlan.
-(see ChangeLog).
-
-08-05-2006: Rewritten significantly by Ramakrishna Upadrasta.
-Reason: For supporting additional features and bug-fixing (see summary below).
-Note: The old preproc.lex is available in the same directory as preproc.original.lex
-------------------------------------------------------------------------------------
-*/
-//Ramakrishna Upadrasta
-//01-12-07: This is only version 0 of this file
-
-
-/*
-Summary of the changes:
-=========================================================================================
-    The regular expressions (and the action code) for C++ comments and 
-    C style comments has been cleaned up and are (hopefully:) upto the standard.
-=========================================================================================
-    Naming of variables: 
-	changed the lex variable names (states/start conditions) so that 
-	    CXX_COMMENT to corresponds to C++ style comments (beginning with //) and 
-	    C_COMMENT to correspond to C-style comments (enclosed by / * and * / ).
-	Earlier they were
-	    C_COMMENT corresponded to C++ style comments
-	    CPP_COMMENT corresponded to C-style comments.
-	It was felt that the names were confusing.
-	The other choice was to name the C-style comments as C_COMMENT and C++ style 
-	comments as CPP_COMMENT as in Wave. That was also found to be confusing, as CPP usually 
-	means C Pre Processor). The new terminology is (partly) taken from makefiles which 
-	allows 3 types of flags (C_FLAGS/CPP_FLAGS/CXX_FLAGS).
-
-=========================================================================================
-	Use STL types for instead of fixed size buffers for the following data structures
-	commentString, macroString and bracestack.  (earlier they were 
-		char commentString[10000000] for comments 
-		char macroString[10000000] for macro strings
-		and char bracestack[500] for matching of braces)
-=========================================================================================
-    Exact Position information for literals
-	The previous method to get the position information from EDG is incorrect in 
-	most of the cases. A second scan (like this lexer does) of the input was thought 
-	to be necessary to attach additional info.
-=========================================================================================
-    Support for char literals
-	including the '\e' '\U' which would be part of 2008 standard
-	refer to ???? for details
-=========================================================================================
-    Semi colons
-	We have to ensure that semi colons for that donot actually end 
-	statements are taken care of carefully.
-	class A {
-	f(); <-- this semi colon should be taken care of carefully.
-	}
-=========================================================================================
-    Double colons (::'s)
-        They can only occur in  .........
-	we identify them with 
-=========================================================================================
-trigraphs
-    
-=========================================================================================
-    backslashes followed by newlines
-	Either inside or outside of comments
-=========================================================================================
-    Whitespace info:
-	The 
-
-=========================================================================================
-    Line number information:
-	A better line count
-
-=========================================================================================
-    Trigraphs/Digraphs
-=========================================================================================
-    Proper identification and matching of different varieties of brackets
-	Parenthesis ()
-	Curly braces {}: The support for this existed earlier
-	Square brackets []
-=========================================================================================
-    Support for keywords
-	C++
-	C
-	C99
-	C++Ox 
-	    Ones only in 
-=========================================================================================
-    To be done in CHAR literals
-	wierd char literals
-	testing for octal and hex char literals
-	testing for backslashes in char literals.
-    To be done in INT literals
-	testing for 
-=========================================================================================
-    Limitations/open questions: 
-	This lexer does not handle lots of important cases, like 
-		character literals etc.  
-		Trigraph sequences, alternative tokens (lex.trigraph and lex.digraph of the standard).  
-		hexadecimal floating point literals and similar arcane stuff 
-			(HOW DOES EDG handle them? How does Wave handle them?)
-    The user should probably use the wave workaround (does it support these?????), if she needs such things.
-=========================================================================================
-    Use of standard variable names like ([:space:] and [:blank:]) that come with FLEX. 
-    Read the flex http://www.gnu.org/software/flex/manual/ for details. They work like C functions
-    isspace and isblank respectively.
-=========================================================================================
-=========================================================================================
-    A ROSE-sequence point in the original program is a position in the input program where 
-    synchronization of the AST happens with the input program. For now, the sequence points
-    are specific lexical tokens in the input program. In specific, they are 
-	parenthesis: () 
-	curly braces: {} 
-	semi colons: ;
-	new lines: \n
-    The possible are contenders for being sequence points
-	keywords???
-
-
-    Sequence points of the program so that exact code generation is done
-	If the code is not transformed? we synchronize the code generation
-	If the code is transformed, we synchronize the code generation immediately after the next sequence point.
-
-    An extension to the above token/character based sequence-points is to use parsing-constructs in the
-    the grammar of the source language, like
-	end of statement-sequence
-	end of function/class/namespace definition
-=========================================================================================
-    ellipsis????
-
-=========================================================================================
-=========================================================================================
-=========================================================================================
-Notes about coding style:
-    There is a unsaid tradition of separating the patterns and the actions in LEX files by tabs.
-    I am using that, though Dan prefers that whitespace be used for indentation.
-*/
-
-/*
-Test cases these (atleast fix) and effect:
-    test2005_170.C about the buffer size of (C and C++ style) comments.
-    test2001_18.C (and its related files: test2001_18A.h and test2001_18B.h): which is about the includes having code segments??????????????
-    test2006_15.C: which is about the handling of the character literals.  
-    test2005_184.C: which is about handling of backslashes at the end of C++ style comments
--------------------
-    test2005_131.C
-The ones that have singlequotes in a IF(0) and were earlier preprocessed silently, but are being flagged (incorrectly??) because we identify character literrals
-Cxx tests
-    test2004_154.C
-    test2005_178.C
-    test2005_191.C
-    test2005_194.C
-    test2005_196.C
-    test2005_198.C
-    test2005_199.C
-    test2006_16.C
-    test2006_17.C
-    test2006_18.C
-    test2006_26.C
--------------------------------------------------
-write test cases so that 
-    comments and preprocssor stuff etc.
-    
-*/
-/*
-       CHANGE LINES LIKE THIS TO ACCEPT std::string instead of char*, which makes us give it a c_str
-		    preprocessorList.addElement(macrotype,macroString_str.c_str(),globalFileName,preproc_start_line_num,preproc_start_column_num,preproc_line_num-preproc_start_line_num); 
-*/
-
-
-#include <iostream>
-#include <stdio.h>
-#include <ctype.h>
-#include <string>
-#include <string.h>
-#include <list>
-
-/* DQ (1/21/2008): This now has a single definition in the header file: ROSE/src/frontend/SageIII/general_defs.h */
-#include "general_token_defs.h"
-
-
-#if 0
-// DQ (1/21/2008): This definition is now redundent with what is in general_token_defs.h
-struct token_element
-{
-    std::string token_lexeme;
-    int token_id;
-};
-#endif
-
-#if 0
-// These are now defined in general_defs.h
-//Ideally this should inherit from Sg_File_Info
-//But for now, this will work
-struct file_pos_info
-{
-    int line_num;
-    int column_num;
-};
-
-struct stream_element
-{ 
-    struct token_element * p_tok_elem;
-    struct file_pos_info beginning_fpi;
-    struct file_pos_info ending_fpi;
-};
-#endif
-
-
-using namespace std;
-
-// list <stream_element*> ROSE_token_stream;
-// typedef list <stream_element*>:: iterator SE_ITR;
-LexTokenStreamTypePointer ROSE_token_stream_pointer = NULL;
-typedef LexTokenStreamType::iterator SE_ITR;
-
-struct file_pos_info curr_beginning;
-
-
-//Rama
-//#ifdef ROSE_TOKEN_IDENTIFIERS_H
-//#define ROSE_TOKEN_IDENTIFIERS_H
-
-//These would be used in the file INFO
-//File info
-namespace ROSE_token_ids
-{
-    //whitespace token IDs
-    enum whitespace{ 
-	T_NOTKNOWN,
-	//The following are non UNIX whitespace
-    };
-
-#if 0
-    //I brazenly copied from the interface of WAVE for these enums
-    enum ROSE_C_CXX_keywords
-    {
-        ROSE_ASM /* WAVE equivalent is T_ASM */
-        ROSE_AUTO /* WAVE equivalent is T_AUTO */
-        ROSE_BOOL /* WAVE equivalent is T_BOOL */
-        ROSE_BREAK /* WAVE equivalent is T_BREAK */
-        ROSE_CASE /* WAVE equivalent is T_CASE */
-        ROSE_CATCH /* WAVE equivalent is T_CATCH */
-        ROSE_CHAR /* WAVE equivalent is T_CHAR */
-        ROSE_CLASS /* WAVE equivalent is T_CLASS */
-        ROSE_CONST /* WAVE equivalent is T_CONST */
-        ROSE_CONSTCAST /* WAVE equivalent is T_CONSTCAST */
-        ROSE_CONTINUE /* WAVE equivalent is T_CONTINUE */
-        ROSE_DEFAULT /* WAVE equivalent is T_DEFAULT */
-        ROSE_DEFINED /* WAVE equivalent is T_DEFINED */
-        ROSE_DELETE /* WAVE equivalent is T_DELETE */
-        ROSE_DO /* WAVE equivalent is T_DO */
-        ROSE_DOUBLE /* WAVE equivalent is T_DOUBLE */
-        ROSE_DYNAMICCAST /* WAVE equivalent is T_DYNAMICCAST */
-        ROSE_ELSE /* WAVE equivalent is T_ELSE */
-        ROSE_ENUM /* WAVE equivalent is T_ENUM */
-        ROSE_EXPLICIT /* WAVE equivalent is T_EXPLICIT */
-        ROSE_EXPORT /* WAVE equivalent is T_EXPORT */
-        ROSE_EXTERN /* WAVE equivalent is T_EXTERN */
-        ROSE_FLOAT /* WAVE equivalent is T_FLOAT */
-        ROSE_FOR /* WAVE equivalent is T_FOR */
-        ROSE_FRIEND /* WAVE equivalent is T_FRIEND */
-        ROSE_GOTO /* WAVE equivalent is T_GOTO */
-        ROSE_IF /* WAVE equivalent is T_IF */
-        ROSE_INLINE /* WAVE equivalent is T_INLINE */
-        ROSE_INT /* WAVE equivalent is T_INT */
-        ROSE_LONG /* WAVE equivalent is T_LONG */
-        ROSE_MUTABLE /* WAVE equivalent is T_MUTABLE */
-        ROSE_NAMESPACE /* WAVE equivalent is T_NAMESPACE */
-        ROSE_NEW /* WAVE equivalent is T_NEW */
-        ROSE_OPERATOR /* WAVE equivalent is T_OPERATOR */
-        ROSE_PRIVATE /* WAVE equivalent is T_PRIVATE */
-        ROSE_PROTECTED /* WAVE equivalent is T_PROTECTED */
-        ROSE_PUBLIC /* WAVE equivalent is T_PUBLIC */
-        ROSE_REGISTER /* WAVE equivalent is T_REGISTER */
-        ROSE_REINTERPRETCAST /* WAVE equivalent is T_REINTERPRETCAST */
-        ROSE_RETURN /* WAVE equivalent is T_RETURN */
-        ROSE_SHORT /* WAVE equivalent is T_SHORT */
-        ROSE_SIGNED /* WAVE equivalent is T_SIGNED */
-        ROSE_SIZEOF /* WAVE equivalent is T_SIZEOF */
-        ROSE_STATIC /* WAVE equivalent is T_STATIC */
-        ROSE_STATICCAST /* WAVE equivalent is T_STATICCAST */
-        ROSE_STRUCT /* WAVE equivalent is T_STRUCT */
-        ROSE_SWITCH /* WAVE equivalent is T_SWITCH */
-        ROSE_TEMPLATE /* WAVE equivalent is T_TEMPLATE */
-        ROSE_THIS /* WAVE equivalent is T_THIS */
-        ROSE_THROW /* WAVE equivalent is T_THROW */
-        ROSE_TRY /* WAVE equivalent is T_TRY */
-        ROSE_TYPEDEF /* WAVE equivalent is T_TYPEDEF */
-        ROSE_TYPEID /* WAVE equivalent is T_TYPEID */
-        ROSE_TYPENAME /* WAVE equivalent is T_TYPENAME */
-        ROSE_UNION /* WAVE equivalent is T_UNION */
-        ROSE_UNSIGNED /* WAVE equivalent is T_UNSIGNED */
-        ROSE_USING /* WAVE equivalent is T_USING */
-        ROSE_VIRTUAL /* WAVE equivalent is T_VIRTUAL */
-        ROSE_VOID /* WAVE equivalent is T_VOID */
-        ROSE_VOLATILE /* WAVE equivalent is T_VOLATILE */
-        ROSE_WCHART /* WAVE equivalent is T_WCHART */
-        ROSE_WHILE /* WAVE equivalent is T_WHILE */
-    };
-#endif
-
-    enum ROSE_C_CXX_keywords 
-    {
-        C_CXX_ASM = 0 + 500,
-        C_CXX_AUTO = 1 + 500,
-        C_CXX_BOOL = 2 + 500,
-        C_CXX_BREAK = 3 + 500,
-        C_CXX_CASE = 4 + 500,
-        C_CXX_CATCH = 5 + 500,
-        C_CXX_CHAR = 6 + 500,
-        C_CXX_CLASS = 7 + 500,
-        C_CXX_CONST = 8 + 500,
-        C_CXX_CONSTCAST = 9 + 500,
-        C_CXX_CONTINUE = 10 + 500,
-        C_CXX_DEFAULT = 11 + 500,
-        C_CXX_DEFINED = 12 + 500,
-        C_CXX_DELETE = 13 + 500,
-        C_CXX_DO = 14 + 500,
-        C_CXX_DOUBLE = 15 + 500,
-        C_CXX_DYNAMICCAST = 16 + 500,
-        C_CXX_ELSE = 17 + 500,
-        C_CXX_ENUM = 18 + 500,
-        C_CXX_EXPLICIT = 19 + 500,
-        C_CXX_EXPORT = 20 + 500,
-        C_CXX_EXTERN = 21 + 500,
-        C_CXX_FALSE = 22 + 500,
-        C_CXX_FLOAT = 23 + 500,
-        C_CXX_FOR = 24 + 500,
-        C_CXX_FRIEND = 25 + 500,
-        C_CXX_GOTO = 26 + 500,
-        C_CXX_IF = 27 + 500,
-        C_CXX_INLINE = 28 + 500,
-        C_CXX_INT = 29 + 500,
-        C_CXX_LONG = 30 + 500,
-        C_CXX_MUTABLE = 31 + 500,
-        C_CXX_NAMESPACE = 32 + 500,
-        C_CXX_NEW = 33 + 500,
-        C_CXX_OPERATOR = 34 + 500,
-        C_CXX_PRIVATE = 35 + 500,
-        C_CXX_PROTECTED = 36 + 500,
-        C_CXX_PUBLIC = 37 + 500,
-        C_CXX_REGISTER = 38 + 500,
-        C_CXX_REINTERPRETCAST = 39 + 500,
-        C_CXX_RETURN = 40 + 500,
-        C_CXX_SHORT = 41 + 500,
-        C_CXX_SIGNED = 42 + 500,
-        C_CXX_SIZEOF = 43 + 500,
-        C_CXX_STATIC = 44 + 500,
-        C_CXX_STATICCAST = 45 + 500,
-        C_CXX_STRUCT = 46 + 500,
-        C_CXX_SWITCH = 47 + 500,
-        C_CXX_TEMPLATE = 48 + 500,
-        C_CXX_THIS = 49 + 500,
-        C_CXX_THROW = 50 + 500,
-        C_CXX_TRY = 51 + 500,
-        C_CXX_TRUE = 52 + 500,
-        C_CXX_TYPEDEF = 53 + 500,
-        C_CXX_TYPEID = 54 + 500,
-        C_CXX_TYPENAME = 55 + 500,
-        C_CXX_UNION = 56 + 500,
-        C_CXX_UNSIGNED = 57 + 500,
-        C_CXX_USING = 58 + 500,
-        C_CXX_VIRTUAL = 59 + 500,
-        C_CXX_VOID = 60 + 500,
-        C_CXX_VOLATILE = 61 + 500,
-        C_CXX_WCHART = 62 + 500,
-        C_CXX_WHILE = 63 + 500
-   };
-
-      //the following are alternate tokens.
-      //Refer to page 12 of C++ STD
-
-enum ROSE_C_CXX_alternate_tok
-    {
-        C_CXX_LEFT_CURLY_ALT, // The <% which is the same as {
-        C_CXX_RIGHT_CURLY_ALT, //The %> which is the same as }
-        C_CXX_LEFT_SQUARE_ALT, //The <: which is the same as [
-        C_CXX_RIGHT_SQUARE_ALT,//The :> which is the same as ]
-        C_CXX_HASH_ALT, // The #
-        C_CXX_HASH_HASH_ALT, // The 
-        C_CXX_and_ALT, // The #
-    };
-
-enum ROSE_C_CXX_Additional_Info
-{
-      C_CXX_COMMENTS = 0 + 100000,
-      C_CXX_STRING_LITERALS = 1 + 100000,
-      C_CXX_IDENTIFIER = 2 + 100000,
-      C_CXX_UNIDENTIFIED_TOKEN = 3 + 100000,
-      C_CXX_ERROR = 4 + 100000
-};
-
-
-
-};
-
-using namespace ROSE_token_ids;
-
-token_element ROSE_C_CXX_keyword_map[] = 
-{
-        {"asm",              C_CXX_ASM }, 
-        {"auto",             C_CXX_AUTO },
-        {"bool",             C_CXX_BOOL },
-        {"break",            C_CXX_BREAK },
-        {"case",             C_CXX_CASE },
-        {"catch",            C_CXX_CATCH },
-        {"char",             C_CXX_CHAR },
-        {"class",            C_CXX_CLASS },
-        {"const",            C_CXX_CONST },
-        {"const_cast",       C_CXX_CONSTCAST },
-        {"continue",         C_CXX_CONTINUE },
-        {"default",          C_CXX_DEFAULT },
-        //{"defined",        C_CXX_DEFINED },
-        {"delete",           C_CXX_DELETE },
-        {"do",               C_CXX_DO },
-        {"double",           C_CXX_DOUBLE },
-        {"dynamic_cast",     C_CXX_DYNAMICCAST },
-        {"else",             C_CXX_ELSE },
-        {"enum",             C_CXX_ENUM },
-        {"explicit",         C_CXX_EXPLICIT },
-        {"export",           C_CXX_EXPORT },
-        {"extern",           C_CXX_EXTERN },
-        {"false",            C_CXX_FALSE },
-        {"float",            C_CXX_FLOAT },
-        {"for",              C_CXX_FOR },
-        {"friend",           C_CXX_FRIEND },
-        {"goto",             C_CXX_GOTO },
-        {"if",               C_CXX_IF },
-        {"inline",           C_CXX_INLINE },
-        {"int",              C_CXX_INT },
-        {"long",             C_CXX_LONG },
-        {"mutable",          C_CXX_MUTABLE },
-        {"namespace",        C_CXX_NAMESPACE },
-        {"new",              C_CXX_NEW },
-        {"operator",         C_CXX_OPERATOR },
-        {"private",          C_CXX_PRIVATE },
-        {"protected",        C_CXX_PROTECTED },
-        {"public",           C_CXX_PUBLIC },
-        {"register",         C_CXX_REGISTER },
-        {"reinterpret_cast", C_CXX_REINTERPRETCAST },
-        {"return",           C_CXX_RETURN },
-        {"short",            C_CXX_SHORT },
-        {"signed",           C_CXX_SIGNED },
-        {"sizeof",           C_CXX_SIZEOF },
-        {"static",           C_CXX_STATIC },
-        {"static_cast",      C_CXX_STATICCAST },
-        {"struct",           C_CXX_STRUCT },
-        {"switch",           C_CXX_SWITCH },
-        {"template",         C_CXX_TEMPLATE },
-        {"this",             C_CXX_THIS },
-        {"throw",            C_CXX_THROW },
-        {"true",             C_CXX_TRUE },
-        {"try",              C_CXX_TRY },
-        {"typedef",          C_CXX_TYPEDEF },
-        {"typeid",           C_CXX_TYPEID },
-        {"typename",         C_CXX_TYPENAME },
-        {"union",            C_CXX_UNION },
-        {"unsigned",         C_CXX_UNSIGNED },
-        {"using",            C_CXX_USING },
-        {"virtual",          C_CXX_VIRTUAL },
-        {"void",             C_CXX_VOID },
-        {"volatile",         C_CXX_VOLATILE },
-        {"wchar_t",          C_CXX_WCHART },
-        {"while",            C_CXX_WHILE }
-};
-
-
-
-//We know that this is a magic number. 
-//We also know how to fix it.
-#define NUM_C_CXX_KEYWORDS 63
-
-//returns -1 if the string is not a keyword
-//otherwise returns the token ID
-int identify_if_C_CXX_keyword(std::string str)
-{
-    //In FORTRAN, the identifiers are case insensitive.
-    //So, variable 'ArEa' is the same as 'aReA'
-
-    string lowered_str;
-    for(unsigned int i = 0; i < str.size(); i++)
-    {
-        lowered_str += (unsigned char)tolower(str[i]);
-    }
-
-    //printf("got called with %s. Converted to %s\n", str.c_str(), lowered_str.c_str());
-    for(int i = 0; i < NUM_C_CXX_KEYWORDS; i++)
-    {
-        if(lowered_str == ROSE_C_CXX_keyword_map[i].token_lexeme)
-        {
-            return (ROSE_C_CXX_keyword_map[i].token_id);
-        }
-    }
-    return -1;
-}
-
-
-
-//#endif
-
-
-
-#include "sage3.h"
-
-// DQ (11/17/2004): Avoid compiler warning about unused function
-#define YY_NO_UNPUT
-
-#ifdef BOOL_IS_BROKEN
-// If BOOL_IS_BROKEN then we can assume that there is no definition for "true" and "false"
-#ifndef false
-#define false 0
-#endif
-#ifndef true
-#define true  1
-#endif
-#ifndef bool
-typedef int bool;
-#endif
-#endif
-
-#ifndef ROSE_ASSERT
-#define ROSE_ASSERT assert
-#endif
-
-#include "rose_attributes_list.h"
-#define yytext Rose_C_Cxx_text
-#define yylex  Rose_C_Cxx_lex
-
-#define HANDLEMACROSTART preproc_start_line_num=preproc_line_num; preproc_start_column_num=1; preproc_column_num+=strlen(yytext); macroString = yytext; BEGIN MACRO;
-
-int i = 0;
-
-std::string commentString;
-std::string macroString;
-//remove these _st's later
-std::stack<int> curly_brace_stack_st;
-std::stack<int> parenthesis_stack;
-std::stack<int> square_bracket;
-
-//All the above should be "matching constructs"
-//create new for various casts and templates
-
-
-// DQ (4/19/2006):
-// Store the name of the current file so that we can generate Sg_File_Info objects
-// for each comment.  Later we might want starting and ending fileInfo for each 
-// comments and CPP directive.
-std::string globalFileName;
-
-int curr_brace_depth=0;
-int ls_startingline_no; 
-int ls_startingpreproc_column_num; 
-int brace_counting_on=0;
-PreprocessingInfo::DirectiveType macrotype = PreprocessingInfo::CpreprocessorUnknownDeclaration;
-
-int topcurlybracestack();
-void pushbracestack(int);
-int popbracestack();
-bool isemptystack();
-
-int num_of_newlines(char*);
-
-ROSEAttributesList preprocessorList;
-
-// DQ (10/30/2005): Changed
-// string			\"([^"]|"\\\""|"\\\n")*\"
-// to 
-// string			\"([^"]|"\\\n")*\"
-// to fix test2005_184.C (use of "\\" in string caused following 
-// macros to be ignored until a double quote (e.g. ") was found).
-
-// DQ (6/25/2006): This was the value before I tried the previous value
-// string			\"([^"]|"\\\n")*\"
-// I tried:
-// string			\"([^"]|"\\n")*\"
-// and: 
-// string			\"([^"]|"\\\\n")*\"
-// This however didn't make any difference, so I restored it it it previous value!
-
-// DQ (6/25/2006): What did fix the problem with continuation chars in C++ comments was changing
-// "<CXX_COMMENT>\\\n {" to "<CXX_COMMENT>\\\\n {"
-
-//add stuff for char literals???????????
-
-/*
-whitespacenl           	[\t\n ]+
-whitespace      	[\t ]+
-lineprefix		^{whitespace}*"#"{whitespace}*
-macrokeyword 		"include"|"define"|"undef"|"line"|"error"|"warning"|"if"|"ifdef"|"ifndef"|"elif"|"else"|"endif"
-mlinkagespecification	^{whitespace}*"extern"{whitespace}*(("\"C\"")|("\"C++\"")){whitespacenl}*"{"
-string			\"([^"]|"\\\n")*\"
-*/
-
-//refresher: blank and space function exactly as the STDLIB functions isblank and isspace respectively.
-//blank matches only the various blank characters (\b,\t). It does NOT match new line. (and its variants).
-//space matches blanks, newlines (various flavours like formfeed etc) as well as other stuff like vertical tab '\v' etc.
-//refer to http://www.gatago.com/comp/std/c/18426853.html among others for difference between these two.
-/*
-The following was the original 
-whitespacenl           	[\t\n ]+
-whitespace      	[\t ]+
-
-I changed it to
-whitespacenl           	[:space:]+
-whitespace      	[:blank:]+
-This does not work.
-
-What worked was the following:
-whitespacenl           	[[:space:]]+
-whitespace      	[[:blank:]]+
-
-*/
-
-/*
-I am not sure if the whitespacenl would count the number of newlines in code that has backslashes properly.
-*/
-#define NORMAL 1
-#define CXX_COMMENT 2
-#define C_COMMENT 3
-#define STRING_LIT 4
-#define MACRO 5
-#define C_COMMENT_INMACRO 6
-
-#line 1112 "../../../../testonly/src/frontend/SageIII/preproc.C"
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
-#else
-extern int yywrap YY_PROTO(( void ));
-#endif
-#endif
-
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
-#endif
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
-#endif
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
-#else
-static int input YY_PROTO(( void ));
-#endif
-#endif
-
-#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
-#endif
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
-#endif
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
-#endif
-
-#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
-#endif
-
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines.  This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
-#endif
-
-/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-	if ( yy_current_buffer->yy_is_interactive ) \
-		{ \
-		int c = '*', n; \
-		for ( n = 0; n < max_size && \
-			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
-			buf[n] = (char) c; \
-		if ( c == '\n' ) \
-			buf[n++] = (char) c; \
-		if ( c == EOF && ferror( yyin ) ) \
-			YY_FATAL_ERROR( "input in flex scanner failed" ); \
-		result = n; \
-		} \
-	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
-		  && ferror( yyin ) ) \
-		YY_FATAL_ERROR( "input in flex scanner failed" );
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL int yylex YY_PROTO(( void ))
-#endif
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
-	if ( yyleng > 0 ) \
-		yy_current_buffer->yy_at_bol = \
-				(yytext[yyleng - 1] == '\n'); \
-	YY_USER_ACTION
-
-YY_DECL
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp = NULL, *yy_bp = NULL;
-	register int yy_act;
-
-#line 635 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-
-
-int preproc_line_num = 1;
-	/*bad way to initialize*/
-int preproc_start_line_num = preproc_line_num;
-int preproc_column_num = 1;
-int preproc_start_column_num = preproc_column_num;
-			/*Do we need this  ???*/
-BEGIN NORMAL;
-
-#line 1277 "../../../../testonly/src/frontend/SageIII/preproc.C"
-
-	if ( yy_init )
-		{
-		yy_init = 0;
-
-#ifdef YY_USER_INIT
-		YY_USER_INIT;
-#endif
-
-		if ( ! yy_start )
-			yy_start = 1;	/* first start state */
-
-		if ( ! yyin )
-			yyin = stdin;
-
-		if ( ! yyout )
-			yyout = stdout;
-
-		if ( ! yy_current_buffer )
-			yy_current_buffer =
-				yy_create_buffer( yyin, YY_BUF_SIZE );
-
-		yy_load_buffer_state();
-		}
-
-	while ( 1 )		/* loops until end-of-file is reached */
-		{
-		yy_cp = yy_c_buf_p;
-
-		/* Support of yytext. */
-		*yy_cp = yy_hold_char;
-
-		/* yy_bp points to the position in yy_ch_buf of the start of
-		 * the current run.
-		 */
-		yy_bp = yy_cp;
-
-		yy_current_state = yy_start;
-		yy_current_state += YY_AT_BOL();
-yy_match:
-		do
-			{
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
-			if ( yy_accept[yy_current_state] )
-				{
-				yy_last_accepting_state = yy_current_state;
-				yy_last_accepting_cpos = yy_cp;
-				}
-			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-				{
-				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 143 )
-					yy_c = yy_meta[(unsigned int) yy_c];
-				}
-			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-			++yy_cp;
-			}
-		while ( yy_base[yy_current_state] != 186 );
-
-yy_find_action:
-		yy_act = yy_accept[yy_current_state];
-		if ( yy_act == 0 )
-			{ /* have to back up */
-			yy_cp = yy_last_accepting_cpos;
-			yy_current_state = yy_last_accepting_state;
-			yy_act = yy_accept[yy_current_state];
-			}
-
-		YY_DO_BEFORE_ACTION;
-
-
-do_action:	/* This label is used only to access EOF actions. */
-
-
-		switch ( yy_act )
-	{ /* beginning of action switch */
-			case 0: /* must back up */
-			/* undo the effects of YY_DO_BEFORE_ACTION */
-			*yy_cp = yy_hold_char;
-			yy_cp = yy_last_accepting_cpos;
-			yy_current_state = yy_last_accepting_state;
-			goto yy_find_action;
-
-case 1:
-YY_RULE_SETUP
-#line 645 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ 
-				    preprocessorList.addElement(PreprocessingInfo::ClinkageSpecificationStart, 
-					    yytext,globalFileName,preproc_line_num,preproc_column_num,0); 
-				    preproc_line_num+=num_of_newlines(yytext); 
-				    preproc_column_num+=strlen(yytext); 
-
-				    curr_brace_depth++; 
-				    pushbracestack(curr_brace_depth);
-                                }
-	YY_BREAK
-/*Handle the braces (left and right). Push and Pop the bracestack accordingly*/
-case 2:
-YY_RULE_SETUP
-#line 655 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ 
-		    if(!isemptystack()) 
-		    { 
-			/* we only count braces within a linkage specification. */ 
-			curr_brace_depth++; 
-		    } 
-		    //printf("Ram: found left brace at preproc_line_num = %d, preproc_column_num = %d\n", preproc_line_num, preproc_column_num);
-		    preproc_column_num++; 
-                }
-	YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 665 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ 
-		    if(!isemptystack()) 
-		    { 
-			if(curr_brace_depth==topcurlybracestack()) 
-			{ 
-			    popbracestack(); 
-			    preprocessorList.addElement(PreprocessingInfo::ClinkageSpecificationEnd, 
-							    yytext, globalFileName, preproc_line_num, preproc_column_num, 0); 
-			}
-			curr_brace_depth--; 
-		    } 
-		    //printf("Ram: found right brace at preproc_line_num = %d, preproc_column_num = %d\n", preproc_line_num, preproc_column_num);
-		    preproc_column_num++; 
-		}
-	YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 680 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ 
-		    /*if(!isemptystack()) 
-		    { 
-			//we only count braces within a linkage specification. 
-			curr_brace_depth++; 
-		    }
-                    */
-		    preproc_column_num++; 
-                }
-	YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 690 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ 
-		    /*
-		    if(!isemptystack()) 
-		    { 
-			if(curr_brace_depth==topcurlybracestack()) 
-			{ 
-			    popbracestack(); 
-			    preprocessorList.addElement(PreprocessingInfo::ClinkageSpecificationEnd, 
-							    yytext, globalFileName, preproc_line_num, preproc_column_num, 0); 
-			}
-			curr_brace_depth--; 
-		    } 
-		    */
-		    preproc_column_num++; 
-		}
-	YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 706 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{
-
-                                          token_element *p_tok_elem = new token_element;
-                                          p_tok_elem->token_lexeme = yytext;
-
-                                          int is_keyword = identify_if_C_CXX_keyword(yytext);
-                                          //found a keyword?
-                                          if(is_keyword != -1)
-                                          {   
-                                              //printf("%s is a keyword\n", yytext); 
-                                              p_tok_elem->token_id = is_keyword;
-                                          }
-                                          else
-                                          {   
-                                              //printf("%s is not a keyword\n", yytext); 
-                                              p_tok_elem->token_id = C_CXX_IDENTIFIER;
-                                          }
-
-                                          stream_element *p_se = new stream_element;
-                                          p_se->p_tok_elem = p_tok_elem;
-
-                                          /*
-                                          p_se->beginning_fpi.line_num = preproc_column_num;
-                                          p_se->beginning_fpi.column_num = preproc_column_num;
-                                          preproc_column_num+=strlen(yytext);
-                                          p_se->ending_fpi.line_num = preproc_line_num;
-                                          p_se->ending_fpi.column_num = preproc_column_num-1;
-                                          //push the element onto the token stream
-                                          */
-                                          ROSE_token_stream_pointer->push_back(p_se);
-                                    }
-	YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 737 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ 
-		}
-	YY_BREAK
-/*begin handling the C++ style comments. */
-case 8:
-YY_RULE_SETUP
-#line 740 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{
-		    /*Handle the C comments.*/ 
-		    preproc_start_line_num=preproc_line_num; 
-		    preproc_start_column_num=preproc_column_num; 
-		    preproc_column_num+=2; 
-		    commentString = yytext; 
-		    BEGIN CXX_COMMENT;
- 		}
-	YY_BREAK
-/*The normal mode actions. Handle the preprocessor stuff and anyother characters. */
-/*Do we need the backslash character?????????????*/
-case 9:
-YY_RULE_SETUP
-#line 751 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{
-		    preproc_start_line_num=preproc_line_num; 
-		    preproc_start_column_num=preproc_column_num; 
-		    preproc_column_num+=strlen(yytext);
-		    
-		    //copy the comment to commentString 
-		    commentString = yytext; 
-		    BEGIN C_COMMENT; 
-		}
-	YY_BREAK
-/*These are the alternative tokens. Refer to page 12 of C++ std to understand their representation*/
-/*<NORMAL>"<%"     {curr_token = ALT_LEFT_CURLY; do_yytext_bookeeping(); }
-<NORMAL>"<%"     { }
-                       */
-case 10:
-YY_RULE_SETUP
-#line 768 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ 
-		    /*
-		    if(!isemptystack()) 
-		    { 
-			//we only count braces within a linkage specification. 
-			curr_brace_depth++; 
-		    
-			*/
-		    preproc_column_num++; 
-                }
-	YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 780 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ macrotype=PreprocessingInfo::CpreprocessorIncludeDeclaration; HANDLEMACROSTART }
-	YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 781 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ macrotype=PreprocessingInfo::CpreprocessorDefineDeclaration; HANDLEMACROSTART }
-	YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 782 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ macrotype=PreprocessingInfo::CpreprocessorUndefDeclaration; HANDLEMACROSTART }
-	YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 783 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ macrotype=PreprocessingInfo::CpreprocessorLineDeclaration; HANDLEMACROSTART }
-	YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 784 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ macrotype=PreprocessingInfo::CpreprocessorErrorDeclaration; HANDLEMACROSTART }
-	YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 785 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ macrotype=PreprocessingInfo::CpreprocessorIfDeclaration; HANDLEMACROSTART }
-	YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 786 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ macrotype=PreprocessingInfo::CpreprocessorIfdefDeclaration; HANDLEMACROSTART }
-	YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 787 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ macrotype=PreprocessingInfo::CpreprocessorIfndefDeclaration; HANDLEMACROSTART }
-	YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 788 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ macrotype=PreprocessingInfo::CpreprocessorElifDeclaration; HANDLEMACROSTART }
-	YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 789 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ macrotype=PreprocessingInfo::CpreprocessorElseDeclaration; HANDLEMACROSTART }
-	YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 790 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ macrotype=PreprocessingInfo::CpreprocessorEndifDeclaration; HANDLEMACROSTART }
-	YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 791 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ macrotype=PreprocessingInfo::CpreprocessorWarningDeclaration; HANDLEMACROSTART }
-	YY_BREAK
-/*Add code here to attach the whitespace before newlines (and general lineprefix code) */
-case 23:
-YY_RULE_SETUP
-#line 793 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ preproc_line_num++; preproc_column_num=1; } 
-	YY_BREAK
-/*<NORMAL>{string}		{ / *???IS THIS RIGHT???* / preproc_line_num+=num_of_newlines(yytext); preproc_column_num+=strlen(yytext); }*/
-case 24:
-YY_RULE_SETUP
-#line 795 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ /*preproc_line_num+=num_of_newlines(yytext);*/ preproc_column_num+=strlen(yytext); BEGIN STRING_LIT;}
-	YY_BREAK
-/*<NORMAL>"\'"		        { preproc_line_num+=num_of_newlines(yytext); preproc_column_num+=strlen(yytext); BEGIN CHAR_LIT;}*/
-/*<NORMAL>"'"		        { preproc_line_num+=num_of_newlines(yytext); preproc_column_num+=strlen(yytext); BEGIN CHAR_LIT;}*/
-case 25:
-YY_RULE_SETUP
-#line 798 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ preproc_column_num++; }
-	YY_BREAK
-/*Actions for a string literal.*/
-case 26:
-YY_RULE_SETUP
-#line 800 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{/*eat anything that is not a newline or a backslash or a doublequote*/ preproc_column_num+=strlen(yytext); }
-	YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 801 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{/*if the backslash is followed by anything other than a newline or doublequote, eat them. */ preproc_column_num+=strlen(yytext); }
-	YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 802 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{/*if a backslash preceeds the doublequote, eat both.*/ preproc_column_num+=strlen(yytext); }
-	YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 803 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{/*if a backslash preceeds the newline, eat both, donot increment preproc_line_num.*/ preproc_column_num+=strlen(yytext); }
-	YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 804 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ /* if it is a doublequote, end the STRING_LIT state.*/ BEGIN NORMAL; }
-	YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 805 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ /* count the newlines */ preproc_line_num++; }
-	YY_BREAK
-/*Actions for a C++ style comment.*/
-case 32:
-YY_RULE_SETUP
-#line 807 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ /* eat anything that is not a backslash or a newline*/ commentString += yytext;}
-	YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 808 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ 
-			    /*eat up backslashes not immdediately followed by newlines*/ 
-			    commentString += yytext;
-			    /*fix the preproc_column_num at other places ????????????????????  ??????????????*/ 
-			    preproc_column_num=1; 
-			}
-	YY_BREAK
-case 34:
-YY_RULE_SETUP
-#line 815 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ 
-			    /*if backslash is followed by a newline, then eat them (backslash, newline) up, increment preproc_line_num and continue*/ 
-			    commentString += yytext;
-			    preproc_line_num++; 
-}
-	YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 820 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{
-			    preproc_line_num++; preproc_column_num=1; 
-			    commentString += yytext;
-			    preprocessorList.addElement(PreprocessingInfo::CplusplusStyleComment, 
-				    commentString,globalFileName, preproc_start_line_num, preproc_start_column_num,preproc_line_num-preproc_start_line_num); 
-
-			    BEGIN NORMAL; 
-			}
-	YY_BREAK
-/*Actions while in a C style comment.*/
-case 36:
-YY_RULE_SETUP
-#line 829 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{
-			    commentString += yytext;
-			    preproc_line_num++; 
-			    preproc_column_num=1; 
-			}
-	YY_BREAK
-case 37:
-YY_RULE_SETUP
-#line 834 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{
-			    commentString += yytext;
-			    preproc_column_num+=strlen(yytext); 
-			    /*printf("hello Ram: The comment string is ####%s#############. It is of %d lines, the current line number is %d\n",
-				    commentString.c_str(), preproc_line_num-preproc_start_line_num+1, preproc_line_num);
-				    */
-			    preprocessorList.addElement(PreprocessingInfo::C_StyleComment,commentString,globalFileName,preproc_start_line_num,preproc_start_column_num,preproc_line_num-preproc_start_line_num+1); 
-			    BEGIN(NORMAL); 
-			}
-	YY_BREAK
-case 38:
-YY_RULE_SETUP
-#line 843 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ 
-		    commentString += yytext;
-		    preproc_column_num++; 
-		}
-	YY_BREAK
-/*Actions while in a MACRO.*/
-case 39:
-YY_RULE_SETUP
-#line 849 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ 
-		    macroString += yytext;
-		    preproc_line_num++; 
-		    preproc_column_num=1;
-		}
-	YY_BREAK
-case 40:
-YY_RULE_SETUP
-#line 854 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{
-		    macroString += yytext;
-		    preproc_line_num++; 
-		    preproc_column_num=1; 
-		    
-		    preprocessorList.addElement(macrotype,macroString,globalFileName,preproc_start_line_num,preproc_start_column_num,preproc_line_num-preproc_start_line_num); 
-		    BEGIN NORMAL; 
-		}
-	YY_BREAK
-case 41:
-YY_RULE_SETUP
-#line 862 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{
-		    //does this cover all cases?????????
-		    preproc_column_num+=2; 
-		    macroString += yytext;
-
-		    /*
-				//Do we need to do something like this?
-		                commentString = yytext;
-		    */
-		    BEGIN C_COMMENT_INMACRO;
-		}
-	YY_BREAK
-case 42:
-YY_RULE_SETUP
-#line 873 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ 
-		    macroString += yytext;
-		    preproc_column_num++; 
-		}
-	YY_BREAK
-case 43:
-YY_RULE_SETUP
-#line 877 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ 
-				//??????????????????????????????????????????????????????????????
-				//This code copies the comment into the macrobuffer.
-				//Should we not copy it to comment buffer also?????
-				macroString += yytext;
-
-				/*
-				commentString += yytext;
-				//should we do something like this??
-				preprocessorList.addElement(PreprocessingInfo::C_StyleComment,commentString.c_str(),globalFileName,preproc_start_line_num,preproc_start_column_num,preproc_line_num-preproc_start_line_num); 
-				*/
-				preproc_column_num+=strlen(yytext); 
-				BEGIN MACRO; 
-			    }
-	YY_BREAK
-case 44:
-YY_RULE_SETUP
-#line 891 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ 
-				macroString += yytext;
-
-				//Do we need to do something like this?
-				//commentString += yytext;
-
-				preproc_line_num++; preproc_column_num=1; 
-			    }
-	YY_BREAK
-case 45:
-YY_RULE_SETUP
-#line 899 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-{ 
-				macroString += yytext;
-
-				//Do we need to do something like this?
-				//commentString += yytext;
-
-				preproc_column_num++; 
-			    }
-	YY_BREAK
-case 46:
-YY_RULE_SETUP
-#line 907 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-ECHO;
-	YY_BREAK
-#line 1795 "../../../../testonly/src/frontend/SageIII/preproc.C"
-case YY_STATE_EOF(INITIAL):
-case YY_STATE_EOF(NORMAL):
-case YY_STATE_EOF(CXX_COMMENT):
-case YY_STATE_EOF(C_COMMENT):
-case YY_STATE_EOF(STRING_LIT):
-case YY_STATE_EOF(MACRO):
-case YY_STATE_EOF(C_COMMENT_INMACRO):
-	yyterminate();
-
-	case YY_END_OF_BUFFER:
-		{
-		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
-
-		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = yy_hold_char;
-		YY_RESTORE_YY_MORE_OFFSET
-
-		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
-			{
-			/* We're scanning a new file or input source.  It's
-			 * possible that this happened because the user
-			 * just pointed yyin at a new source and called
-			 * yylex().  If so, then we have to assure
-			 * consistency between yy_current_buffer and our
-			 * globals.  Here is the right place to do so, because
-			 * this is the first action (other than possibly a
-			 * back-up) that will match for the new input source.
-			 */
-			yy_n_chars = yy_current_buffer->yy_n_chars;
-			yy_current_buffer->yy_input_file = yyin;
-			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
-			}
-
-		/* Note that here we test for yy_c_buf_p "<=" to the position
-		 * of the first EOB in the buffer, since yy_c_buf_p will
-		 * already have been incremented past the NUL character
-		 * (since all states make transitions on EOB to the
-		 * end-of-buffer state).  Contrast this with the test
-		 * in input().
-		 */
-		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			{ /* This was really a NUL. */
-			yy_state_type yy_next_state;
-
-			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
-
-			yy_current_state = yy_get_previous_state();
-
-			/* Okay, we're now positioned to make the NUL
-			 * transition.  We couldn't have
-			 * yy_get_previous_state() go ahead and do it
-			 * for us because it doesn't know how to deal
-			 * with the possibility of jamming (and we don't
-			 * want to build jamming into it because then it
-			 * will run more slowly).
-			 */
-
-			yy_next_state = yy_try_NUL_trans( yy_current_state );
-
-			yy_bp = yytext_ptr + YY_MORE_ADJ;
-
-			if ( yy_next_state )
-				{
-				/* Consume the NUL. */
-				yy_cp = ++yy_c_buf_p;
-				yy_current_state = yy_next_state;
-				goto yy_match;
-				}
-
-			else
-				{
-				yy_cp = yy_c_buf_p;
-				goto yy_find_action;
-				}
-			}
-
-		else switch ( yy_get_next_buffer() )
-			{
-			case EOB_ACT_END_OF_FILE:
-				{
-				yy_did_buffer_switch_on_eof = 0;
-
-				if ( yywrap() )
-					{
-					/* Note: because we've taken care in
-					 * yy_get_next_buffer() to have set up
-					 * yytext, we can now set up
-					 * yy_c_buf_p so that if some total
-					 * hoser (like flex itself) wants to
-					 * call the scanner after we return the
-					 * YY_NULL, it'll still work - another
-					 * YY_NULL will get returned.
-					 */
-					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
-
-					yy_act = YY_STATE_EOF(YY_START);
-					goto do_action;
-					}
-
-				else
-					{
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-					}
-				break;
-				}
-
-			case EOB_ACT_CONTINUE_SCAN:
-				yy_c_buf_p =
-					yytext_ptr + yy_amount_of_matched_text;
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_match;
-
-			case EOB_ACT_LAST_MATCH:
-				yy_c_buf_p =
-				&yy_current_buffer->yy_ch_buf[yy_n_chars];
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_find_action;
-			}
-		break;
-		}
-
-	default:
-		YY_FATAL_ERROR(
-			"fatal flex scanner internal error--no action found" );
-	} /* end of action switch */
-		} /* end of scanning one token */
-	} /* end of yylex */
-
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- *	EOB_ACT_LAST_MATCH -
- *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- *	EOB_ACT_END_OF_FILE - end of file
- */
-
-static int yy_get_next_buffer()
-	{
-	register char *dest = yy_current_buffer->yy_ch_buf;
-	register char *source = yytext_ptr;
-	register int number_to_move, i;
-	int ret_val;
-
-	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
-		YY_FATAL_ERROR(
-		"fatal flex scanner internal error--end of buffer missed" );
-
-	if ( yy_current_buffer->yy_fill_buffer == 0 )
-		{ /* Don't try to fill the buffer, so this is an EOF. */
-		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
-			{
-			/* We matched a single character, the EOB, so
-			 * treat this as a final EOF.
-			 */
-			return EOB_ACT_END_OF_FILE;
-			}
-
-		else
-			{
-			/* We matched some text prior to the EOB, first
-			 * process it.
-			 */
-			return EOB_ACT_LAST_MATCH;
-			}
-		}
-
-	/* Try to read more data. */
-
-	/* First move last chars to start of buffer. */
-	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
-
-	for ( i = 0; i < number_to_move; ++i )
-		*(dest++) = *(source++);
-
-	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
-		/* don't do the read, it's not guaranteed to return an EOF,
-		 * just force an EOF
-		 */
-		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
-
-	else
-		{
-		int num_to_read =
-			yy_current_buffer->yy_buf_size - number_to_move - 1;
-
-		while ( num_to_read <= 0 )
-			{ /* Not enough room in the buffer - grow it. */
-#ifdef YY_USES_REJECT
-			YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
-
-			/* just a shorter name for the current buffer */
-			YY_BUFFER_STATE b = yy_current_buffer;
-
-			int yy_c_buf_p_offset =
-				(int) (yy_c_buf_p - b->yy_ch_buf);
-
-			if ( b->yy_is_our_buffer )
-				{
-				int new_size = b->yy_buf_size * 2;
-
-				if ( new_size <= 0 )
-					b->yy_buf_size += b->yy_buf_size / 8;
-				else
-					b->yy_buf_size *= 2;
-
-				b->yy_ch_buf = (char *)
-					/* Include room in for 2 EOB chars. */
-					yy_flex_realloc( (void *) b->yy_ch_buf,
-							 b->yy_buf_size + 2 );
-				}
-			else
-				/* Can't grow it, we don't own it. */
-				b->yy_ch_buf = 0;
-
-			if ( ! b->yy_ch_buf )
-				YY_FATAL_ERROR(
-				"fatal error - scanner input buffer overflow" );
-
-			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
-			num_to_read = yy_current_buffer->yy_buf_size -
-						number_to_move - 1;
-#endif
-			}
-
-		if ( num_to_read > YY_READ_BUF_SIZE )
-			num_to_read = YY_READ_BUF_SIZE;
-
-		/* Read in more data. */
-		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
-			yy_n_chars, num_to_read );
-
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	if ( yy_n_chars == 0 )
-		{
-		if ( number_to_move == YY_MORE_ADJ )
-			{
-			ret_val = EOB_ACT_END_OF_FILE;
-			yyrestart( yyin );
-			}
-
-		else
-			{
-			ret_val = EOB_ACT_LAST_MATCH;
-			yy_current_buffer->yy_buffer_status =
-				YY_BUFFER_EOF_PENDING;
-			}
-		}
-
-	else
-		ret_val = EOB_ACT_CONTINUE_SCAN;
-
-	yy_n_chars += number_to_move;
-	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
-	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
-	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
-
-	return ret_val;
-	}
-
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-static yy_state_type yy_get_previous_state()
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp;
-
-	yy_current_state = yy_start;
-	yy_current_state += YY_AT_BOL();
-
-	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
-		{
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
-		if ( yy_accept[yy_current_state] )
-			{
-			yy_last_accepting_state = yy_current_state;
-			yy_last_accepting_cpos = yy_cp;
-			}
-		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-			{
-			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 143 )
-				yy_c = yy_meta[(unsigned int) yy_c];
-			}
-		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-		}
-
-	return yy_current_state;
-	}
-
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- *	next_state = yy_try_NUL_trans( current_state );
- */
-
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
-#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
-yy_state_type yy_current_state;
-#endif
-	{
-	register int yy_is_jam;
-	register char *yy_cp = yy_c_buf_p;
-
-	register YY_CHAR yy_c = 1;
-	if ( yy_accept[yy_current_state] )
-		{
-		yy_last_accepting_state = yy_current_state;
-		yy_last_accepting_cpos = yy_cp;
-		}
-	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-		{
-		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 143 )
-			yy_c = yy_meta[(unsigned int) yy_c];
-		}
-	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 142);
-
-	return yy_is_jam ? 0 : yy_current_state;
-	}
-
-
-#ifndef YY_NO_UNPUT
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-register char *yy_bp;
-#endif
-	{
-	register char *yy_cp = yy_c_buf_p;
-
-	/* undo effects of setting up yytext */
-	*yy_cp = yy_hold_char;
-
-	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-		{ /* need to shift things up to make room */
-		/* +2 for EOB chars. */
-		register int number_to_move = yy_n_chars + 2;
-		register char *dest = &yy_current_buffer->yy_ch_buf[
-					yy_current_buffer->yy_buf_size + 2];
-		register char *source =
-				&yy_current_buffer->yy_ch_buf[number_to_move];
-
-		while ( source > yy_current_buffer->yy_ch_buf )
-			*--dest = *--source;
-
-		yy_cp += (int) (dest - source);
-		yy_bp += (int) (dest - source);
-		yy_current_buffer->yy_n_chars =
-			yy_n_chars = yy_current_buffer->yy_buf_size;
-
-		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-			YY_FATAL_ERROR( "flex scanner push-back overflow" );
-		}
-
-	*--yy_cp = (char) c;
-
-
-	yytext_ptr = yy_bp;
-	yy_hold_char = *yy_cp;
-	yy_c_buf_p = yy_cp;
-	}
-#endif	/* ifndef YY_NO_UNPUT */
-
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput()
-#else
-static int input()
-#endif
-	{
-	int c;
-
-	*yy_c_buf_p = yy_hold_char;
-
-	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
-		{
-		/* yy_c_buf_p now points to the character we want to return.
-		 * If this occurs *before* the EOB characters, then it's a
-		 * valid NUL; if not, then we've hit the end of the buffer.
-		 */
-		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			/* This was really a NUL. */
-			*yy_c_buf_p = '\0';
-
-		else
-			{ /* need more input */
-			int offset = yy_c_buf_p - yytext_ptr;
-			++yy_c_buf_p;
-
-			switch ( yy_get_next_buffer() )
-				{
-				case EOB_ACT_LAST_MATCH:
-					/* This happens because yy_g_n_b()
-					 * sees that we've accumulated a
-					 * token and flags that we need to
-					 * try matching the token before
-					 * proceeding.  But for input(),
-					 * there's no matching to consider.
-					 * So convert the EOB_ACT_LAST_MATCH
-					 * to EOB_ACT_END_OF_FILE.
-					 */
-
-					/* Reset buffer status. */
-					yyrestart( yyin );
-
-					/* fall through */
-
-				case EOB_ACT_END_OF_FILE:
-					{
-					if ( yywrap() )
-						return EOF;
-
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-#ifdef __cplusplus
-					return yyinput();
-#else
-					return input();
-#endif
-					}
-
-				case EOB_ACT_CONTINUE_SCAN:
-					yy_c_buf_p = yytext_ptr + offset;
-					break;
-				}
-			}
-		}
-
-	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
-	*yy_c_buf_p = '\0';	/* preserve yytext */
-	yy_hold_char = *++yy_c_buf_p;
-
-	yy_current_buffer->yy_at_bol = (c == '\n');
-
-	return c;
-	}
-#endif /* YY_NO_INPUT */
-
-#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
-#else
-void yyrestart( input_file )
-FILE *input_file;
-#endif
-	{
-	if ( ! yy_current_buffer )
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
-
-	yy_init_buffer( yy_current_buffer, input_file );
-	yy_load_buffer_state();
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-#else
-void yy_switch_to_buffer( new_buffer )
-YY_BUFFER_STATE new_buffer;
-#endif
-	{
-	if ( yy_current_buffer == new_buffer )
-		return;
-
-	if ( yy_current_buffer )
-		{
-		/* Flush out information for old buffer. */
-		*yy_c_buf_p = yy_hold_char;
-		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	yy_current_buffer = new_buffer;
-	yy_load_buffer_state();
-
-	/* We don't actually know whether we did this switch during
-	 * EOF (yywrap()) processing, but the only time this flag
-	 * is looked at is after yywrap() is called, so it's safe
-	 * to go ahead and always set it.
-	 */
-	yy_did_buffer_switch_on_eof = 1;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
-#else
-void yy_load_buffer_state()
-#endif
-	{
-	yy_n_chars = yy_current_buffer->yy_n_chars;
-	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
-	yyin = yy_current_buffer->yy_input_file;
-	yy_hold_char = *yy_c_buf_p;
-	}
-
-
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
-#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
-	{
-	YY_BUFFER_STATE b;
-
-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_buf_size = size;
-
-	/* yy_ch_buf has to be 2 characters longer than the size given because
-	 * we need to put in 2 end-of-buffer characters.
-	 */
-	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
-	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_is_our_buffer = 1;
-
-	yy_init_buffer( b, file );
-
-	return b;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-	{
-	if ( ! b )
-		return;
-
-	if ( b == yy_current_buffer )
-		yy_current_buffer = (YY_BUFFER_STATE) 0;
-
-	if ( b->yy_is_our_buffer )
-		yy_flex_free( (void *) b->yy_ch_buf );
-
-	yy_flex_free( (void *) b );
-	}
-
-
-
-#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
-#else
-void yy_init_buffer( b, file )
-YY_BUFFER_STATE b;
-FILE *file;
-#endif
-
-
-	{
-	yy_flush_buffer( b );
-
-	b->yy_input_file = file;
-	b->yy_fill_buffer = 1;
-
-#if YY_ALWAYS_INTERACTIVE
-	b->yy_is_interactive = 1;
-#else
-#if YY_NEVER_INTERACTIVE
-	b->yy_is_interactive = 0;
-#else
-	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-#endif
-#endif
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
-#else
-void yy_flush_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-
-	{
-	if ( ! b )
-		return;
-
-	b->yy_n_chars = 0;
-
-	/* We always need two end-of-buffer characters.  The first causes
-	 * a transition to the end-of-buffer state.  The second causes
-	 * a jam in that state.
-	 */
-	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
-	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
-	b->yy_buf_pos = &b->yy_ch_buf[0];
-
-	b->yy_at_bol = 1;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	if ( b == yy_current_buffer )
-		yy_load_buffer_state();
-	}
-
-
-#ifndef YY_NO_SCAN_BUFFER
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
-#else
-YY_BUFFER_STATE yy_scan_buffer( base, size )
-char *base;
-yy_size_t size;
-#endif
-	{
-	YY_BUFFER_STATE b;
-
-	if ( size < 2 ||
-	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
-	     base[size-1] != YY_END_OF_BUFFER_CHAR )
-		/* They forgot to leave room for the EOB's. */
-		return 0;
-
-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
-
-	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
-	b->yy_buf_pos = b->yy_ch_buf = base;
-	b->yy_is_our_buffer = 0;
-	b->yy_input_file = 0;
-	b->yy_n_chars = b->yy_buf_size;
-	b->yy_is_interactive = 0;
-	b->yy_at_bol = 1;
-	b->yy_fill_buffer = 0;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	yy_switch_to_buffer( b );
-
-	return b;
-	}
-#endif
-
-
-#ifndef YY_NO_SCAN_STRING
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
-#else
-YY_BUFFER_STATE yy_scan_string( yy_str )
-yyconst char *yy_str;
-#endif
-	{
-	int len;
-	for ( len = 0; yy_str[len]; ++len )
-		;
-
-	return yy_scan_bytes( yy_str, len );
-	}
-#endif
-
-
-#ifndef YY_NO_SCAN_BYTES
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
-#else
-YY_BUFFER_STATE yy_scan_bytes( bytes, len )
-yyconst char *bytes;
-int len;
-#endif
-	{
-	YY_BUFFER_STATE b;
-	char *buf;
-	yy_size_t n;
-	int i;
-
-	/* Get memory for full buffer, including space for trailing EOB's. */
-	n = len + 2;
-	buf = (char *) yy_flex_alloc( n );
-	if ( ! buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
-
-	for ( i = 0; i < len; ++i )
-		buf[i] = bytes[i];
-
-	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
-
-	b = yy_scan_buffer( buf, n );
-	if ( ! b )
-		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
-
-	/* It's okay to grow etc. this buffer, and we should throw it
-	 * away when we're done.
-	 */
-	b->yy_is_our_buffer = 1;
-
-	return b;
-	}
-#endif
-
-
-#ifndef YY_NO_PUSH_STATE
-#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
-#else
-static void yy_push_state( new_state )
-int new_state;
-#endif
-	{
-	if ( yy_start_stack_ptr >= yy_start_stack_depth )
-		{
-		yy_size_t new_size;
-
-		yy_start_stack_depth += YY_START_STACK_INCR;
-		new_size = yy_start_stack_depth * sizeof( int );
-
-		if ( ! yy_start_stack )
-			yy_start_stack = (int *) yy_flex_alloc( new_size );
-
-		else
-			yy_start_stack = (int *) yy_flex_realloc(
-					(void *) yy_start_stack, new_size );
-
-		if ( ! yy_start_stack )
-			YY_FATAL_ERROR(
-			"out of memory expanding start-condition stack" );
-		}
-
-	yy_start_stack[yy_start_stack_ptr++] = YY_START;
-
-	BEGIN(new_state);
-	}
-#endif
-
-
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state()
-	{
-	if ( --yy_start_stack_ptr < 0 )
-		YY_FATAL_ERROR( "start-condition stack underflow" );
-
-	BEGIN(yy_start_stack[yy_start_stack_ptr]);
-	}
-#endif
-
-
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
-	{
-	return yy_start_stack[yy_start_stack_ptr - 1];
-	}
-#endif
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
-#else
-static void yy_fatal_error( msg )
-char msg[];
-#endif
-	{
-	(void) fprintf( stderr, "%s\n", msg );
-	exit( YY_EXIT_FAILURE );
-	}
-
-
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		yytext[yyleng] = yy_hold_char; \
-		yy_c_buf_p = yytext + n; \
-		yy_hold_char = *yy_c_buf_p; \
-		*yy_c_buf_p = '\0'; \
-		yyleng = n; \
-		} \
-	while ( 0 )
-
-
-/* Internal utility routines. */
-
-#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-yyconst char *s2;
-int n;
-#endif
-	{
-	register int i;
-	for ( i = 0; i < n; ++i )
-		s1[i] = s2[i];
-	}
-#endif
-
-#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
-	{
-	register int n;
-	for ( n = 0; s[n]; ++n )
-		;
-
-	return n;
-	}
-#endif
-
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
-#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
-#endif
-	{
-	return (void *) malloc( size );
-	}
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
-#endif
-	{
-	/* The cast to (char *) in the following accommodates both
-	 * implementations that use char* generic pointers, and those
-	 * that use void* generic pointers.  It works with the latter
-	 * because both ANSI C and C++ allow castless assignment from
-	 * any pointer type to void*, and deal with argument conversions
-	 * as though doing an assignment.
-	 */
-	return (void *) realloc( (char *) ptr, size );
-	}
-
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
-	{
-	free( ptr );
-	}
-
-#if YY_MAIN
-int main()
-	{
-	yylex();
-	return 0;
-	}
-#endif
-#line 907 "../../../../testonly/src/frontend/SageIII/preproc.lex"
-
-
-const int maxstacksize=500;
-int bracestack[maxstacksize];
-
-int top=0;
-void pushbracestack(int brace_no) { bracestack[top++]=brace_no; }
-int topcurlybracestack() { if(top) return bracestack[top-1]; else return -1; }
-int popbracestack() { return bracestack[--top]; }
-bool isemptystack() { return top==0; }
-
-int num_of_newlines(char* s)
-{
-     int num = 0;
-     while(*s != '\0')
-        {
-          if(*s == '\n')
-               num++;
-          s++;
-        }
-     return num;
-}
-
-// DQ (3/30/2006): Modified to use C++ style string instead of C style char* string
-// ROSEAttributesList *getPreprocessorDirectives( char *fileName)
-//! This function extracts the comments and CPP preprocessor control directives from the input file.
-// ROSEAttributesList *getPreprocessorDirectives( std::string fileName )
-// ROSEAttributesList *getPreprocessorDirectives( std::string fileName, LexTokenStreamTypePointer & input_token_stream_pointer )
-ROSEAttributesList *getPreprocessorDirectives( std::string fileName )
-   {
-     FILE *fp = NULL;
-     ROSEAttributesList *preprocessorInfoList = new ROSEAttributesList; // create a new list
-     ROSE_ASSERT (preprocessorInfoList != NULL);
-
-  // printf ("Inside of lex file: getPreprocessorDirectives() \n");
-  // ROSE_ASSERT(false);
-
-  // assert(input_token_stream_pointer == NULL);
-     ROSE_token_stream_pointer = new LexTokenStreamType;
-     assert(ROSE_token_stream_pointer != NULL);
-
-  // Share a pointer to the same LexTokenStreamType just allocated
-  // input_token_stream_pointer = ROSE_token_stream_pointer;
-  // assert(input_token_stream_pointer != NULL);
-
-  // Attach the token stream to the ROSEAttributesList being returned.
-     preprocessorInfoList->set_rawTokenStream(ROSE_token_stream_pointer);
-
-  // Set the global filename to be used in the PreprocessingInfo constructor.
-     globalFileName = fileName;
-
-     if ( fileName.empty() == false )
-        {
-	  std::map<std::string,std::vector<PreprocessingInfo*>* >::iterator iItr= 
-		  mapFilenameToAttributes.find(fileName);
-	  //std::cout << "Trying to find fileName " << fileName << std::endl;
-          if ( iItr != mapFilenameToAttributes.end())
-             {
-                     //std::cout << "Found requested file: " << fileName << " size: " << iItr->second->size() << std::endl; 
-	       for(std::vector<PreprocessingInfo*>::iterator jItr = iItr->second->begin(); 
-			       jItr != iItr->second->end(); ++jItr){
-		     //std::cout << "Inserting element" <<  (*jItr)->getString() << std::endl;
-                     preprocessorInfoList->insertElement(**jItr);
-
-	       }
-
-             }
-          else{
-            fp = fopen( fileName.c_str(), "r");
-            if (fp)
-            {
-              yyin = fp;
-              yylex();
-
-              // Writes all gathered information to stdout
-              // preprocessorList.display("TEST Collection of Comments and CPP Directives");
-
-              // bugfix (9/29/2001)
-              // The semantics required here is to move the elements accumulated into the
-              // preprocessorList into the preprocessorInfoList and delete them from the
-              // preprocessorList (which will be used again to accumulate PreprocessingInfo objects
-              // when the next file is processed).  We have to be able to process several files using
-              // this getPreprocessorDirectives() function.
-              preprocessorInfoList->moveElements( preprocessorList ); // create a copy that we can pass on
-
-              // The accumulator list should now be empty
-              assert (preprocessorList.getLength() == 0);
-              fclose(fp);  
-            }
-            else
-            {
-              // DQ (5/14/2006): Added error checking for collection of comments and CPP directives.
-              printf ("Error: can't find the requested file (%s) \n",fileName.c_str());
-              // ROSE_ASSERT(false);
-            }
-          }
-
-        }
-
-  // printf ("In getPreprocessorDirectives(fileName = %s): preprocessorInfoList->size() = %d \n",fileName.c_str(),(int)preprocessorInfoList->size());
-
-     return preprocessorInfoList;
-   }

Deleted: branches/testonly/src/frontend/SageIII/preproc.lex
===================================================================
--- branches/testonly/src/frontend/SageIII/preproc.lex	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/preproc.lex	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,1009 +0,0 @@
-%option noyywrap
-%{
-/* 
-    preproc.lex: This lexer currently recognizes C style comments, C++ style 
-    comments, preprocessor directives, and c/c++ linkage specifications.  
-    line/column/text information for each recognized directive is stored in 
-    ROSEAttributesList.  This information is used by the unparser.
-*/
-
-/*
--------------------------------------------------------------------------------------
-Originally written and modified by Markus Schordan and Dan Quinlan.
-(see ChangeLog).
-
-08-05-2006: Rewritten significantly by Ramakrishna Upadrasta.
-Reason: For supporting additional features and bug-fixing (see summary below).
-Note: The old preproc.lex is available in the same directory as preproc.original.lex
-------------------------------------------------------------------------------------
-*/
-//Ramakrishna Upadrasta
-//01-12-07: This is only version 0 of this file
-
-
-/*
-Summary of the changes:
-=========================================================================================
-    The regular expressions (and the action code) for C++ comments and 
-    C style comments has been cleaned up and are (hopefully:) upto the standard.
-=========================================================================================
-    Naming of variables: 
-	changed the lex variable names (states/start conditions) so that 
-	    CXX_COMMENT to corresponds to C++ style comments (beginning with //) and 
-	    C_COMMENT to correspond to C-style comments (enclosed by / * and * / ).
-	Earlier they were
-	    C_COMMENT corresponded to C++ style comments
-	    CPP_COMMENT corresponded to C-style comments.
-	It was felt that the names were confusing.
-	The other choice was to name the C-style comments as C_COMMENT and C++ style 
-	comments as CPP_COMMENT as in Wave. That was also found to be confusing, as CPP usually 
-	means C Pre Processor). The new terminology is (partly) taken from makefiles which 
-	allows 3 types of flags (C_FLAGS/CPP_FLAGS/CXX_FLAGS).
-
-=========================================================================================
-	Use STL types for instead of fixed size buffers for the following data structures
-	commentString, macroString and bracestack.  (earlier they were 
-		char commentString[10000000] for comments 
-		char macroString[10000000] for macro strings
-		and char bracestack[500] for matching of braces)
-=========================================================================================
-    Exact Position information for literals
-	The previous method to get the position information from EDG is incorrect in 
-	most of the cases. A second scan (like this lexer does) of the input was thought 
-	to be necessary to attach additional info.
-=========================================================================================
-    Support for char literals
-	including the '\e' '\U' which would be part of 2008 standard
-	refer to ???? for details
-=========================================================================================
-    Semi colons
-	We have to ensure that semi colons for that donot actually end 
-	statements are taken care of carefully.
-	class A {
-	f(); <-- this semi colon should be taken care of carefully.
-	}
-=========================================================================================
-    Double colons (::'s)
-        They can only occur in  .........
-	we identify them with 
-=========================================================================================
-trigraphs
-    
-=========================================================================================
-    backslashes followed by newlines
-	Either inside or outside of comments
-=========================================================================================
-    Whitespace info:
-	The 
-
-=========================================================================================
-    Line number information:
-	A better line count
-
-=========================================================================================
-    Trigraphs/Digraphs
-=========================================================================================
-    Proper identification and matching of different varieties of brackets
-	Parenthesis ()
-	Curly braces {}: The support for this existed earlier
-	Square brackets []
-=========================================================================================
-    Support for keywords
-	C++
-	C
-	C99
-	C++Ox 
-	    Ones only in 
-=========================================================================================
-    To be done in CHAR literals
-	wierd char literals
-	testing for octal and hex char literals
-	testing for backslashes in char literals.
-    To be done in INT literals
-	testing for 
-=========================================================================================
-    Limitations/open questions: 
-	This lexer does not handle lots of important cases, like 
-		character literals etc.  
-		Trigraph sequences, alternative tokens (lex.trigraph and lex.digraph of the standard).  
-		hexadecimal floating point literals and similar arcane stuff 
-			(HOW DOES EDG handle them? How does Wave handle them?)
-    The user should probably use the wave workaround (does it support these?????), if she needs such things.
-=========================================================================================
-    Use of standard variable names like ([:space:] and [:blank:]) that come with FLEX. 
-    Read the flex http://www.gnu.org/software/flex/manual/ for details. They work like C functions
-    isspace and isblank respectively.
-=========================================================================================
-=========================================================================================
-    A ROSE-sequence point in the original program is a position in the input program where 
-    synchronization of the AST happens with the input program. For now, the sequence points
-    are specific lexical tokens in the input program. In specific, they are 
-	parenthesis: () 
-	curly braces: {} 
-	semi colons: ;
-	new lines: \n
-    The possible are contenders for being sequence points
-	keywords???
-
-
-    Sequence points of the program so that exact code generation is done
-	If the code is not transformed? we synchronize the code generation
-	If the code is transformed, we synchronize the code generation immediately after the next sequence point.
-
-    An extension to the above token/character based sequence-points is to use parsing-constructs in the
-    the grammar of the source language, like
-	end of statement-sequence
-	end of function/class/namespace definition
-=========================================================================================
-    ellipsis????
-
-=========================================================================================
-=========================================================================================
-=========================================================================================
-Notes about coding style:
-    There is a unsaid tradition of separating the patterns and the actions in LEX files by tabs.
-    I am using that, though Dan prefers that whitespace be used for indentation.
-*/
-
-/*
-Test cases these (atleast fix) and effect:
-    test2005_170.C about the buffer size of (C and C++ style) comments.
-    test2001_18.C (and its related files: test2001_18A.h and test2001_18B.h): which is about the includes having code segments??????????????
-    test2006_15.C: which is about the handling of the character literals.  
-    test2005_184.C: which is about handling of backslashes at the end of C++ style comments
--------------------
-    test2005_131.C
-The ones that have singlequotes in a IF(0) and were earlier preprocessed silently, but are being flagged (incorrectly??) because we identify character literrals
-Cxx tests
-    test2004_154.C
-    test2005_178.C
-    test2005_191.C
-    test2005_194.C
-    test2005_196.C
-    test2005_198.C
-    test2005_199.C
-    test2006_16.C
-    test2006_17.C
-    test2006_18.C
-    test2006_26.C
--------------------------------------------------
-write test cases so that 
-    comments and preprocssor stuff etc.
-    
-*/
-/*
-       CHANGE LINES LIKE THIS TO ACCEPT std::string instead of char*, which makes us give it a c_str
-		    preprocessorList.addElement(macrotype,macroString_str.c_str(),globalFileName,preproc_start_line_num,preproc_start_column_num,preproc_line_num-preproc_start_line_num); 
-*/
-
-
-#include <iostream>
-#include <stdio.h>
-#include <ctype.h>
-#include <string>
-#include <string.h>
-#include <list>
-
-/* DQ (1/21/2008): This now has a single definition in the header file: ROSE/src/frontend/SageIII/general_defs.h */
-#include "general_token_defs.h"
-
-
-#if 0
-// DQ (1/21/2008): This definition is now redundent with what is in general_token_defs.h
-struct token_element
-{
-    std::string token_lexeme;
-    int token_id;
-};
-#endif
-
-#if 0
-// These are now defined in general_defs.h
-//Ideally this should inherit from Sg_File_Info
-//But for now, this will work
-struct file_pos_info
-{
-    int line_num;
-    int column_num;
-};
-
-struct stream_element
-{ 
-    struct token_element * p_tok_elem;
-    struct file_pos_info beginning_fpi;
-    struct file_pos_info ending_fpi;
-};
-#endif
-
-
-using namespace std;
-
-// list <stream_element*> ROSE_token_stream;
-// typedef list <stream_element*>:: iterator SE_ITR;
-LexTokenStreamTypePointer ROSE_token_stream_pointer = NULL;
-typedef LexTokenStreamType::iterator SE_ITR;
-
-struct file_pos_info curr_beginning;
-
-
-//Rama
-//#ifdef ROSE_TOKEN_IDENTIFIERS_H
-//#define ROSE_TOKEN_IDENTIFIERS_H
-
-//These would be used in the file INFO
-//File info
-namespace ROSE_token_ids
-{
-    //whitespace token IDs
-    enum whitespace{ 
-	T_NOTKNOWN,
-	//The following are non UNIX whitespace
-    };
-
-#if 0
-    //I brazenly copied from the interface of WAVE for these enums
-    enum ROSE_C_CXX_keywords
-    {
-        ROSE_ASM /* WAVE equivalent is T_ASM */
-        ROSE_AUTO /* WAVE equivalent is T_AUTO */
-        ROSE_BOOL /* WAVE equivalent is T_BOOL */
-        ROSE_BREAK /* WAVE equivalent is T_BREAK */
-        ROSE_CASE /* WAVE equivalent is T_CASE */
-        ROSE_CATCH /* WAVE equivalent is T_CATCH */
-        ROSE_CHAR /* WAVE equivalent is T_CHAR */
-        ROSE_CLASS /* WAVE equivalent is T_CLASS */
-        ROSE_CONST /* WAVE equivalent is T_CONST */
-        ROSE_CONSTCAST /* WAVE equivalent is T_CONSTCAST */
-        ROSE_CONTINUE /* WAVE equivalent is T_CONTINUE */
-        ROSE_DEFAULT /* WAVE equivalent is T_DEFAULT */
-        ROSE_DEFINED /* WAVE equivalent is T_DEFINED */
-        ROSE_DELETE /* WAVE equivalent is T_DELETE */
-        ROSE_DO /* WAVE equivalent is T_DO */
-        ROSE_DOUBLE /* WAVE equivalent is T_DOUBLE */
-        ROSE_DYNAMICCAST /* WAVE equivalent is T_DYNAMICCAST */
-        ROSE_ELSE /* WAVE equivalent is T_ELSE */
-        ROSE_ENUM /* WAVE equivalent is T_ENUM */
-        ROSE_EXPLICIT /* WAVE equivalent is T_EXPLICIT */
-        ROSE_EXPORT /* WAVE equivalent is T_EXPORT */
-        ROSE_EXTERN /* WAVE equivalent is T_EXTERN */
-        ROSE_FLOAT /* WAVE equivalent is T_FLOAT */
-        ROSE_FOR /* WAVE equivalent is T_FOR */
-        ROSE_FRIEND /* WAVE equivalent is T_FRIEND */
-        ROSE_GOTO /* WAVE equivalent is T_GOTO */
-        ROSE_IF /* WAVE equivalent is T_IF */
-        ROSE_INLINE /* WAVE equivalent is T_INLINE */
-        ROSE_INT /* WAVE equivalent is T_INT */
-        ROSE_LONG /* WAVE equivalent is T_LONG */
-        ROSE_MUTABLE /* WAVE equivalent is T_MUTABLE */
-        ROSE_NAMESPACE /* WAVE equivalent is T_NAMESPACE */
-        ROSE_NEW /* WAVE equivalent is T_NEW */
-        ROSE_OPERATOR /* WAVE equivalent is T_OPERATOR */
-        ROSE_PRIVATE /* WAVE equivalent is T_PRIVATE */
-        ROSE_PROTECTED /* WAVE equivalent is T_PROTECTED */
-        ROSE_PUBLIC /* WAVE equivalent is T_PUBLIC */
-        ROSE_REGISTER /* WAVE equivalent is T_REGISTER */
-        ROSE_REINTERPRETCAST /* WAVE equivalent is T_REINTERPRETCAST */
-        ROSE_RETURN /* WAVE equivalent is T_RETURN */
-        ROSE_SHORT /* WAVE equivalent is T_SHORT */
-        ROSE_SIGNED /* WAVE equivalent is T_SIGNED */
-        ROSE_SIZEOF /* WAVE equivalent is T_SIZEOF */
-        ROSE_STATIC /* WAVE equivalent is T_STATIC */
-        ROSE_STATICCAST /* WAVE equivalent is T_STATICCAST */
-        ROSE_STRUCT /* WAVE equivalent is T_STRUCT */
-        ROSE_SWITCH /* WAVE equivalent is T_SWITCH */
-        ROSE_TEMPLATE /* WAVE equivalent is T_TEMPLATE */
-        ROSE_THIS /* WAVE equivalent is T_THIS */
-        ROSE_THROW /* WAVE equivalent is T_THROW */
-        ROSE_TRY /* WAVE equivalent is T_TRY */
-        ROSE_TYPEDEF /* WAVE equivalent is T_TYPEDEF */
-        ROSE_TYPEID /* WAVE equivalent is T_TYPEID */
-        ROSE_TYPENAME /* WAVE equivalent is T_TYPENAME */
-        ROSE_UNION /* WAVE equivalent is T_UNION */
-        ROSE_UNSIGNED /* WAVE equivalent is T_UNSIGNED */
-        ROSE_USING /* WAVE equivalent is T_USING */
-        ROSE_VIRTUAL /* WAVE equivalent is T_VIRTUAL */
-        ROSE_VOID /* WAVE equivalent is T_VOID */
-        ROSE_VOLATILE /* WAVE equivalent is T_VOLATILE */
-        ROSE_WCHART /* WAVE equivalent is T_WCHART */
-        ROSE_WHILE /* WAVE equivalent is T_WHILE */
-    };
-#endif
-
-    enum ROSE_C_CXX_keywords 
-    {
-        C_CXX_ASM = 0 + 500,
-        C_CXX_AUTO = 1 + 500,
-        C_CXX_BOOL = 2 + 500,
-        C_CXX_BREAK = 3 + 500,
-        C_CXX_CASE = 4 + 500,
-        C_CXX_CATCH = 5 + 500,
-        C_CXX_CHAR = 6 + 500,
-        C_CXX_CLASS = 7 + 500,
-        C_CXX_CONST = 8 + 500,
-        C_CXX_CONSTCAST = 9 + 500,
-        C_CXX_CONTINUE = 10 + 500,
-        C_CXX_DEFAULT = 11 + 500,
-        C_CXX_DEFINED = 12 + 500,
-        C_CXX_DELETE = 13 + 500,
-        C_CXX_DO = 14 + 500,
-        C_CXX_DOUBLE = 15 + 500,
-        C_CXX_DYNAMICCAST = 16 + 500,
-        C_CXX_ELSE = 17 + 500,
-        C_CXX_ENUM = 18 + 500,
-        C_CXX_EXPLICIT = 19 + 500,
-        C_CXX_EXPORT = 20 + 500,
-        C_CXX_EXTERN = 21 + 500,
-        C_CXX_FALSE = 22 + 500,
-        C_CXX_FLOAT = 23 + 500,
-        C_CXX_FOR = 24 + 500,
-        C_CXX_FRIEND = 25 + 500,
-        C_CXX_GOTO = 26 + 500,
-        C_CXX_IF = 27 + 500,
-        C_CXX_INLINE = 28 + 500,
-        C_CXX_INT = 29 + 500,
-        C_CXX_LONG = 30 + 500,
-        C_CXX_MUTABLE = 31 + 500,
-        C_CXX_NAMESPACE = 32 + 500,
-        C_CXX_NEW = 33 + 500,
-        C_CXX_OPERATOR = 34 + 500,
-        C_CXX_PRIVATE = 35 + 500,
-        C_CXX_PROTECTED = 36 + 500,
-        C_CXX_PUBLIC = 37 + 500,
-        C_CXX_REGISTER = 38 + 500,
-        C_CXX_REINTERPRETCAST = 39 + 500,
-        C_CXX_RETURN = 40 + 500,
-        C_CXX_SHORT = 41 + 500,
-        C_CXX_SIGNED = 42 + 500,
-        C_CXX_SIZEOF = 43 + 500,
-        C_CXX_STATIC = 44 + 500,
-        C_CXX_STATICCAST = 45 + 500,
-        C_CXX_STRUCT = 46 + 500,
-        C_CXX_SWITCH = 47 + 500,
-        C_CXX_TEMPLATE = 48 + 500,
-        C_CXX_THIS = 49 + 500,
-        C_CXX_THROW = 50 + 500,
-        C_CXX_TRY = 51 + 500,
-        C_CXX_TRUE = 52 + 500,
-        C_CXX_TYPEDEF = 53 + 500,
-        C_CXX_TYPEID = 54 + 500,
-        C_CXX_TYPENAME = 55 + 500,
-        C_CXX_UNION = 56 + 500,
-        C_CXX_UNSIGNED = 57 + 500,
-        C_CXX_USING = 58 + 500,
-        C_CXX_VIRTUAL = 59 + 500,
-        C_CXX_VOID = 60 + 500,
-        C_CXX_VOLATILE = 61 + 500,
-        C_CXX_WCHART = 62 + 500,
-        C_CXX_WHILE = 63 + 500
-   };
-
-      //the following are alternate tokens.
-      //Refer to page 12 of C++ STD
-
-enum ROSE_C_CXX_alternate_tok
-    {
-        C_CXX_LEFT_CURLY_ALT, // The <% which is the same as {
-        C_CXX_RIGHT_CURLY_ALT, //The %> which is the same as }
-        C_CXX_LEFT_SQUARE_ALT, //The <: which is the same as [
-        C_CXX_RIGHT_SQUARE_ALT,//The :> which is the same as ]
-        C_CXX_HASH_ALT, // The #
-        C_CXX_HASH_HASH_ALT, // The 
-        C_CXX_and_ALT, // The #
-    };
-
-enum ROSE_C_CXX_Additional_Info
-{
-      C_CXX_COMMENTS = 0 + 100000,
-      C_CXX_STRING_LITERALS = 1 + 100000,
-      C_CXX_IDENTIFIER = 2 + 100000,
-      C_CXX_UNIDENTIFIED_TOKEN = 3 + 100000,
-      C_CXX_ERROR = 4 + 100000
-};
-
-
-
-};
-
-using namespace ROSE_token_ids;
-
-token_element ROSE_C_CXX_keyword_map[] = 
-{
-        {"asm",              C_CXX_ASM }, 
-        {"auto",             C_CXX_AUTO },
-        {"bool",             C_CXX_BOOL },
-        {"break",            C_CXX_BREAK },
-        {"case",             C_CXX_CASE },
-        {"catch",            C_CXX_CATCH },
-        {"char",             C_CXX_CHAR },
-        {"class",            C_CXX_CLASS },
-        {"const",            C_CXX_CONST },
-        {"const_cast",       C_CXX_CONSTCAST },
-        {"continue",         C_CXX_CONTINUE },
-        {"default",          C_CXX_DEFAULT },
-        //{"defined",        C_CXX_DEFINED },
-        {"delete",           C_CXX_DELETE },
-        {"do",               C_CXX_DO },
-        {"double",           C_CXX_DOUBLE },
-        {"dynamic_cast",     C_CXX_DYNAMICCAST },
-        {"else",             C_CXX_ELSE },
-        {"enum",             C_CXX_ENUM },
-        {"explicit",         C_CXX_EXPLICIT },
-        {"export",           C_CXX_EXPORT },
-        {"extern",           C_CXX_EXTERN },
-        {"false",            C_CXX_FALSE },
-        {"float",            C_CXX_FLOAT },
-        {"for",              C_CXX_FOR },
-        {"friend",           C_CXX_FRIEND },
-        {"goto",             C_CXX_GOTO },
-        {"if",               C_CXX_IF },
-        {"inline",           C_CXX_INLINE },
-        {"int",              C_CXX_INT },
-        {"long",             C_CXX_LONG },
-        {"mutable",          C_CXX_MUTABLE },
-        {"namespace",        C_CXX_NAMESPACE },
-        {"new",              C_CXX_NEW },
-        {"operator",         C_CXX_OPERATOR },
-        {"private",          C_CXX_PRIVATE },
-        {"protected",        C_CXX_PROTECTED },
-        {"public",           C_CXX_PUBLIC },
-        {"register",         C_CXX_REGISTER },
-        {"reinterpret_cast", C_CXX_REINTERPRETCAST },
-        {"return",           C_CXX_RETURN },
-        {"short",            C_CXX_SHORT },
-        {"signed",           C_CXX_SIGNED },
-        {"sizeof",           C_CXX_SIZEOF },
-        {"static",           C_CXX_STATIC },
-        {"static_cast",      C_CXX_STATICCAST },
-        {"struct",           C_CXX_STRUCT },
-        {"switch",           C_CXX_SWITCH },
-        {"template",         C_CXX_TEMPLATE },
-        {"this",             C_CXX_THIS },
-        {"throw",            C_CXX_THROW },
-        {"true",             C_CXX_TRUE },
-        {"try",              C_CXX_TRY },
-        {"typedef",          C_CXX_TYPEDEF },
-        {"typeid",           C_CXX_TYPEID },
-        {"typename",         C_CXX_TYPENAME },
-        {"union",            C_CXX_UNION },
-        {"unsigned",         C_CXX_UNSIGNED },
-        {"using",            C_CXX_USING },
-        {"virtual",          C_CXX_VIRTUAL },
-        {"void",             C_CXX_VOID },
-        {"volatile",         C_CXX_VOLATILE },
-        {"wchar_t",          C_CXX_WCHART },
-        {"while",            C_CXX_WHILE }
-};
-
-
-
-//We know that this is a magic number. 
-//We also know how to fix it.
-#define NUM_C_CXX_KEYWORDS 63
-
-//returns -1 if the string is not a keyword
-//otherwise returns the token ID
-int identify_if_C_CXX_keyword(std::string str)
-{
-    //In FORTRAN, the identifiers are case insensitive.
-    //So, variable 'ArEa' is the same as 'aReA'
-
-    string lowered_str;
-    for(unsigned int i = 0; i < str.size(); i++)
-    {
-        lowered_str += (unsigned char)tolower(str[i]);
-    }
-
-    //printf("got called with %s. Converted to %s\n", str.c_str(), lowered_str.c_str());
-    for(int i = 0; i < NUM_C_CXX_KEYWORDS; i++)
-    {
-        if(lowered_str == ROSE_C_CXX_keyword_map[i].token_lexeme)
-        {
-            return (ROSE_C_CXX_keyword_map[i].token_id);
-        }
-    }
-    return -1;
-}
-
-
-
-//#endif
-
-
-
-#include "sage3.h"
-
-// DQ (11/17/2004): Avoid compiler warning about unused function
-#define YY_NO_UNPUT
-
-#ifdef BOOL_IS_BROKEN
-// If BOOL_IS_BROKEN then we can assume that there is no definition for "true" and "false"
-#ifndef false
-#define false 0
-#endif
-#ifndef true
-#define true  1
-#endif
-#ifndef bool
-typedef int bool;
-#endif
-#endif
-
-#ifndef ROSE_ASSERT
-#define ROSE_ASSERT assert
-#endif
-
-#include "rose_attributes_list.h"
-#define yytext Rose_C_Cxx_text
-#define yylex  Rose_C_Cxx_lex
-
-#define HANDLEMACROSTART preproc_start_line_num=preproc_line_num; preproc_start_column_num=1; preproc_column_num+=strlen(yytext); macroString = yytext; BEGIN MACRO;
-
-int i = 0;
-
-std::string commentString;
-std::string macroString;
-//remove these _st's later
-std::stack<int> curly_brace_stack_st;
-std::stack<int> parenthesis_stack;
-std::stack<int> square_bracket;
-
-//All the above should be "matching constructs"
-//create new for various casts and templates
-
-
-// DQ (4/19/2006):
-// Store the name of the current file so that we can generate Sg_File_Info objects
-// for each comment.  Later we might want starting and ending fileInfo for each 
-// comments and CPP directive.
-std::string globalFileName;
-
-int curr_brace_depth=0;
-int ls_startingline_no; 
-int ls_startingpreproc_column_num; 
-int brace_counting_on=0;
-PreprocessingInfo::DirectiveType macrotype = PreprocessingInfo::CpreprocessorUnknownDeclaration;
-
-int topcurlybracestack();
-void pushbracestack(int);
-int popbracestack();
-bool isemptystack();
-
-int num_of_newlines(char*);
-
-ROSEAttributesList preprocessorList;
-
-// DQ (10/30/2005): Changed
-// string			\"([^"]|"\\\""|"\\\n")*\"
-// to 
-// string			\"([^"]|"\\\n")*\"
-// to fix test2005_184.C (use of "\\" in string caused following 
-// macros to be ignored until a double quote (e.g. ") was found).
-
-// DQ (6/25/2006): This was the value before I tried the previous value
-// string			\"([^"]|"\\\n")*\"
-// I tried:
-// string			\"([^"]|"\\n")*\"
-// and: 
-// string			\"([^"]|"\\\\n")*\"
-// This however didn't make any difference, so I restored it it it previous value!
-
-// DQ (6/25/2006): What did fix the problem with continuation chars in C++ comments was changing
-// "<CXX_COMMENT>\\\n {" to "<CXX_COMMENT>\\\\n {"
-
-//add stuff for char literals???????????
-
-/*
-whitespacenl           	[\t\n ]+
-whitespace      	[\t ]+
-lineprefix		^{whitespace}*"#"{whitespace}*
-macrokeyword 		"include"|"define"|"undef"|"line"|"error"|"warning"|"if"|"ifdef"|"ifndef"|"elif"|"else"|"endif"
-mlinkagespecification	^{whitespace}*"extern"{whitespace}*(("\"C\"")|("\"C++\"")){whitespacenl}*"{"
-string			\"([^"]|"\\\n")*\"
-*/
-
-//refresher: blank and space function exactly as the STDLIB functions isblank and isspace respectively.
-//blank matches only the various blank characters (\b,\t). It does NOT match new line. (and its variants).
-//space matches blanks, newlines (various flavours like formfeed etc) as well as other stuff like vertical tab '\v' etc.
-//refer to http://www.gatago.com/comp/std/c/18426853.html among others for difference between these two.
-/*
-The following was the original 
-whitespacenl           	[\t\n ]+
-whitespace      	[\t ]+
-
-I changed it to
-whitespacenl           	[:space:]+
-whitespace      	[:blank:]+
-This does not work.
-
-What worked was the following:
-whitespacenl           	[[:space:]]+
-whitespace      	[[:blank:]]+
-
-*/
-
-/*
-I am not sure if the whitespacenl would count the number of newlines in code that has backslashes properly.
-*/
-%}
-whitespacenl           	[[:space:]]+
-whitespace      	[[:blank:]]+
-lineprefix		^{whitespace}*"#"{whitespace}*
-macrokeyword 		"include"|"define"|"undef"|"line"|"error"|"warning"|"if"|"ifdef"|"ifndef"|"elif"|"else"|"endif"
-mlinkagespecification	^{whitespace}*"extern"{whitespace}*(("\"C\"")|("\"C++\"")){whitespacenl}*"{"
-string			\"([^"]|"\\\n")*\"
-%s NORMAL CXX_COMMENT C_COMMENT STRING_LIT MACRO C_COMMENT_INMACRO
-%%
-%{
-int preproc_line_num = 1;
-	/*bad way to initialize*/
-int preproc_start_line_num = preproc_line_num;
-int preproc_column_num = 1;
-int preproc_start_column_num = preproc_column_num;
-			/*Do we need this  ???*/
-BEGIN NORMAL;
-%}
-<NORMAL>{mlinkagespecification} { 
-				    preprocessorList.addElement(PreprocessingInfo::ClinkageSpecificationStart, 
-					    yytext,globalFileName,preproc_line_num,preproc_column_num,0); 
-				    preproc_line_num+=num_of_newlines(yytext); 
-				    preproc_column_num+=strlen(yytext); 
-
-				    curr_brace_depth++; 
-				    pushbracestack(curr_brace_depth);
-                                }
-	/*Handle the braces (left and right). Push and Pop the bracestack accordingly*/
-<NORMAL>"{"	{ 
-		    if(!isemptystack()) 
-		    { 
-			/* we only count braces within a linkage specification. */ 
-			curr_brace_depth++; 
-		    } 
-		    //printf("Ram: found left brace at preproc_line_num = %d, preproc_column_num = %d\n", preproc_line_num, preproc_column_num);
-		    preproc_column_num++; 
-                }
-
-<NORMAL>"}"     { 
-		    if(!isemptystack()) 
-		    { 
-			if(curr_brace_depth==topcurlybracestack()) 
-			{ 
-			    popbracestack(); 
-			    preprocessorList.addElement(PreprocessingInfo::ClinkageSpecificationEnd, 
-							    yytext, globalFileName, preproc_line_num, preproc_column_num, 0); 
-			}
-			curr_brace_depth--; 
-		    } 
-		    //printf("Ram: found right brace at preproc_line_num = %d, preproc_column_num = %d\n", preproc_line_num, preproc_column_num);
-		    preproc_column_num++; 
-		}
-
-<NORMAL>"("	{ 
-		    /*if(!isemptystack()) 
-		    { 
-			//we only count braces within a linkage specification. 
-			curr_brace_depth++; 
-		    }
-                    */
-		    preproc_column_num++; 
-                }
-
-<NORMAL>")"     { 
-		    /*
-		    if(!isemptystack()) 
-		    { 
-			if(curr_brace_depth==topcurlybracestack()) 
-			{ 
-			    popbracestack(); 
-			    preprocessorList.addElement(PreprocessingInfo::ClinkageSpecificationEnd, 
-							    yytext, globalFileName, preproc_line_num, preproc_column_num, 0); 
-			}
-			curr_brace_depth--; 
-		    } 
-		    */
-		    preproc_column_num++; 
-		}
-
-<NORMAL>[a-zA-Z_][a-zA-Z0-9_]*       {
-
-                                          token_element *p_tok_elem = new token_element;
-                                          p_tok_elem->token_lexeme = yytext;
-
-                                          int is_keyword = identify_if_C_CXX_keyword(yytext);
-                                          //found a keyword?
-                                          if(is_keyword != -1)
-                                          {   
-                                              //printf("%s is a keyword\n", yytext); 
-                                              p_tok_elem->token_id = is_keyword;
-                                          }
-                                          else
-                                          {   
-                                              //printf("%s is not a keyword\n", yytext); 
-                                              p_tok_elem->token_id = C_CXX_IDENTIFIER;
-                                          }
-
-                                          stream_element *p_se = new stream_element;
-                                          p_se->p_tok_elem = p_tok_elem;
-
-                                          /*
-                                          p_se->beginning_fpi.line_num = preproc_column_num;
-                                          p_se->beginning_fpi.column_num = preproc_column_num;
-                                          preproc_column_num+=strlen(yytext);
-                                          p_se->ending_fpi.line_num = preproc_line_num;
-                                          p_se->ending_fpi.column_num = preproc_column_num-1;
-                                          //push the element onto the token stream
-                                          */
-                                          ROSE_token_stream_pointer->push_back(p_se);
-                                    }
-<NORMAL>"\""    { 
-		}
-	/*begin handling the C++ style comments. */
-<NORMAL>"\/\/" 	{
-		    /*Handle the C comments.*/ 
-		    preproc_start_line_num=preproc_line_num; 
-		    preproc_start_column_num=preproc_column_num; 
-		    preproc_column_num+=2; 
-		    commentString = yytext; 
-		    BEGIN CXX_COMMENT;
- 		}
-
-	/*The normal mode actions. Handle the preprocessor stuff and anyother characters. */
-	/*Do we need the backslash character?????????????*/
-<NORMAL>"/*" 	{
-		    preproc_start_line_num=preproc_line_num; 
-		    preproc_start_column_num=preproc_column_num; 
-		    preproc_column_num+=strlen(yytext);
-		    
-		    //copy the comment to commentString 
-		    commentString = yytext; 
-		    BEGIN C_COMMENT; 
-		}
-    /*These are the alternative tokens. Refer to page 12 of C++ std to understand their representation*/
-                  /*<NORMAL>"<%"     {curr_token = ALT_LEFT_CURLY; do_yytext_bookeeping(); }
-<NORMAL>"<%"     { }
-                       */
-
-
-
-
-<NORMAL>"static_cast"	{ 
-		    /*
-		    if(!isemptystack()) 
-		    { 
-			//we only count braces within a linkage specification. 
-			curr_brace_depth++; 
-		    
-			*/
-		    preproc_column_num++; 
-                }
-
-
-<NORMAL>{lineprefix}"include"	{ macrotype=PreprocessingInfo::CpreprocessorIncludeDeclaration; HANDLEMACROSTART }
-<NORMAL>{lineprefix}"define" 	{ macrotype=PreprocessingInfo::CpreprocessorDefineDeclaration; HANDLEMACROSTART }
-<NORMAL>{lineprefix}"undef" 	{ macrotype=PreprocessingInfo::CpreprocessorUndefDeclaration; HANDLEMACROSTART }
-<NORMAL>{lineprefix}"line" 	{ macrotype=PreprocessingInfo::CpreprocessorLineDeclaration; HANDLEMACROSTART }
-<NORMAL>{lineprefix}"error" 	{ macrotype=PreprocessingInfo::CpreprocessorErrorDeclaration; HANDLEMACROSTART }
-<NORMAL>{lineprefix}"if" 	{ macrotype=PreprocessingInfo::CpreprocessorIfDeclaration; HANDLEMACROSTART }
-<NORMAL>{lineprefix}"ifdef" 	{ macrotype=PreprocessingInfo::CpreprocessorIfdefDeclaration; HANDLEMACROSTART }
-<NORMAL>{lineprefix}"ifndef" 	{ macrotype=PreprocessingInfo::CpreprocessorIfndefDeclaration; HANDLEMACROSTART }
-<NORMAL>{lineprefix}"elif" 	{ macrotype=PreprocessingInfo::CpreprocessorElifDeclaration; HANDLEMACROSTART }
-<NORMAL>{lineprefix}"else" 	{ macrotype=PreprocessingInfo::CpreprocessorElseDeclaration; HANDLEMACROSTART }
-<NORMAL>{lineprefix}"endif" 	{ macrotype=PreprocessingInfo::CpreprocessorEndifDeclaration; HANDLEMACROSTART }
-<NORMAL>{lineprefix}"warning"   { macrotype=PreprocessingInfo::CpreprocessorWarningDeclaration; HANDLEMACROSTART }
-	/*Add code here to attach the whitespace before newlines (and general lineprefix code) */
-<NORMAL>\n			{ preproc_line_num++; preproc_column_num=1; } 
-		/*<NORMAL>{string}		{ / *???IS THIS RIGHT???* / preproc_line_num+=num_of_newlines(yytext); preproc_column_num+=strlen(yytext); }*/
-<NORMAL>"\""		        { /*preproc_line_num+=num_of_newlines(yytext);*/ preproc_column_num+=strlen(yytext); BEGIN STRING_LIT;}
-			    /*<NORMAL>"\'"		        { preproc_line_num+=num_of_newlines(yytext); preproc_column_num+=strlen(yytext); BEGIN CHAR_LIT;}*/
-                            /*<NORMAL>"'"		        { preproc_line_num+=num_of_newlines(yytext); preproc_column_num+=strlen(yytext); BEGIN CHAR_LIT;}*/
-<NORMAL>.			{ preproc_column_num++; }
-	/*Actions for a string literal.*/
-<STRING_LIT>[^\\"\n]	{/*eat anything that is not a newline or a backslash or a doublequote*/ preproc_column_num+=strlen(yytext); }
-<STRING_LIT>\\[^\"\n]	{/*if the backslash is followed by anything other than a newline or doublequote, eat them. */ preproc_column_num+=strlen(yytext); }
-<STRING_LIT>\\\"	{/*if a backslash preceeds the doublequote, eat both.*/ preproc_column_num+=strlen(yytext); }
-<STRING_LIT>\\\n	{/*if a backslash preceeds the newline, eat both, donot increment preproc_line_num.*/ preproc_column_num+=strlen(yytext); }
-<STRING_LIT>\"		{ /* if it is a doublequote, end the STRING_LIT state.*/ BEGIN NORMAL; }
-<STRING_LIT>\n		{ /* count the newlines */ preproc_line_num++; }
-	/*Actions for a C++ style comment.*/
-<CXX_COMMENT>[^\\\n]	{ /* eat anything that is not a backslash or a newline*/ commentString += yytext;}
-<CXX_COMMENT>\\[^\n]	{ 
-			    /*eat up backslashes not immdediately followed by newlines*/ 
-			    commentString += yytext;
-			    /*fix the preproc_column_num at other places ????????????????????  ??????????????*/ 
-			    preproc_column_num=1; 
-			}
-
-<CXX_COMMENT>\\\n	{ 
-			    /*if backslash is followed by a newline, then eat them (backslash, newline) up, increment preproc_line_num and continue*/ 
-			    commentString += yytext;
-			    preproc_line_num++; 
-}
-<CXX_COMMENT>\n		{
-			    preproc_line_num++; preproc_column_num=1; 
-			    commentString += yytext;
-			    preprocessorList.addElement(PreprocessingInfo::CplusplusStyleComment, 
-				    commentString,globalFileName, preproc_start_line_num, preproc_start_column_num,preproc_line_num-preproc_start_line_num); 
-
-			    BEGIN NORMAL; 
-			}
-	/*Actions while in a C style comment.*/
-<C_COMMENT>\n		{
-			    commentString += yytext;
-			    preproc_line_num++; 
-			    preproc_column_num=1; 
-			}
-<C_COMMENT>"*/"	{
-			    commentString += yytext;
-			    preproc_column_num+=strlen(yytext); 
-			    /*printf("hello Ram: The comment string is ####%s#############. It is of %d lines, the current line number is %d\n",
-				    commentString.c_str(), preproc_line_num-preproc_start_line_num+1, preproc_line_num);
-				    */
-			    preprocessorList.addElement(PreprocessingInfo::C_StyleComment,commentString,globalFileName,preproc_start_line_num,preproc_start_column_num,preproc_line_num-preproc_start_line_num+1); 
-			    BEGIN(NORMAL); 
-			}
-<C_COMMENT>. 	{ 
-		    commentString += yytext;
-		    preproc_column_num++; 
-		}
-
-	/*Actions while in a MACRO.*/
-<MACRO>\\\n	{ 
-		    macroString += yytext;
-		    preproc_line_num++; 
-		    preproc_column_num=1;
-		}
-<MACRO>\n 	{
-		    macroString += yytext;
-		    preproc_line_num++; 
-		    preproc_column_num=1; 
-		    
-		    preprocessorList.addElement(macrotype,macroString,globalFileName,preproc_start_line_num,preproc_start_column_num,preproc_line_num-preproc_start_line_num); 
-		    BEGIN NORMAL; 
-		}
-<MACRO>"\/*" 	{
-		    //does this cover all cases?????????
-		    preproc_column_num+=2; 
-		    macroString += yytext;
-
-		    /*
-				//Do we need to do something like this?
-		                commentString = yytext;
-		    */
-		    BEGIN C_COMMENT_INMACRO;
-		}
-<MACRO>.	{ 
-		    macroString += yytext;
-		    preproc_column_num++; 
-		}
-<C_COMMENT_INMACRO>"*/"   { 
-				//??????????????????????????????????????????????????????????????
-				//This code copies the comment into the macrobuffer.
-				//Should we not copy it to comment buffer also?????
-				macroString += yytext;
-
-				/*
-				commentString += yytext;
-				//should we do something like this??
-				preprocessorList.addElement(PreprocessingInfo::C_StyleComment,commentString.c_str(),globalFileName,preproc_start_line_num,preproc_start_column_num,preproc_line_num-preproc_start_line_num); 
-				*/
-				preproc_column_num+=strlen(yytext); 
-				BEGIN MACRO; 
-			    }
-<C_COMMENT_INMACRO>\n	    { 
-				macroString += yytext;
-
-				//Do we need to do something like this?
-				//commentString += yytext;
-
-				preproc_line_num++; preproc_column_num=1; 
-			    }
-<C_COMMENT_INMACRO>.	    { 
-				macroString += yytext;
-
-				//Do we need to do something like this?
-				//commentString += yytext;
-
-				preproc_column_num++; 
-			    }
-%%
-
-const int maxstacksize=500;
-int bracestack[maxstacksize];
-
-int top=0;
-void pushbracestack(int brace_no) { bracestack[top++]=brace_no; }
-int topcurlybracestack() { if(top) return bracestack[top-1]; else return -1; }
-int popbracestack() { return bracestack[--top]; }
-bool isemptystack() { return top==0; }
-
-int num_of_newlines(char* s)
-{
-     int num = 0;
-     while(*s != '\0')
-        {
-          if(*s == '\n')
-               num++;
-          s++;
-        }
-     return num;
-}
-
-// DQ (3/30/2006): Modified to use C++ style string instead of C style char* string
-// ROSEAttributesList *getPreprocessorDirectives( char *fileName)
-//! This function extracts the comments and CPP preprocessor control directives from the input file.
-// ROSEAttributesList *getPreprocessorDirectives( std::string fileName )
-// ROSEAttributesList *getPreprocessorDirectives( std::string fileName, LexTokenStreamTypePointer & input_token_stream_pointer )
-ROSEAttributesList *getPreprocessorDirectives( std::string fileName )
-   {
-     FILE *fp = NULL;
-     ROSEAttributesList *preprocessorInfoList = new ROSEAttributesList; // create a new list
-     ROSE_ASSERT (preprocessorInfoList != NULL);
-
-  // printf ("Inside of lex file: getPreprocessorDirectives() \n");
-  // ROSE_ASSERT(false);
-
-  // assert(input_token_stream_pointer == NULL);
-     ROSE_token_stream_pointer = new LexTokenStreamType;
-     assert(ROSE_token_stream_pointer != NULL);
-
-  // Share a pointer to the same LexTokenStreamType just allocated
-  // input_token_stream_pointer = ROSE_token_stream_pointer;
-  // assert(input_token_stream_pointer != NULL);
-
-  // Attach the token stream to the ROSEAttributesList being returned.
-     preprocessorInfoList->set_rawTokenStream(ROSE_token_stream_pointer);
-
-  // Set the global filename to be used in the PreprocessingInfo constructor.
-     globalFileName = fileName;
-
-     if ( fileName.empty() == false )
-        {
-	  std::map<std::string,std::vector<PreprocessingInfo*>* >::iterator iItr= 
-		  mapFilenameToAttributes.find(fileName);
-	  //std::cout << "Trying to find fileName " << fileName << std::endl;
-          if ( iItr != mapFilenameToAttributes.end())
-             {
-                     //std::cout << "Found requested file: " << fileName << " size: " << iItr->second->size() << std::endl; 
-	       for(std::vector<PreprocessingInfo*>::iterator jItr = iItr->second->begin(); 
-			       jItr != iItr->second->end(); ++jItr){
-		     //std::cout << "Inserting element" <<  (*jItr)->getString() << std::endl;
-                     preprocessorInfoList->insertElement(**jItr);
-
-	       }
-
-             }
-          else{
-            fp = fopen( fileName.c_str(), "r");
-            if (fp)
-            {
-              yyin = fp;
-              yylex();
-
-              // Writes all gathered information to stdout
-              // preprocessorList.display("TEST Collection of Comments and CPP Directives");
-
-              // bugfix (9/29/2001)
-              // The semantics required here is to move the elements accumulated into the
-              // preprocessorList into the preprocessorInfoList and delete them from the
-              // preprocessorList (which will be used again to accumulate PreprocessingInfo objects
-              // when the next file is processed).  We have to be able to process several files using
-              // this getPreprocessorDirectives() function.
-              preprocessorInfoList->moveElements( preprocessorList ); // create a copy that we can pass on
-
-              // The accumulator list should now be empty
-              assert (preprocessorList.getLength() == 0);
-              fclose(fp);  
-            }
-            else
-            {
-              // DQ (5/14/2006): Added error checking for collection of comments and CPP directives.
-              printf ("Error: can't find the requested file (%s) \n",fileName.c_str());
-              // ROSE_ASSERT(false);
-            }
-          }
-
-        }
-
-  // printf ("In getPreprocessorDirectives(fileName = %s): preprocessorInfoList->size() = %d \n",fileName.c_str(),(int)preprocessorInfoList->size());
-
-     return preprocessorInfoList;
-   }

Copied: branches/testonly/src/frontend/SageIII/preproc.ll (from rev 128, trunk/src/frontend/SageIII/preproc.ll)
===================================================================
--- branches/testonly/src/frontend/SageIII/preproc.ll	                        (rev 0)
+++ branches/testonly/src/frontend/SageIII/preproc.ll	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,1011 @@
+%option noyywrap
+%option prefix="Rose_C_Cxx_"
+%option outfile="lex.yy.c"
+%{
+/* 
+    preproc.lex: This lexer currently recognizes C style comments, C++ style 
+    comments, preprocessor directives, and c/c++ linkage specifications.  
+    line/column/text information for each recognized directive is stored in 
+    ROSEAttributesList.  This information is used by the unparser.
+*/
+
+/*
+-------------------------------------------------------------------------------------
+Originally written and modified by Markus Schordan and Dan Quinlan.
+(see ChangeLog).
+
+08-05-2006: Rewritten significantly by Ramakrishna Upadrasta.
+Reason: For supporting additional features and bug-fixing (see summary below).
+Note: The old preproc.lex is available in the same directory as preproc.original.lex
+------------------------------------------------------------------------------------
+*/
+//Ramakrishna Upadrasta
+//01-12-07: This is only version 0 of this file
+
+
+/*
+Summary of the changes:
+=========================================================================================
+    The regular expressions (and the action code) for C++ comments and 
+    C style comments has been cleaned up and are (hopefully:) upto the standard.
+=========================================================================================
+    Naming of variables: 
+	changed the lex variable names (states/start conditions) so that 
+	    CXX_COMMENT to corresponds to C++ style comments (beginning with //) and 
+	    C_COMMENT to correspond to C-style comments (enclosed by / * and * / ).
+	Earlier they were
+	    C_COMMENT corresponded to C++ style comments
+	    CPP_COMMENT corresponded to C-style comments.
+	It was felt that the names were confusing.
+	The other choice was to name the C-style comments as C_COMMENT and C++ style 
+	comments as CPP_COMMENT as in Wave. That was also found to be confusing, as CPP usually 
+	means C Pre Processor). The new terminology is (partly) taken from makefiles which 
+	allows 3 types of flags (C_FLAGS/CPP_FLAGS/CXX_FLAGS).
+
+=========================================================================================
+	Use STL types for instead of fixed size buffers for the following data structures
+	commentString, macroString and bracestack.  (earlier they were 
+		char commentString[10000000] for comments 
+		char macroString[10000000] for macro strings
+		and char bracestack[500] for matching of braces)
+=========================================================================================
+    Exact Position information for literals
+	The previous method to get the position information from EDG is incorrect in 
+	most of the cases. A second scan (like this lexer does) of the input was thought 
+	to be necessary to attach additional info.
+=========================================================================================
+    Support for char literals
+	including the '\e' '\U' which would be part of 2008 standard
+	refer to ???? for details
+=========================================================================================
+    Semi colons
+	We have to ensure that semi colons for that donot actually end 
+	statements are taken care of carefully.
+	class A {
+	f(); <-- this semi colon should be taken care of carefully.
+	}
+=========================================================================================
+    Double colons (::'s)
+        They can only occur in  .........
+	we identify them with 
+=========================================================================================
+trigraphs
+    
+=========================================================================================
+    backslashes followed by newlines
+	Either inside or outside of comments
+=========================================================================================
+    Whitespace info:
+	The 
+
+=========================================================================================
+    Line number information:
+	A better line count
+
+=========================================================================================
+    Trigraphs/Digraphs
+=========================================================================================
+    Proper identification and matching of different varieties of brackets
+	Parenthesis ()
+	Curly braces {}: The support for this existed earlier
+	Square brackets []
+=========================================================================================
+    Support for keywords
+	C++
+	C
+	C99
+	C++Ox 
+	    Ones only in 
+=========================================================================================
+    To be done in CHAR literals
+	wierd char literals
+	testing for octal and hex char literals
+	testing for backslashes in char literals.
+    To be done in INT literals
+	testing for 
+=========================================================================================
+    Limitations/open questions: 
+	This lexer does not handle lots of important cases, like 
+		character literals etc.  
+		Trigraph sequences, alternative tokens (lex.trigraph and lex.digraph of the standard).  
+		hexadecimal floating point literals and similar arcane stuff 
+			(HOW DOES EDG handle them? How does Wave handle them?)
+    The user should probably use the wave workaround (does it support these?????), if she needs such things.
+=========================================================================================
+    Use of standard variable names like ([:space:] and [:blank:]) that come with FLEX. 
+    Read the flex http://www.gnu.org/software/flex/manual/ for details. They work like C functions
+    isspace and isblank respectively.
+=========================================================================================
+=========================================================================================
+    A ROSE-sequence point in the original program is a position in the input program where 
+    synchronization of the AST happens with the input program. For now, the sequence points
+    are specific lexical tokens in the input program. In specific, they are 
+	parenthesis: () 
+	curly braces: {} 
+	semi colons: ;
+	new lines: \n
+    The possible are contenders for being sequence points
+	keywords???
+
+
+    Sequence points of the program so that exact code generation is done
+	If the code is not transformed? we synchronize the code generation
+	If the code is transformed, we synchronize the code generation immediately after the next sequence point.
+
+    An extension to the above token/character based sequence-points is to use parsing-constructs in the
+    the grammar of the source language, like
+	end of statement-sequence
+	end of function/class/namespace definition
+=========================================================================================
+    ellipsis????
+
+=========================================================================================
+=========================================================================================
+=========================================================================================
+Notes about coding style:
+    There is a unsaid tradition of separating the patterns and the actions in LEX files by tabs.
+    I am using that, though Dan prefers that whitespace be used for indentation.
+*/
+
+/*
+Test cases these (atleast fix) and effect:
+    test2005_170.C about the buffer size of (C and C++ style) comments.
+    test2001_18.C (and its related files: test2001_18A.h and test2001_18B.h): which is about the includes having code segments??????????????
+    test2006_15.C: which is about the handling of the character literals.  
+    test2005_184.C: which is about handling of backslashes at the end of C++ style comments
+-------------------
+    test2005_131.C
+The ones that have singlequotes in a IF(0) and were earlier preprocessed silently, but are being flagged (incorrectly??) because we identify character literrals
+Cxx tests
+    test2004_154.C
+    test2005_178.C
+    test2005_191.C
+    test2005_194.C
+    test2005_196.C
+    test2005_198.C
+    test2005_199.C
+    test2006_16.C
+    test2006_17.C
+    test2006_18.C
+    test2006_26.C
+-------------------------------------------------
+write test cases so that 
+    comments and preprocssor stuff etc.
+    
+*/
+/*
+       CHANGE LINES LIKE THIS TO ACCEPT std::string instead of char*, which makes us give it a c_str
+		    preprocessorList.addElement(macrotype,macroString_str.c_str(),globalFileName,preproc_start_line_num,preproc_start_column_num,preproc_line_num-preproc_start_line_num); 
+*/
+
+
+#include <iostream>
+#include <stdio.h>
+#include <ctype.h>
+#include <string>
+#include <string.h>
+#include <list>
+
+/* DQ (1/21/2008): This now has a single definition in the header file: ROSE/src/frontend/SageIII/general_defs.h */
+#include "general_token_defs.h"
+
+
+#if 0
+// DQ (1/21/2008): This definition is now redundent with what is in general_token_defs.h
+struct token_element
+{
+    std::string token_lexeme;
+    int token_id;
+};
+#endif
+
+#if 0
+// These are now defined in general_defs.h
+//Ideally this should inherit from Sg_File_Info
+//But for now, this will work
+struct file_pos_info
+{
+    int line_num;
+    int column_num;
+};
+
+struct stream_element
+{ 
+    struct token_element * p_tok_elem;
+    struct file_pos_info beginning_fpi;
+    struct file_pos_info ending_fpi;
+};
+#endif
+
+
+using namespace std;
+
+// list <stream_element*> ROSE_token_stream;
+// typedef list <stream_element*>:: iterator SE_ITR;
+LexTokenStreamTypePointer ROSE_token_stream_pointer = NULL;
+typedef LexTokenStreamType::iterator SE_ITR;
+
+struct file_pos_info curr_beginning;
+
+
+//Rama
+//#ifdef ROSE_TOKEN_IDENTIFIERS_H
+//#define ROSE_TOKEN_IDENTIFIERS_H
+
+//These would be used in the file INFO
+//File info
+namespace ROSE_token_ids
+{
+    //whitespace token IDs
+    enum whitespace{ 
+	T_NOTKNOWN,
+	//The following are non UNIX whitespace
+    };
+
+#if 0
+    //I brazenly copied from the interface of WAVE for these enums
+    enum ROSE_C_CXX_keywords
+    {
+        ROSE_ASM /* WAVE equivalent is T_ASM */
+        ROSE_AUTO /* WAVE equivalent is T_AUTO */
+        ROSE_BOOL /* WAVE equivalent is T_BOOL */
+        ROSE_BREAK /* WAVE equivalent is T_BREAK */
+        ROSE_CASE /* WAVE equivalent is T_CASE */
+        ROSE_CATCH /* WAVE equivalent is T_CATCH */
+        ROSE_CHAR /* WAVE equivalent is T_CHAR */
+        ROSE_CLASS /* WAVE equivalent is T_CLASS */
+        ROSE_CONST /* WAVE equivalent is T_CONST */
+        ROSE_CONSTCAST /* WAVE equivalent is T_CONSTCAST */
+        ROSE_CONTINUE /* WAVE equivalent is T_CONTINUE */
+        ROSE_DEFAULT /* WAVE equivalent is T_DEFAULT */
+        ROSE_DEFINED /* WAVE equivalent is T_DEFINED */
+        ROSE_DELETE /* WAVE equivalent is T_DELETE */
+        ROSE_DO /* WAVE equivalent is T_DO */
+        ROSE_DOUBLE /* WAVE equivalent is T_DOUBLE */
+        ROSE_DYNAMICCAST /* WAVE equivalent is T_DYNAMICCAST */
+        ROSE_ELSE /* WAVE equivalent is T_ELSE */
+        ROSE_ENUM /* WAVE equivalent is T_ENUM */
+        ROSE_EXPLICIT /* WAVE equivalent is T_EXPLICIT */
+        ROSE_EXPORT /* WAVE equivalent is T_EXPORT */
+        ROSE_EXTERN /* WAVE equivalent is T_EXTERN */
+        ROSE_FLOAT /* WAVE equivalent is T_FLOAT */
+        ROSE_FOR /* WAVE equivalent is T_FOR */
+        ROSE_FRIEND /* WAVE equivalent is T_FRIEND */
+        ROSE_GOTO /* WAVE equivalent is T_GOTO */
+        ROSE_IF /* WAVE equivalent is T_IF */
+        ROSE_INLINE /* WAVE equivalent is T_INLINE */
+        ROSE_INT /* WAVE equivalent is T_INT */
+        ROSE_LONG /* WAVE equivalent is T_LONG */
+        ROSE_MUTABLE /* WAVE equivalent is T_MUTABLE */
+        ROSE_NAMESPACE /* WAVE equivalent is T_NAMESPACE */
+        ROSE_NEW /* WAVE equivalent is T_NEW */
+        ROSE_OPERATOR /* WAVE equivalent is T_OPERATOR */
+        ROSE_PRIVATE /* WAVE equivalent is T_PRIVATE */
+        ROSE_PROTECTED /* WAVE equivalent is T_PROTECTED */
+        ROSE_PUBLIC /* WAVE equivalent is T_PUBLIC */
+        ROSE_REGISTER /* WAVE equivalent is T_REGISTER */
+        ROSE_REINTERPRETCAST /* WAVE equivalent is T_REINTERPRETCAST */
+        ROSE_RETURN /* WAVE equivalent is T_RETURN */
+        ROSE_SHORT /* WAVE equivalent is T_SHORT */
+        ROSE_SIGNED /* WAVE equivalent is T_SIGNED */
+        ROSE_SIZEOF /* WAVE equivalent is T_SIZEOF */
+        ROSE_STATIC /* WAVE equivalent is T_STATIC */
+        ROSE_STATICCAST /* WAVE equivalent is T_STATICCAST */
+        ROSE_STRUCT /* WAVE equivalent is T_STRUCT */
+        ROSE_SWITCH /* WAVE equivalent is T_SWITCH */
+        ROSE_TEMPLATE /* WAVE equivalent is T_TEMPLATE */
+        ROSE_THIS /* WAVE equivalent is T_THIS */
+        ROSE_THROW /* WAVE equivalent is T_THROW */
+        ROSE_TRY /* WAVE equivalent is T_TRY */
+        ROSE_TYPEDEF /* WAVE equivalent is T_TYPEDEF */
+        ROSE_TYPEID /* WAVE equivalent is T_TYPEID */
+        ROSE_TYPENAME /* WAVE equivalent is T_TYPENAME */
+        ROSE_UNION /* WAVE equivalent is T_UNION */
+        ROSE_UNSIGNED /* WAVE equivalent is T_UNSIGNED */
+        ROSE_USING /* WAVE equivalent is T_USING */
+        ROSE_VIRTUAL /* WAVE equivalent is T_VIRTUAL */
+        ROSE_VOID /* WAVE equivalent is T_VOID */
+        ROSE_VOLATILE /* WAVE equivalent is T_VOLATILE */
+        ROSE_WCHART /* WAVE equivalent is T_WCHART */
+        ROSE_WHILE /* WAVE equivalent is T_WHILE */
+    };
+#endif
+
+    enum ROSE_C_CXX_keywords 
+    {
+        C_CXX_ASM = 0 + 500,
+        C_CXX_AUTO = 1 + 500,
+        C_CXX_BOOL = 2 + 500,
+        C_CXX_BREAK = 3 + 500,
+        C_CXX_CASE = 4 + 500,
+        C_CXX_CATCH = 5 + 500,
+        C_CXX_CHAR = 6 + 500,
+        C_CXX_CLASS = 7 + 500,
+        C_CXX_CONST = 8 + 500,
+        C_CXX_CONSTCAST = 9 + 500,
+        C_CXX_CONTINUE = 10 + 500,
+        C_CXX_DEFAULT = 11 + 500,
+        C_CXX_DEFINED = 12 + 500,
+        C_CXX_DELETE = 13 + 500,
+        C_CXX_DO = 14 + 500,
+        C_CXX_DOUBLE = 15 + 500,
+        C_CXX_DYNAMICCAST = 16 + 500,
+        C_CXX_ELSE = 17 + 500,
+        C_CXX_ENUM = 18 + 500,
+        C_CXX_EXPLICIT = 19 + 500,
+        C_CXX_EXPORT = 20 + 500,
+        C_CXX_EXTERN = 21 + 500,
+        C_CXX_FALSE = 22 + 500,
+        C_CXX_FLOAT = 23 + 500,
+        C_CXX_FOR = 24 + 500,
+        C_CXX_FRIEND = 25 + 500,
+        C_CXX_GOTO = 26 + 500,
+        C_CXX_IF = 27 + 500,
+        C_CXX_INLINE = 28 + 500,
+        C_CXX_INT = 29 + 500,
+        C_CXX_LONG = 30 + 500,
+        C_CXX_MUTABLE = 31 + 500,
+        C_CXX_NAMESPACE = 32 + 500,
+        C_CXX_NEW = 33 + 500,
+        C_CXX_OPERATOR = 34 + 500,
+        C_CXX_PRIVATE = 35 + 500,
+        C_CXX_PROTECTED = 36 + 500,
+        C_CXX_PUBLIC = 37 + 500,
+        C_CXX_REGISTER = 38 + 500,
+        C_CXX_REINTERPRETCAST = 39 + 500,
+        C_CXX_RETURN = 40 + 500,
+        C_CXX_SHORT = 41 + 500,
+        C_CXX_SIGNED = 42 + 500,
+        C_CXX_SIZEOF = 43 + 500,
+        C_CXX_STATIC = 44 + 500,
+        C_CXX_STATICCAST = 45 + 500,
+        C_CXX_STRUCT = 46 + 500,
+        C_CXX_SWITCH = 47 + 500,
+        C_CXX_TEMPLATE = 48 + 500,
+        C_CXX_THIS = 49 + 500,
+        C_CXX_THROW = 50 + 500,
+        C_CXX_TRY = 51 + 500,
+        C_CXX_TRUE = 52 + 500,
+        C_CXX_TYPEDEF = 53 + 500,
+        C_CXX_TYPEID = 54 + 500,
+        C_CXX_TYPENAME = 55 + 500,
+        C_CXX_UNION = 56 + 500,
+        C_CXX_UNSIGNED = 57 + 500,
+        C_CXX_USING = 58 + 500,
+        C_CXX_VIRTUAL = 59 + 500,
+        C_CXX_VOID = 60 + 500,
+        C_CXX_VOLATILE = 61 + 500,
+        C_CXX_WCHART = 62 + 500,
+        C_CXX_WHILE = 63 + 500
+   };
+
+      //the following are alternate tokens.
+      //Refer to page 12 of C++ STD
+
+enum ROSE_C_CXX_alternate_tok
+    {
+        C_CXX_LEFT_CURLY_ALT, // The <% which is the same as {
+        C_CXX_RIGHT_CURLY_ALT, //The %> which is the same as }
+        C_CXX_LEFT_SQUARE_ALT, //The <: which is the same as [
+        C_CXX_RIGHT_SQUARE_ALT,//The :> which is the same as ]
+        C_CXX_HASH_ALT, // The #
+        C_CXX_HASH_HASH_ALT, // The 
+        C_CXX_and_ALT, // The #
+    };
+
+enum ROSE_C_CXX_Additional_Info
+{
+      C_CXX_COMMENTS = 0 + 100000,
+      C_CXX_STRING_LITERALS = 1 + 100000,
+      C_CXX_IDENTIFIER = 2 + 100000,
+      C_CXX_UNIDENTIFIED_TOKEN = 3 + 100000,
+      C_CXX_ERROR = 4 + 100000
+};
+
+
+
+};
+
+using namespace ROSE_token_ids;
+
+token_element ROSE_C_CXX_keyword_map[] = 
+{
+        {"asm",              C_CXX_ASM }, 
+        {"auto",             C_CXX_AUTO },
+        {"bool",             C_CXX_BOOL },
+        {"break",            C_CXX_BREAK },
+        {"case",             C_CXX_CASE },
+        {"catch",            C_CXX_CATCH },
+        {"char",             C_CXX_CHAR },
+        {"class",            C_CXX_CLASS },
+        {"const",            C_CXX_CONST },
+        {"const_cast",       C_CXX_CONSTCAST },
+        {"continue",         C_CXX_CONTINUE },
+        {"default",          C_CXX_DEFAULT },
+        //{"defined",        C_CXX_DEFINED },
+        {"delete",           C_CXX_DELETE },
+        {"do",               C_CXX_DO },
+        {"double",           C_CXX_DOUBLE },
+        {"dynamic_cast",     C_CXX_DYNAMICCAST },
+        {"else",             C_CXX_ELSE },
+        {"enum",             C_CXX_ENUM },
+        {"explicit",         C_CXX_EXPLICIT },
+        {"export",           C_CXX_EXPORT },
+        {"extern",           C_CXX_EXTERN },
+        {"false",            C_CXX_FALSE },
+        {"float",            C_CXX_FLOAT },
+        {"for",              C_CXX_FOR },
+        {"friend",           C_CXX_FRIEND },
+        {"goto",             C_CXX_GOTO },
+        {"if",               C_CXX_IF },
+        {"inline",           C_CXX_INLINE },
+        {"int",              C_CXX_INT },
+        {"long",             C_CXX_LONG },
+        {"mutable",          C_CXX_MUTABLE },
+        {"namespace",        C_CXX_NAMESPACE },
+        {"new",              C_CXX_NEW },
+        {"operator",         C_CXX_OPERATOR },
+        {"private",          C_CXX_PRIVATE },
+        {"protected",        C_CXX_PROTECTED },
+        {"public",           C_CXX_PUBLIC },
+        {"register",         C_CXX_REGISTER },
+        {"reinterpret_cast", C_CXX_REINTERPRETCAST },
+        {"return",           C_CXX_RETURN },
+        {"short",            C_CXX_SHORT },
+        {"signed",           C_CXX_SIGNED },
+        {"sizeof",           C_CXX_SIZEOF },
+        {"static",           C_CXX_STATIC },
+        {"static_cast",      C_CXX_STATICCAST },
+        {"struct",           C_CXX_STRUCT },
+        {"switch",           C_CXX_SWITCH },
+        {"template",         C_CXX_TEMPLATE },
+        {"this",             C_CXX_THIS },
+        {"throw",            C_CXX_THROW },
+        {"true",             C_CXX_TRUE },
+        {"try",              C_CXX_TRY },
+        {"typedef",          C_CXX_TYPEDEF },
+        {"typeid",           C_CXX_TYPEID },
+        {"typename",         C_CXX_TYPENAME },
+        {"union",            C_CXX_UNION },
+        {"unsigned",         C_CXX_UNSIGNED },
+        {"using",            C_CXX_USING },
+        {"virtual",          C_CXX_VIRTUAL },
+        {"void",             C_CXX_VOID },
+        {"volatile",         C_CXX_VOLATILE },
+        {"wchar_t",          C_CXX_WCHART },
+        {"while",            C_CXX_WHILE }
+};
+
+
+
+//We know that this is a magic number. 
+//We also know how to fix it.
+#define NUM_C_CXX_KEYWORDS 63
+
+//returns -1 if the string is not a keyword
+//otherwise returns the token ID
+int identify_if_C_CXX_keyword(std::string str)
+{
+    //In FORTRAN, the identifiers are case insensitive.
+    //So, variable 'ArEa' is the same as 'aReA'
+
+    string lowered_str;
+    for(unsigned int i = 0; i < str.size(); i++)
+    {
+        lowered_str += (unsigned char)tolower(str[i]);
+    }
+
+    //printf("got called with %s. Converted to %s\n", str.c_str(), lowered_str.c_str());
+    for(int i = 0; i < NUM_C_CXX_KEYWORDS; i++)
+    {
+        if(lowered_str == ROSE_C_CXX_keyword_map[i].token_lexeme)
+        {
+            return (ROSE_C_CXX_keyword_map[i].token_id);
+        }
+    }
+    return -1;
+}
+
+
+
+//#endif
+
+
+
+#include "sage3.h"
+
+// DQ (11/17/2004): Avoid compiler warning about unused function
+#define YY_NO_UNPUT
+
+#ifdef BOOL_IS_BROKEN
+// If BOOL_IS_BROKEN then we can assume that there is no definition for "true" and "false"
+#ifndef false
+#define false 0
+#endif
+#ifndef true
+#define true  1
+#endif
+#ifndef bool
+typedef int bool;
+#endif
+#endif
+
+#ifndef ROSE_ASSERT
+#define ROSE_ASSERT assert
+#endif
+
+#include "rose_attributes_list.h"
+#define yytext Rose_C_Cxx_text
+#define yylex  Rose_C_Cxx_lex
+
+#define HANDLEMACROSTART preproc_start_line_num=preproc_line_num; preproc_start_column_num=1; preproc_column_num+=strlen(yytext); macroString = yytext; BEGIN MACRO;
+
+int i = 0;
+
+std::string commentString;
+std::string macroString;
+//remove these _st's later
+std::stack<int> curly_brace_stack_st;
+std::stack<int> parenthesis_stack;
+std::stack<int> square_bracket;
+
+//All the above should be "matching constructs"
+//create new for various casts and templates
+
+
+// DQ (4/19/2006):
+// Store the name of the current file so that we can generate Sg_File_Info objects
+// for each comment.  Later we might want starting and ending fileInfo for each 
+// comments and CPP directive.
+std::string globalFileName;
+
+int curr_brace_depth=0;
+int ls_startingline_no; 
+int ls_startingpreproc_column_num; 
+int brace_counting_on=0;
+PreprocessingInfo::DirectiveType macrotype = PreprocessingInfo::CpreprocessorUnknownDeclaration;
+
+int topcurlybracestack();
+void pushbracestack(int);
+int popbracestack();
+bool isemptystack();
+
+int num_of_newlines(char*);
+
+ROSEAttributesList preprocessorList;
+
+// DQ (10/30/2005): Changed
+// string			\"([^"]|"\\\""|"\\\n")*\"
+// to 
+// string			\"([^"]|"\\\n")*\"
+// to fix test2005_184.C (use of "\\" in string caused following 
+// macros to be ignored until a double quote (e.g. ") was found).
+
+// DQ (6/25/2006): This was the value before I tried the previous value
+// string			\"([^"]|"\\\n")*\"
+// I tried:
+// string			\"([^"]|"\\n")*\"
+// and: 
+// string			\"([^"]|"\\\\n")*\"
+// This however didn't make any difference, so I restored it it it previous value!
+
+// DQ (6/25/2006): What did fix the problem with continuation chars in C++ comments was changing
+// "<CXX_COMMENT>\\\n {" to "<CXX_COMMENT>\\\\n {"
+
+//add stuff for char literals???????????
+
+/*
+whitespacenl           	[\t\n ]+
+whitespace      	[\t ]+
+lineprefix		^{whitespace}*"#"{whitespace}*
+macrokeyword 		"include"|"define"|"undef"|"line"|"error"|"warning"|"if"|"ifdef"|"ifndef"|"elif"|"else"|"endif"
+mlinkagespecification	^{whitespace}*"extern"{whitespace}*(("\"C\"")|("\"C++\"")){whitespacenl}*"{"
+string			\"([^"]|"\\\n")*\"
+*/
+
+//refresher: blank and space function exactly as the STDLIB functions isblank and isspace respectively.
+//blank matches only the various blank characters (\b,\t). It does NOT match new line. (and its variants).
+//space matches blanks, newlines (various flavours like formfeed etc) as well as other stuff like vertical tab '\v' etc.
+//refer to http://www.gatago.com/comp/std/c/18426853.html among others for difference between these two.
+/*
+The following was the original 
+whitespacenl           	[\t\n ]+
+whitespace      	[\t ]+
+
+I changed it to
+whitespacenl           	[:space:]+
+whitespace      	[:blank:]+
+This does not work.
+
+What worked was the following:
+whitespacenl           	[[:space:]]+
+whitespace      	[[:blank:]]+
+
+*/
+
+/*
+I am not sure if the whitespacenl would count the number of newlines in code that has backslashes properly.
+*/
+%}
+whitespacenl           	[[:space:]]+
+whitespace      	[[:blank:]]+
+lineprefix		^{whitespace}*"#"{whitespace}*
+macrokeyword 		"include"|"define"|"undef"|"line"|"error"|"warning"|"if"|"ifdef"|"ifndef"|"elif"|"else"|"endif"
+mlinkagespecification	^{whitespace}*"extern"{whitespace}*(("\"C\"")|("\"C++\"")){whitespacenl}*"{"
+string			\"([^"]|"\\\n")*\"
+%s NORMAL CXX_COMMENT C_COMMENT STRING_LIT MACRO C_COMMENT_INMACRO
+%%
+%{
+int preproc_line_num = 1;
+	/*bad way to initialize*/
+int preproc_start_line_num = preproc_line_num;
+int preproc_column_num = 1;
+int preproc_start_column_num = preproc_column_num;
+			/*Do we need this  ???*/
+BEGIN NORMAL;
+%}
+<NORMAL>{mlinkagespecification} { 
+				    preprocessorList.addElement(PreprocessingInfo::ClinkageSpecificationStart, 
+					    yytext,globalFileName,preproc_line_num,preproc_column_num,0); 
+				    preproc_line_num+=num_of_newlines(yytext); 
+				    preproc_column_num+=strlen(yytext); 
+
+				    curr_brace_depth++; 
+				    pushbracestack(curr_brace_depth);
+                                }
+	/*Handle the braces (left and right). Push and Pop the bracestack accordingly*/
+<NORMAL>"{"	{ 
+		    if(!isemptystack()) 
+		    { 
+			/* we only count braces within a linkage specification. */ 
+			curr_brace_depth++; 
+		    } 
+		    //printf("Ram: found left brace at preproc_line_num = %d, preproc_column_num = %d\n", preproc_line_num, preproc_column_num);
+		    preproc_column_num++; 
+                }
+
+<NORMAL>"}"     { 
+		    if(!isemptystack()) 
+		    { 
+			if(curr_brace_depth==topcurlybracestack()) 
+			{ 
+			    popbracestack(); 
+			    preprocessorList.addElement(PreprocessingInfo::ClinkageSpecificationEnd, 
+							    yytext, globalFileName, preproc_line_num, preproc_column_num, 0); 
+			}
+			curr_brace_depth--; 
+		    } 
+		    //printf("Ram: found right brace at preproc_line_num = %d, preproc_column_num = %d\n", preproc_line_num, preproc_column_num);
+		    preproc_column_num++; 
+		}
+
+<NORMAL>"("	{ 
+		    /*if(!isemptystack()) 
+		    { 
+			//we only count braces within a linkage specification. 
+			curr_brace_depth++; 
+		    }
+                    */
+		    preproc_column_num++; 
+                }
+
+<NORMAL>")"     { 
+		    /*
+		    if(!isemptystack()) 
+		    { 
+			if(curr_brace_depth==topcurlybracestack()) 
+			{ 
+			    popbracestack(); 
+			    preprocessorList.addElement(PreprocessingInfo::ClinkageSpecificationEnd, 
+							    yytext, globalFileName, preproc_line_num, preproc_column_num, 0); 
+			}
+			curr_brace_depth--; 
+		    } 
+		    */
+		    preproc_column_num++; 
+		}
+
+<NORMAL>[a-zA-Z_][a-zA-Z0-9_]*       {
+
+                                          token_element *p_tok_elem = new token_element;
+                                          p_tok_elem->token_lexeme = yytext;
+
+                                          int is_keyword = identify_if_C_CXX_keyword(yytext);
+                                          //found a keyword?
+                                          if(is_keyword != -1)
+                                          {   
+                                              //printf("%s is a keyword\n", yytext); 
+                                              p_tok_elem->token_id = is_keyword;
+                                          }
+                                          else
+                                          {   
+                                              //printf("%s is not a keyword\n", yytext); 
+                                              p_tok_elem->token_id = C_CXX_IDENTIFIER;
+                                          }
+
+                                          stream_element *p_se = new stream_element;
+                                          p_se->p_tok_elem = p_tok_elem;
+
+                                          /*
+                                          p_se->beginning_fpi.line_num = preproc_column_num;
+                                          p_se->beginning_fpi.column_num = preproc_column_num;
+                                          preproc_column_num+=strlen(yytext);
+                                          p_se->ending_fpi.line_num = preproc_line_num;
+                                          p_se->ending_fpi.column_num = preproc_column_num-1;
+                                          //push the element onto the token stream
+                                          */
+                                          ROSE_token_stream_pointer->push_back(p_se);
+                                    }
+<NORMAL>"\""    { 
+		}
+	/*begin handling the C++ style comments. */
+<NORMAL>"\/\/" 	{
+		    /*Handle the C comments.*/ 
+		    preproc_start_line_num=preproc_line_num; 
+		    preproc_start_column_num=preproc_column_num; 
+		    preproc_column_num+=2; 
+		    commentString = yytext; 
+		    BEGIN CXX_COMMENT;
+ 		}
+
+	/*The normal mode actions. Handle the preprocessor stuff and anyother characters. */
+	/*Do we need the backslash character?????????????*/
+<NORMAL>"/*" 	{
+		    preproc_start_line_num=preproc_line_num; 
+		    preproc_start_column_num=preproc_column_num; 
+		    preproc_column_num+=strlen(yytext);
+		    
+		    //copy the comment to commentString 
+		    commentString = yytext; 
+		    BEGIN C_COMMENT; 
+		}
+    /*These are the alternative tokens. Refer to page 12 of C++ std to understand their representation*/
+                  /*<NORMAL>"<%"     {curr_token = ALT_LEFT_CURLY; do_yytext_bookeeping(); }
+<NORMAL>"<%"     { }
+                       */
+
+
+
+
+<NORMAL>"static_cast"	{ 
+		    /*
+		    if(!isemptystack()) 
+		    { 
+			//we only count braces within a linkage specification. 
+			curr_brace_depth++; 
+		    
+			*/
+		    preproc_column_num++; 
+                }
+
+
+<NORMAL>{lineprefix}"include"	{ macrotype=PreprocessingInfo::CpreprocessorIncludeDeclaration; HANDLEMACROSTART }
+<NORMAL>{lineprefix}"define" 	{ macrotype=PreprocessingInfo::CpreprocessorDefineDeclaration; HANDLEMACROSTART }
+<NORMAL>{lineprefix}"undef" 	{ macrotype=PreprocessingInfo::CpreprocessorUndefDeclaration; HANDLEMACROSTART }
+<NORMAL>{lineprefix}"line" 	{ macrotype=PreprocessingInfo::CpreprocessorLineDeclaration; HANDLEMACROSTART }
+<NORMAL>{lineprefix}"error" 	{ macrotype=PreprocessingInfo::CpreprocessorErrorDeclaration; HANDLEMACROSTART }
+<NORMAL>{lineprefix}"if" 	{ macrotype=PreprocessingInfo::CpreprocessorIfDeclaration; HANDLEMACROSTART }
+<NORMAL>{lineprefix}"ifdef" 	{ macrotype=PreprocessingInfo::CpreprocessorIfdefDeclaration; HANDLEMACROSTART }
+<NORMAL>{lineprefix}"ifndef" 	{ macrotype=PreprocessingInfo::CpreprocessorIfndefDeclaration; HANDLEMACROSTART }
+<NORMAL>{lineprefix}"elif" 	{ macrotype=PreprocessingInfo::CpreprocessorElifDeclaration; HANDLEMACROSTART }
+<NORMAL>{lineprefix}"else" 	{ macrotype=PreprocessingInfo::CpreprocessorElseDeclaration; HANDLEMACROSTART }
+<NORMAL>{lineprefix}"endif" 	{ macrotype=PreprocessingInfo::CpreprocessorEndifDeclaration; HANDLEMACROSTART }
+<NORMAL>{lineprefix}"warning"   { macrotype=PreprocessingInfo::CpreprocessorWarningDeclaration; HANDLEMACROSTART }
+	/*Add code here to attach the whitespace before newlines (and general lineprefix code) */
+<NORMAL>\n			{ preproc_line_num++; preproc_column_num=1; } 
+		/*<NORMAL>{string}		{ / *???IS THIS RIGHT???* / preproc_line_num+=num_of_newlines(yytext); preproc_column_num+=strlen(yytext); }*/
+<NORMAL>"\""		        { /*preproc_line_num+=num_of_newlines(yytext);*/ preproc_column_num+=strlen(yytext); BEGIN STRING_LIT;}
+			    /*<NORMAL>"\'"		        { preproc_line_num+=num_of_newlines(yytext); preproc_column_num+=strlen(yytext); BEGIN CHAR_LIT;}*/
+                            /*<NORMAL>"'"		        { preproc_line_num+=num_of_newlines(yytext); preproc_column_num+=strlen(yytext); BEGIN CHAR_LIT;}*/
+<NORMAL>.			{ preproc_column_num++; }
+	/*Actions for a string literal.*/
+<STRING_LIT>[^\\"\n]	{/*eat anything that is not a newline or a backslash or a doublequote*/ preproc_column_num+=strlen(yytext); }
+<STRING_LIT>\\[^\"\n]	{/*if the backslash is followed by anything other than a newline or doublequote, eat them. */ preproc_column_num+=strlen(yytext); }
+<STRING_LIT>\\\"	{/*if a backslash preceeds the doublequote, eat both.*/ preproc_column_num+=strlen(yytext); }
+<STRING_LIT>\\\n	{/*if a backslash preceeds the newline, eat both, donot increment preproc_line_num.*/ preproc_column_num+=strlen(yytext); }
+<STRING_LIT>\"		{ /* if it is a doublequote, end the STRING_LIT state.*/ BEGIN NORMAL; }
+<STRING_LIT>\n		{ /* count the newlines */ preproc_line_num++; }
+	/*Actions for a C++ style comment.*/
+<CXX_COMMENT>[^\\\n]	{ /* eat anything that is not a backslash or a newline*/ commentString += yytext;}
+<CXX_COMMENT>\\[^\n]	{ 
+			    /*eat up backslashes not immdediately followed by newlines*/ 
+			    commentString += yytext;
+			    /*fix the preproc_column_num at other places ????????????????????  ??????????????*/ 
+			    preproc_column_num=1; 
+			}
+
+<CXX_COMMENT>\\\n	{ 
+			    /*if backslash is followed by a newline, then eat them (backslash, newline) up, increment preproc_line_num and continue*/ 
+			    commentString += yytext;
+			    preproc_line_num++; 
+}
+<CXX_COMMENT>\n		{
+			    preproc_line_num++; preproc_column_num=1; 
+			    commentString += yytext;
+			    preprocessorList.addElement(PreprocessingInfo::CplusplusStyleComment, 
+				    commentString,globalFileName, preproc_start_line_num, preproc_start_column_num,preproc_line_num-preproc_start_line_num); 
+
+			    BEGIN NORMAL; 
+			}
+	/*Actions while in a C style comment.*/
+<C_COMMENT>\n		{
+			    commentString += yytext;
+			    preproc_line_num++; 
+			    preproc_column_num=1; 
+			}
+<C_COMMENT>"*/"	{
+			    commentString += yytext;
+			    preproc_column_num+=strlen(yytext); 
+			    /*printf("hello Ram: The comment string is ####%s#############. It is of %d lines, the current line number is %d\n",
+				    commentString.c_str(), preproc_line_num-preproc_start_line_num+1, preproc_line_num);
+				    */
+			    preprocessorList.addElement(PreprocessingInfo::C_StyleComment,commentString,globalFileName,preproc_start_line_num,preproc_start_column_num,preproc_line_num-preproc_start_line_num+1); 
+			    BEGIN(NORMAL); 
+			}
+<C_COMMENT>. 	{ 
+		    commentString += yytext;
+		    preproc_column_num++; 
+		}
+
+	/*Actions while in a MACRO.*/
+<MACRO>\\\n	{ 
+		    macroString += yytext;
+		    preproc_line_num++; 
+		    preproc_column_num=1;
+		}
+<MACRO>\n 	{
+		    macroString += yytext;
+		    preproc_line_num++; 
+		    preproc_column_num=1; 
+		    
+		    preprocessorList.addElement(macrotype,macroString,globalFileName,preproc_start_line_num,preproc_start_column_num,preproc_line_num-preproc_start_line_num); 
+		    BEGIN NORMAL; 
+		}
+<MACRO>"\/*" 	{
+		    //does this cover all cases?????????
+		    preproc_column_num+=2; 
+		    macroString += yytext;
+
+		    /*
+				//Do we need to do something like this?
+		                commentString = yytext;
+		    */
+		    BEGIN C_COMMENT_INMACRO;
+		}
+<MACRO>.	{ 
+		    macroString += yytext;
+		    preproc_column_num++; 
+		}
+<C_COMMENT_INMACRO>"*/"   { 
+				//??????????????????????????????????????????????????????????????
+				//This code copies the comment into the macrobuffer.
+				//Should we not copy it to comment buffer also?????
+				macroString += yytext;
+
+				/*
+				commentString += yytext;
+				//should we do something like this??
+				preprocessorList.addElement(PreprocessingInfo::C_StyleComment,commentString.c_str(),globalFileName,preproc_start_line_num,preproc_start_column_num,preproc_line_num-preproc_start_line_num); 
+				*/
+				preproc_column_num+=strlen(yytext); 
+				BEGIN MACRO; 
+			    }
+<C_COMMENT_INMACRO>\n	    { 
+				macroString += yytext;
+
+				//Do we need to do something like this?
+				//commentString += yytext;
+
+				preproc_line_num++; preproc_column_num=1; 
+			    }
+<C_COMMENT_INMACRO>.	    { 
+				macroString += yytext;
+
+				//Do we need to do something like this?
+				//commentString += yytext;
+
+				preproc_column_num++; 
+			    }
+%%
+
+const int maxstacksize=500;
+int bracestack[maxstacksize];
+
+int top=0;
+void pushbracestack(int brace_no) { bracestack[top++]=brace_no; }
+int topcurlybracestack() { if(top) return bracestack[top-1]; else return -1; }
+int popbracestack() { return bracestack[--top]; }
+bool isemptystack() { return top==0; }
+
+int num_of_newlines(char* s)
+{
+     int num = 0;
+     while(*s != '\0')
+        {
+          if(*s == '\n')
+               num++;
+          s++;
+        }
+     return num;
+}
+
+// DQ (3/30/2006): Modified to use C++ style string instead of C style char* string
+// ROSEAttributesList *getPreprocessorDirectives( char *fileName)
+//! This function extracts the comments and CPP preprocessor control directives from the input file.
+// ROSEAttributesList *getPreprocessorDirectives( std::string fileName )
+// ROSEAttributesList *getPreprocessorDirectives( std::string fileName, LexTokenStreamTypePointer & input_token_stream_pointer )
+ROSEAttributesList *getPreprocessorDirectives( std::string fileName )
+   {
+     FILE *fp = NULL;
+     ROSEAttributesList *preprocessorInfoList = new ROSEAttributesList; // create a new list
+     ROSE_ASSERT (preprocessorInfoList != NULL);
+
+  // printf ("Inside of lex file: getPreprocessorDirectives() \n");
+  // ROSE_ASSERT(false);
+
+  // assert(input_token_stream_pointer == NULL);
+     ROSE_token_stream_pointer = new LexTokenStreamType;
+     assert(ROSE_token_stream_pointer != NULL);
+
+  // Share a pointer to the same LexTokenStreamType just allocated
+  // input_token_stream_pointer = ROSE_token_stream_pointer;
+  // assert(input_token_stream_pointer != NULL);
+
+  // Attach the token stream to the ROSEAttributesList being returned.
+     preprocessorInfoList->set_rawTokenStream(ROSE_token_stream_pointer);
+
+  // Set the global filename to be used in the PreprocessingInfo constructor.
+     globalFileName = fileName;
+
+     if ( fileName.empty() == false )
+        {
+	  std::map<std::string,std::vector<PreprocessingInfo*>* >::iterator iItr= 
+		  mapFilenameToAttributes.find(fileName);
+	  //std::cout << "Trying to find fileName " << fileName << std::endl;
+          if ( iItr != mapFilenameToAttributes.end())
+             {
+                     //std::cout << "Found requested file: " << fileName << " size: " << iItr->second->size() << std::endl; 
+	       for(std::vector<PreprocessingInfo*>::iterator jItr = iItr->second->begin(); 
+			       jItr != iItr->second->end(); ++jItr){
+		     //std::cout << "Inserting element" <<  (*jItr)->getString() << std::endl;
+                     preprocessorInfoList->insertElement(**jItr);
+
+	       }
+
+             }
+          else{
+            fp = fopen( fileName.c_str(), "r");
+            if (fp)
+            {
+              yyin = fp;
+              yylex();
+
+              // Writes all gathered information to stdout
+              // preprocessorList.display("TEST Collection of Comments and CPP Directives");
+
+              // bugfix (9/29/2001)
+              // The semantics required here is to move the elements accumulated into the
+              // preprocessorList into the preprocessorInfoList and delete them from the
+              // preprocessorList (which will be used again to accumulate PreprocessingInfo objects
+              // when the next file is processed).  We have to be able to process several files using
+              // this getPreprocessorDirectives() function.
+              preprocessorInfoList->moveElements( preprocessorList ); // create a copy that we can pass on
+
+              // The accumulator list should now be empty
+              assert (preprocessorList.getLength() == 0);
+              fclose(fp);  
+            }
+            else
+            {
+              // DQ (5/14/2006): Added error checking for collection of comments and CPP directives.
+              printf ("Error: can't find the requested file (%s) \n",fileName.c_str());
+              // ROSE_ASSERT(false);
+            }
+          }
+
+        }
+
+  // printf ("In getPreprocessorDirectives(fileName = %s): preprocessorInfoList->size() = %d \n",fileName.c_str(),(int)preprocessorInfoList->size());
+
+     return preprocessorInfoList;
+   }

Modified: branches/testonly/src/frontend/SageIII/rtiHelpers.h
===================================================================
--- branches/testonly/src/frontend/SageIII/rtiHelpers.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/rtiHelpers.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -71,7 +71,7 @@
      ss << "[";
 
      printf ("Warning: SgSharedVector iterator support is not finished! \n");
-     ROSE_ASSERT(false);
+     // ROSE_ASSERT(false);
 
   // for (typename std::vector<T>::const_iterator i = x.begin(); i != x.end(); ++i) {if (i != x.begin()) ss << ", "; ss << (*i);}
 
@@ -114,8 +114,27 @@
   return ss.str();
 }
 
+#if 0
+static std::string toStringForRTI(const std::map<std::pair<int,std::pair<int,int> >, uint64_t > & x) {
+  std::ostringstream ss;
+  ss << "[";
+// for (std::vector<bool>::const_iterator i = x.begin(); i != x.end(); ++i) {if (i != x.begin()) ss << ", "; ss << (*i ? "T" : "F");}
+  ss << "]";
+  return ss.str();
+}
+#endif
 
 #if 0
+static std::string toStringForRTI(const std::map<uint64_t ,std::pair<int,std::pair<int,int> > > & x) {
+  std::ostringstream ss;
+  ss << "[";
+// for (std::vector<bool>::const_iterator i = x.begin(); i != x.end(); ++i) {if (i != x.begin()) ss << ", "; ss << (*i ? "T" : "F");}
+  ss << "]";
+  return ss.str();
+}
+#endif
+
+#if 0
 #if !OLD_GRAPH_NODES
 // DQ (8/18/2008): Added support for new Graph IR node.
 static std::string toStringForRTI(const SgGraphNodeDirectedGraphEdgeMultimapPtrList & x)

Modified: branches/testonly/src/frontend/SageIII/sage3.h
===================================================================
--- branches/testonly/src/frontend/SageIII/sage3.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/sage3.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -165,6 +165,7 @@
 #include <stack>
 #include <vector>
 #include <string>
+#include <cstdlib>
 
 // Include ROSE common utility function library
 #include "string_functions.h"
@@ -178,9 +179,9 @@
 #ifndef NDEBUG
 #define ROSE_ASSERT assert
 #else // We use assert(false) equivalents so often for "should not get here", but we don't want nontrivial side effects in asserts to be run when assert is disabled
-#define ROSE_ASSERT(x) do {if (__builtin_constant_p(x)) {if (x) {} else abort();}} while (0)
+#define ROSE_ASSERT(x) do {if (__builtin_constant_p(x)) {if (x) {} else (std::abort)();}} while (0)
 #endif
-#define ROSE_ABORT  abort
+#define ROSE_ABORT  (std::abort)
 
 // DQ (3/29/2006): I sure would like to remove this since it 
 // has a potential to effect other files from other projects
@@ -274,6 +275,12 @@
 #include "abstract_handle.h"
 #include "roseAdapter.h"
 
+// Liao, 11/14/2008, support for annotation-based array optimization
+// The headers bring some garbage which cannot be compiled
+//#include "ArrayAnnot.h"
+//#include "ArrayInterface.h"
+//include "ArrayRewrite.h"
+
 // DQ (5/27/2007): Removed all entries in this file (only had AST Merge API and 
 // these were moved to merge.h).  One less header file make everything a little simpler!
 // DQ (7/7/2005): This is now a file where temporary functions may be

Modified: branches/testonly/src/frontend/SageIII/sageInterface/Makefile.am
===================================================================
--- branches/testonly/src/frontend/SageIII/sageInterface/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/sageInterface/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -5,6 +5,7 @@
 noinst_LTLIBRARIES = libsageInterface.la
 libsageInterface_la_SOURCES      = \
      sageInterface.C \
+     sageInterface_asm.C \
      sageInterface_type.C \
      generateUniqueName.C \
      sageBuilder.C \
@@ -22,6 +23,7 @@
      sageBuilder.h \
      sageBuilderAsm.h \
      endianWrappers.h \
+     integerOps.h \
      abiStuff.h
 #     highLevelInterface.h
 #     loopHelpers.h 

Copied: branches/testonly/src/frontend/SageIII/sageInterface/integerOps.h (from rev 128, trunk/src/frontend/SageIII/sageInterface/integerOps.h)
===================================================================
--- branches/testonly/src/frontend/SageIII/sageInterface/integerOps.h	                        (rev 0)
+++ branches/testonly/src/frontend/SageIII/sageInterface/integerOps.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,103 @@
+#ifndef ROSE_INTEGEROPS_H
+#define ROSE_INTEGEROPS_H
+
+#include <limits>
+#include <boost/static_assert.hpp>
+
+namespace IntegerOpsPrivate {
+
+  template <typename T>
+  struct NumBits {
+    BOOST_STATIC_ASSERT (std::numeric_limits<T>::radix == 2);
+    BOOST_STATIC_ASSERT (std::numeric_limits<T>::is_integer);
+    static const size_t value = std::numeric_limits<T>::digits;
+  };
+
+  template <typename T, size_t Count, bool TooBig> struct SHL1Helper;
+  template <typename T, size_t Count>
+  struct SHL1Helper<T, Count, true> {
+    static const T value = 0;
+  };
+  template <typename T, size_t Count>
+  struct SHL1Helper<T, Count, false> {
+    static const T value = T(1) << Count;
+  };
+
+}
+
+namespace IntegerOps {
+
+// 1 << x, handling the case where x is >= the number of bits in T
+template <typename T, size_t Count>
+struct SHL1: public IntegerOpsPrivate::SHL1Helper<T, Count, (Count >= IntegerOpsPrivate::NumBits<T>::value)> {};
+
+// 1 << x, handling the case where x is >= the number of bits in T
+template <typename T>
+inline T shl1(size_t count) {
+  return (count >= IntegerOpsPrivate::NumBits<T>::value) ? T(0) : (T(1) << count);
+}
+
+// Set rightmost (from LSB) count bits of result, clear others
+template <typename T, size_t Count>
+struct GenMask {
+  static const T value = SHL1<T, Count>::value - T(1);
+};
+
+template <typename T>
+inline T genMask(size_t count) {
+  return shl1<T>(count) - 1;
+}
+
+template <size_t NBits, typename T>
+inline bool signBit(T value) {
+  return (value & SHL1<T, NBits - 1>::value) != T(0);
+}
+
+template <size_t FromBits, size_t ToBits, typename T>
+inline T signExtend(T value) {
+  return value | (signBit<FromBits>(value) ? (GenMask<T, ToBits>::value ^ GenMask<T, FromBits>::value) : T(0));
+}
+
+template <size_t NBits, typename T>
+inline T shiftLeft(T value, size_t count) {
+  return (value * shl1<T>(count)) & GenMask<T, NBits>::value;
+};
+
+template <size_t NBits, typename T>
+inline T shiftRightLogical(T value, size_t count) {
+  return (count >= NBits) ? T(0) : (value >> count);
+}
+
+template <size_t NBits, typename T>
+inline T shiftRightArithmetic(T value, size_t count) {
+  if (count >= NBits) {
+    return signBit<NBits>(value) ? GenMask<T, NBits>::value : T(0);
+  } else {
+    return shiftRightLogical<NBits>(value, count) |
+           (signBit<NBits>(value) ? (GenMask<T, NBits>::value ^ genMask<T>(NBits - count)) : T(0));
+  }
+}
+
+template <size_t NBits, typename T>
+inline T rotateLeft(T value, size_t count) {
+  count %= NBits;
+  return ((value << count) | (value >> (NBits - count))) & GenMask<T, NBits>::value;
+}
+
+template <size_t NBits, typename T>
+inline T rotateRight(T value, size_t count) {
+  count %= NBits;
+  return ((value >> count) | (value << (NBits - count))) & GenMask<T, NBits>::value;
+}
+
+template <typename T>
+inline T log2(T a) {
+  T n = T(1);
+  T i = 0;
+  while (n != 0 && n < a) {n <<= 1; ++i;}
+  return i;
+}
+
+} // namespace IntegerOps
+
+#endif // ROSE_INTEGEROPS_H

Modified: branches/testonly/src/frontend/SageIII/sageInterface/sageBuilder.C
===================================================================
--- branches/testonly/src/frontend/SageIII/sageInterface/sageBuilder.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/sageInterface/sageBuilder.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1993,8 +1993,12 @@
 
    // DQ (9/3/2008): Added support for SgSourceFile IR node
    // SgFile* result = new SgFile (arglist, nextErrorCode, 0, project);
-      SgSourceFile* result = new SgSourceFile (arglist, nextErrorCode, 0, project);
-
+      //AS(10/04/08) Because of refactoring we require the determineFileType function to be called 
+      //to construct the node. 
+      //SgSourceFile* result = new SgSourceFile (arglist, nextErrorCode, 0, project);
+      SgSourceFile* result = isSgSourceFile(determineFileType(arglist, nextErrorCode, project));
+      
+      
       ROSE_ASSERT(result!=NULL);
       result->set_parent(project);
       project->set_file(*result); 

Modified: branches/testonly/src/frontend/SageIII/sageInterface/sageInterface.C
===================================================================
--- branches/testonly/src/frontend/SageIII/sageInterface/sageInterface.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/sageInterface/sageInterface.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -33,6 +33,7 @@
      return string(roseGlobalVariantNameList[v]);
    }
 
+
 SgNamespaceDefinitionStatement*
 SageInterface::enclosingNamespaceScope( SgDeclarationStatement* declaration )
    {
@@ -169,6 +170,23 @@
      return foundExistingPrototype;
    }
 
+bool
+SageInterface::isAncestor (SgNode* node1, SgNode* node2)   
+{
+  ROSE_ASSERT(node1&&node2);
+  SgNode* curnode= node2;
+  if (node1==node2)
+    return false;
+  do {
+      curnode= curnode->get_parent();
+  } while( (curnode!=NULL)&&(curnode!=node1));
+
+  if (curnode==node1)
+   return true;
+  else 
+    return false;
+}
+
 std::vector<SgNode*>
 SageInterface::astIntersection ( SgNode* original, SgNode* copy, SgCopyHelp* help )
    {
@@ -3019,6 +3037,23 @@
      return returnValue;
    }
 bool
+SageInterface::is_OpenMP_language()
+   {
+     bool returnValue = false;
+
+     vector<SgFile*> fileList = generateFileList();
+
+     int size = (int)fileList.size();
+     for (int i = 0; i < size; i++)
+        {
+          if (fileList[i]->get_openmp() == true)
+               returnValue = true;
+        }
+
+     return returnValue;
+   }
+
+bool
 SageInterface::is_UPC_language()
    {
      bool returnValue = false;
@@ -6735,3 +6770,20 @@
   }
 
 
+// tps : 28 Oct 2008 - support for finding the main interpretation
+ SgAsmInterpretation* 
+ SageInterface::getMainInterpretation(SgAsmFile* file) {
+   SgAsmInterpretationPtrList& interps = file->get_interpretations();
+   if (interps.size()==1)
+     return interps[0];
+   SgAsmInterpretation* mainInt=NULL;
+   SgAsmInterpretationPtrList::iterator it = interps.begin();
+   for (;it!=interps.end();++it) {
+     mainInt = *it;
+     SgAsmGenericHeader* header = mainInt->get_header();
+     if (isSgAsmPEFileHeader(header))
+       break;
+   }
+   ROSE_ASSERT(mainInt);
+   return mainInt;
+ }

Modified: branches/testonly/src/frontend/SageIII/sageInterface/sageInterface.h
===================================================================
--- branches/testonly/src/frontend/SageIII/sageInterface/sageInterface.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/sageInterface/sageInterface.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,7 +1,12 @@
 #ifndef ROSE_SAGE_INTERFACE
 #define ROSE_SAGE_INTERFACE
 
+#include <stdint.h>
+
+
 #include "sage3.h"
+SgFile*                         determineFileType ( std::vector<std::string> argv, int nextErrorCode, SgProject* project );
+
 #include "rewrite.h"
 
 // DQ (7/20/2008): Added support for unparsing abitrary strings in the unparser.
@@ -68,6 +73,13 @@
 //! An internal counter for generating unique SgName
 extern int gensym_counter;
 
+// tps : 28 Oct 2008 - support for finding the main interpretation
+ SgAsmInterpretation* getMainInterpretation(SgAsmFile* file);
+
+ // Get the value of a disassembled constant
+ uint64_t getAsmConstant(SgAsmValueExpression* e);
+
+
 //------------------------------------------------------------------------
 //@{
 /*! @name Symbol tables
@@ -387,6 +399,7 @@
   /*! Brief These traverse the memory pool of SgFile IR nodes and determine what languages are in use!
    */
   bool is_C_language ();
+  bool is_OpenMP_language ();
   bool is_UPC_language ();
   //! Check if dynamic threads compilation is used for UPC programs
   bool is_UPC_dynamic_threads();
@@ -438,6 +451,8 @@
 			   SgFunctionDeclaration * functionDeclaration,
 			   SgDeclarationStatement * startingAtDeclaration);
 
+  //!check if node1 is an ancestor of node 2, mostly used to compare which scope node is in higher level
+  bool isAncestor(SgNode* node1, SgNode* node2);
 //@}
 //------------------------------------------------------------------------
 //@{
@@ -1039,7 +1054,6 @@
 //! Get the constant value from a constant integer expression; abort on
 //! everything else.  Note that signed long longs are converted to unsigned.
 unsigned long long getIntegerConstantValue(SgValueExp* expr);
-
 //@}
 
 

Copied: branches/testonly/src/frontend/SageIII/sageInterface/sageInterface_asm.C (from rev 128, trunk/src/frontend/SageIII/sageInterface/sageInterface_asm.C)
===================================================================
--- branches/testonly/src/frontend/SageIII/sageInterface/sageInterface_asm.C	                        (rev 0)
+++ branches/testonly/src/frontend/SageIII/sageInterface/sageInterface_asm.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,16 @@
+#include "rose.h"
+#include <stdint.h>
+#include <iostream>
+
+using namespace std;
+
+uint64_t SageInterface::getAsmConstant(SgAsmValueExpression* expr) {
+  switch (expr->variantT()) {
+    case V_SgAsmByteValueExpression: return isSgAsmByteValueExpression(expr)->get_value();
+    case V_SgAsmWordValueExpression: return isSgAsmWordValueExpression(expr)->get_value();
+    case V_SgAsmDoubleWordValueExpression: return isSgAsmDoubleWordValueExpression(expr)->get_value();
+    case V_SgAsmQuadWordValueExpression: return isSgAsmQuadWordValueExpression(expr)->get_value();
+    default: {cerr << "Bad variant " << expr->class_name() << " in getAsmConstant" << endl; abort();}
+  }
+}
+

Modified: branches/testonly/src/frontend/SageIII/sageSupport.C
===================================================================
--- branches/testonly/src/frontend/SageIII/sageSupport.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/sageSupport.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -4,6 +4,14 @@
 #include <sys/wait.h>
 #include <libgen.h>
 
+//FMZ (5/19/2008): 
+#ifdef USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+#include "FortranModuleInfo.h"
+#include "FortranParserState.h"
+#include "unparseFortran_modfile.h"
+#endif // USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+
+
 #ifdef HAVE_DLADDR
 #include <dlfcn.h>
 #endif
@@ -1112,22 +1120,32 @@
              }
         }
 
+//Liao 10/28/2008: I changed it to a more generic flag to indicate support for either Fortran or C/C++
   // DQ (8/19/2007): I have added the option here so that we can start to support OpenMP for Fortran.
   // Allows handling of OpenMP "!$omp" directives in free form and "c$omp", *$omp and "!$omp" directives in fixed form, enables "!$" conditional 
   // compilation sentinels in free form and "c$", "*$" and "!$" sentinels in fixed form and when linking arranges for the OpenMP runtime library 
   // to be linked in. (Not implemented yet).
-     set_fortran_openmp(false);
-     ROSE_ASSERT (get_fortran_openmp() == false);
-     if ( CommandlineProcessing::isOption(argv,"-","fopenmp",true) == true )
+     set_openmp(false);
+     ROSE_ASSERT (get_openmp() == false);
+     if ( CommandlineProcessing::isOption(argv,"-rose:","(OpenMP|openmp)",true) == true ) 
         {
           if ( SgProject::get_verbose() >= 1 )
-               printf ("Fortran OpenMP option specified \n");
-          set_fortran_openmp(true);
+               printf ("OpenMP option specified \n");
+          set_openmp(true);
+          /*
           if (get_sourceFileUsesFortranFileExtension() == false)
              {
                printf ("Warning, Non Fortran source file name specified with explicit OpenMP option! \n");
                set_fortran_openmp(false);
              }
+             */
+         //side effect for enabling OpenMP, define the macro as required 
+         //This new option does not reach the backend compiler
+         //But it is enough to reach EDG only.
+         //We can later on back end option to turn on their OpenMP handling flags, 
+         //like -fopenmp for GCC, depending on the version of gcc
+         //which will define this macro for GCC
+          argv.push_back("-D_OPENMP");
         }
 
   //
@@ -1320,13 +1338,30 @@
 
   // DQ (8/16/2008): parse binary executable file format only (some uses of ROSE may only do analysis of 
   // the binary executable file format and not the instructions).  This is also useful for testing.
-  //
      if ( CommandlineProcessing::isOption(argv,"-rose:","(read_executable_file_format_only)",true) == true )
         {
        // printf ("option -rose:read_executable_file_format_only found \n");
           set_read_executable_file_format_only(true);
         }
 
+  // DQ (11/11/2008): parse binary executable file format only and add attributes to the symbols so that 
+  // they will not be output in the generation of DOT files.  They will still be present for all other 
+  // forms of analysis.
+     if ( CommandlineProcessing::isOption(argv,"-rose:","(visualize_executable_file_format_skip_symbols)",true) == true )
+        {
+       // printf ("option -rose:visualize_executable_file_format_skip_symbols found \n");
+          set_visualize_executable_file_format_skip_symbols(true);
+        }
+
+  // DQ (11/11/2008): parse binary executable file format only and add attributes to the symbols and most 
+  // other binary file format IR nodes so that they will not be output in the generation of DOT files.  
+  // They will still be present for all other forms of analysis.
+     if ( CommandlineProcessing::isOption(argv,"-rose:","(visualize_dwarf_only)",true) == true )
+        {
+       // printf ("option -rose:visualize_dwarf_only found \n");
+          set_visualize_dwarf_only(true);
+        }
+
   // DQ (9/2/2008): This is now set in the new SgBinaryFile IR node.
   // DQ (8/26/2008): support for optional more agressive mode of disassembly of binary from all 
   // executable segments instead of just section based.
@@ -1535,6 +1570,7 @@
      optionCount = sla(argv, "-rose:", "($)^", "(upc_threads)", &integerOption, 1);
      optionCount = sla(argv, "-rose:", "($)", "(C|C_only)",1);
      optionCount = sla(argv, "-rose:", "($)", "(UPC|UPC_only)",1);
+     optionCount = sla(argv, "-rose:", "($)", "(OpenMP|openmp)",1);
      optionCount = sla(argv, "-rose:", "($)", "(C99|C99_only)",1);
      optionCount = sla(argv, "-rose:", "($)", "(Cxx|Cxx_only)",1);
 
@@ -1581,6 +1617,7 @@
      optionCount = sla(argv, "-rose:", "($)", "(prelink)",1);
      optionCount = sla(argv, "-"     , "($)", "(ansi)",1);
      optionCount = sla(argv, "-rose:", "($)", "(markGeneratedFiles)",1);
+     optionCount = sla(argv, "-rose:", "($)", "(wave)",1);
      optionCount = sla(argv, "-rose:", "($)", "(negative_test)",1);
      integerOption = 0;
      optionCount = sla(argv, "-rose:", "($)^", "(embedColorCodesInGeneratedCode)", &integerOption, 1);
@@ -1618,6 +1655,8 @@
   // DQ (8/16/2008): parse binary executable file format only (some uses of ROSE may only do analysis of 
   // the binary executable file format and not the instructions).  This is also useful for testing.
      optionCount = sla(argv, "-rose:", "($)", "(read_executable_file_format_only)",1);
+     optionCount = sla(argv, "-rose:", "($)", "(visualize_executable_file_format_skip_symbols)",1);
+     optionCount = sla(argv, "-rose:", "($)", "(visualize_dwarf_only)",1);
 
   // DQ (8/26/2007): Disassembly support from segments (true) instead of sections (false, default).
      optionCount = sla(argv, "-rose:", "($)", "(aggressive)",1);
@@ -1738,48 +1777,11 @@
       return returnValue;
     }
 
- 
-void
-SgFile::generateBinaryExecutableFileInformation ( string sourceFilename, SgAsmFile* asmFile )
-   {
-  // Need a mechanism to select what kind of binary we will process.
 
-#if 1
-  // printf ("Calling SgAsmExecutableFileFormat::parseBinaryFormat() \n");
-
-     SgAsmExecutableFileFormat::parseBinaryFormat(sourceFilename,asmFile);
-
-#else
-  // JJW (7/23/2008): We are using Robb's code for this, and it crashes on PE files
-  // printf ("Calling generateBinaryExecutableFileInformation_ELF() \n");
-     bool handled = false;
-
-  // DQ (13/8/2008): Skip the use of the older binary file format support (from before Robb's work).
-  // if (!handled) handled = generateBinaryExecutableFileInformation_ELF( sourceFilename, asmFile );
-  // if (!handled) {} // generateBinaryExecutableFileInformation_Windows ( sourceFilename, asmFile );
-
-     if (!handled) {
-
-    // DQ (13/8/2008): This is one of the few remaining data member in a SgAsmFile IR node.
-       asmFile->set_name(sourceFilename);
-
-    // Hard wire this for the moment while I work on getting Robb's work into place...
-    // DQ (13/8/2008): Removed this data member (such information is now in the SgAsmGenericHeader).
-    // asmFile->set_machine_architecture(SgAsmFile::e_machine_architecture_Intel_80386);
-
-       handled = true;
-     }
-     ROSE_ASSERT (handled);
-#endif
-   }
-
-
-
-
-
-void
-SgFile::setupSourceFilename ( const vector<string>& argv )
+SgFile* 
+determineFileType ( vector<string> argv, int nextErrorCode, SgProject* project )
    {
+     SgFile* file = NULL;
   // DQ (4/21/2006): New version of source file name handling (set the source file name early)
      Rose_STL_Container<string> fileList = CommandlineProcessing::generateSourceFilenames(argv);
 
@@ -1802,10 +1804,6 @@
 
        // printf ("After conversion to absolute path: sourceFilename = %s \n",sourceFilename.c_str());
 
-          p_sourceFileNameWithPath = sourceFilename;
-
-       // printf ("In SgFile::setupSourceFilename(const vector<string>& argv): p_sourceFileNameWithPath = %s \n",p_sourceFileNameWithPath.c_str());
-
        // This should be an absolute path
           string targetSubstring = "/";
        // if (sourceFilename.substr(0,targetSubstring.size()) != targetSubstring)
@@ -1827,69 +1825,71 @@
        // ROSE_ASSERT(false);
 
        // DQ (5/18/2008): Set this to true (redundant, since the default already specified as true)
-          set_requires_C_preprocessor(true);
+          //file->set_requires_C_preprocessor(true);
 
        // DQ (11/17/2007): Mark this as a file using a Fortran file extension (else this turns off options down stream).
           if (CommandlineProcessing::isFortranFileNameSuffix(filenameExtension) == true)
              {
-            // printf ("Calling set_sourceFileUsesFortranFileExtension(true) \n");
-               set_sourceFileUsesFortranFileExtension(true);
+               file = new SgSourceFile ( argv,  project );
 
+            // printf ("Calling file->set_sourceFileUsesFortranFileExtension(true) \n");
+               file->set_sourceFileUsesFortranFileExtension(true);
+
             // Use the filename suffix as a default means to set this value
-               set_outputLanguage(SgFile::e_Fortran_output_language);
+               file->set_outputLanguage(SgFile::e_Fortran_output_language);
 
-               set_Fortran_only(true);
+               file->set_Fortran_only(true);
 
             // DQ (5/18/2008): Set this to true (redundant, since the default already specified as true)
-               set_requires_C_preprocessor(CommandlineProcessing::isFortranFileNameSuffixRequiringCPP(filenameExtension));
+               file->set_requires_C_preprocessor(CommandlineProcessing::isFortranFileNameSuffixRequiringCPP(filenameExtension));
 
             // Now set the specific types of Fortran file extensions
                if (CommandlineProcessing::isFortran77FileNameSuffix(filenameExtension) == true)
                   {
-                 // printf ("Calling set_sourceFileUsesFortran77FileExtension(true) \n");
-                    set_sourceFileUsesFortran77FileExtension(true);
+                 // printf ("Calling file->set_sourceFileUsesFortran77FileExtension(true) \n");
+                    file->set_sourceFileUsesFortran77FileExtension(true);
 
                  // Use the filename suffix as a default means to set this value
-                    set_outputFormat(SgFile::e_fixed_form_output_format);
-                    set_backendCompileFormat(SgFile::e_fixed_form_output_format);
+                    file->set_outputFormat(SgFile::e_fixed_form_output_format);
+                    file->set_backendCompileFormat(SgFile::e_fixed_form_output_format);
 
-                    set_F77_only(true);
+                    file->set_F77_only(true);
                   }
 
                if (CommandlineProcessing::isFortran90FileNameSuffix(filenameExtension) == true)
                   {
-                 // printf ("Calling set_sourceFileUsesFortran90FileExtension(true) \n");
-                    set_sourceFileUsesFortran90FileExtension(true);
+                 // printf ("Calling file->set_sourceFileUsesFortran90FileExtension(true) \n");
+                    file->set_sourceFileUsesFortran90FileExtension(true);
 
                  // Use the filename suffix as a default means to set this value
-                    set_outputFormat(SgFile::e_free_form_output_format);
-                    set_backendCompileFormat(SgFile::e_free_form_output_format);
+                    file->set_outputFormat(SgFile::e_free_form_output_format);
+                    file->set_backendCompileFormat(SgFile::e_free_form_output_format);
 
-                    set_F90_only(true);
+                    file->set_F90_only(true);
                   }
 
                if (CommandlineProcessing::isFortran95FileNameSuffix(filenameExtension) == true)
                   {
-                 // printf ("Calling set_sourceFileUsesFortran95FileExtension(true) \n");
-                    set_sourceFileUsesFortran95FileExtension(true);
+                 // printf ("Calling file->set_sourceFileUsesFortran95FileExtension(true) \n");
+                    file->set_sourceFileUsesFortran95FileExtension(true);
 
                  // Use the filename suffix as a default means to set this value
-                    set_outputFormat(SgFile::e_free_form_output_format);
-                    set_backendCompileFormat(SgFile::e_free_form_output_format);
+                    file->set_outputFormat(SgFile::e_free_form_output_format);
+                    file->set_backendCompileFormat(SgFile::e_free_form_output_format);
 
-                    set_F95_only(true);
+                    file->set_F95_only(true);
                   }
 
                if (CommandlineProcessing::isFortran2003FileNameSuffix(filenameExtension) == true)
                   {
-                 // printf ("Calling set_sourceFileUsesFortran2003FileExtension(true) \n");
-                    set_sourceFileUsesFortran2003FileExtension(true);
+                 // printf ("Calling file->set_sourceFileUsesFortran2003FileExtension(true) \n");
+                    file->set_sourceFileUsesFortran2003FileExtension(true);
 
                  // Use the filename suffix as a default means to set this value
-                    set_outputFormat(SgFile::e_free_form_output_format);
-                    set_backendCompileFormat(SgFile::e_free_form_output_format);
+                    file->set_outputFormat(SgFile::e_free_form_output_format);
+                    file->set_backendCompileFormat(SgFile::e_free_form_output_format);
 
-                    set_F2003_only(true);
+                    file->set_F2003_only(true);
                   }
 
                if (CommandlineProcessing::isFortran2008FileNameSuffix(filenameExtension) == true)
@@ -1898,55 +1898,64 @@
                     ROSE_ASSERT(false);
 
                  // This is not yet supported.
-                 // set_sourceFileUsesFortran2008FileExtension(true);
+                 // file->set_sourceFileUsesFortran2008FileExtension(true);
 
                  // Use the filename suffix as a default means to set this value
-                    set_outputFormat(SgFile::e_free_form_output_format);
-                    set_backendCompileFormat(SgFile::e_free_form_output_format);
+                    file->set_outputFormat(SgFile::e_free_form_output_format);
+                    file->set_backendCompileFormat(SgFile::e_free_form_output_format);
                   }
              }
             else if (CommandlineProcessing::isPHPFileNameSuffix(filenameExtension) == true)
              {
-                    set_sourceFileUsesPHPFileExtension(true);
 
-                    set_outputLanguage(SgFile::e_PHP_output_language);
+                    file = new SgSourceFile ( argv,  project );
 
-                    set_PHP_only(true);
+                    file->set_sourceFileUsesPHPFileExtension(true);
+
+                    file->set_outputLanguage(SgFile::e_PHP_output_language);
+
+                    file->set_PHP_only(true);
               }
             else
              {
-            // printf ("Calling set_sourceFileUsesFortranFileExtension(false) \n");
-               set_sourceFileUsesFortranFileExtension(false);
-
+            // printf ("Calling file->set_sourceFileUsesFortranFileExtension(false) \n");
+               
             // if (StringUtility::isCppFileNameSuffix(filenameExtension) == true)
                if (CommandlineProcessing::isCppFileNameSuffix(filenameExtension) == true)
                   {
+                    file = new SgSourceFile ( argv,  project );
+
                  // This is a C++ file (so define __cplusplus, just like GNU gcc would)
-                 // set_requires_cplusplus_macro(true);
-                    set_sourceFileUsesCppFileExtension(true);
+                 // file->set_requires_cplusplus_macro(true);
+                    file->set_sourceFileUsesCppFileExtension(true);
 
                  // Use the filename suffix as a default means to set this value
-                    set_outputLanguage(SgFile::e_Cxx_output_language);
+                    file->set_outputLanguage(SgFile::e_Cxx_output_language);
 
-                    set_Cxx_only(true);
+                    file->set_Cxx_only(true);
+                  
                   }
                  else
                   {
+             
                   // Liao, 6/6/2008, Assume AST with UPC will be unparsed using the C unparser
                     if ( ( CommandlineProcessing::isCFileNameSuffix(filenameExtension)   == true ) ||
                          ( CommandlineProcessing::isUPCFileNameSuffix(filenameExtension) == true ) )
                        {
+
+                         file = new SgSourceFile ( argv,  project );
+
                       // This a not a C++ file (assume it is a C file and don't define the __cplusplus macro, just like GNU gcc would)
-                         set_sourceFileUsesCppFileExtension(false);
+                         file->set_sourceFileUsesCppFileExtension(false);
 
                       // Use the filename suffix as a default means to set this value
-                         set_outputLanguage(SgFile::e_C_output_language);
+                         file->set_outputLanguage(SgFile::e_C_output_language);
 
-                         set_C_only(true);
+                         file->set_C_only(true);
                          // Liao 6/6/2008  Set the newly introduced p_UPC_only flag.
                          //
                          if (CommandlineProcessing::isUPCFileNameSuffix(filenameExtension) == true) 
-                           set_UPC_only(true);
+                           file->set_UPC_only(true);
                        }
                       else
                        {
@@ -1957,41 +1966,110 @@
 
                          if (isBinaryExecutable == true)
                             {
-                              set_sourceFileUsesBinaryFileExtension(true);
-                              set_binary_only(true);
 
+                              file = new SgBinaryFile ( argv,  project );
+
+                              file->set_sourceFileUsesBinaryFileExtension(true);
+                              file->set_binary_only(true);
+
                            // DQ (5/18/2008): Set this to false (since binaries are never preprocessed using the C preprocessor).
-                              set_requires_C_preprocessor(false);
+                              file->set_requires_C_preprocessor(false);
                             }
                            else
                             {
+
+                              file = new SgUnknownFile ( argv,  project );
+
+                              ROSE_ASSERT(file->get_parent() != NULL);
+                              ROSE_ASSERT(file->get_parent() == project);
+
                            // If all else fails, then output the type of file and exit.
-                              outputTypeOfFileAndExit(sourceFilename);
+                              file->set_sourceFileTypeIsUnknown(true);
+                              file->set_requires_C_preprocessor(false);
+
+                           // file->set_parent(project);
+                           // outputTypeOfFileAndExit(sourceFilename);
                             }
                        }
                   }
+                 file->set_sourceFileUsesFortranFileExtension(false);
+
              }
 
-          p_sourceFileNameWithoutPath = ROSE::stripPathFromFileName(p_sourceFileNameWithPath.c_str());
         }
        else
         {
+
+          //AS Is this option possible?
+          abort();
        // ROSE_ASSERT (p_numberOfSourceFileNames == 0);
-          ROSE_ASSERT (p_sourceFileNameWithPath.empty() == true);
+          ROSE_ASSERT (file->get_sourceFileNameWithPath().empty() == true);
        // If no source code file name was found then likely this is a link command
        // using the C++ compiler.  In this case skip the EDG processing.
-          set_disable_edg_backend(true);
+          file->set_disable_edg_backend(true);
        // printf ("No source file found on command line, assuming to be linker command line \n");
         }
 
+    //The frontend is called exlicitly outside the constructor since that allows for a cleaner
+    //control flow. The callFrontEnd() relies on all the "set_" flags to be already called therefore
+    //it was placed here.
+    if( isSgUnknownFile(file) == NULL && file != NULL  )
+    {
+
+      nextErrorCode =   file->callFrontEnd() ;
+      ROSE_ASSERT ( nextErrorCode <= 3);
+
+    }
+       
   // Keep the filename stored in the Sg_File_Info consistant.  Later we will want to remove this redundency
   // The reason we have the Sg_File_Info object is so that we can easily support filename matching based on
   // the integer values instead of string comparisions.
-     get_file_info()->set_filenameString(p_sourceFileNameWithPath);
-
+     
   // display("SgFile::setupSourceFilename()");
+     return file;
    }
 
+ 
+void
+SgFile::generateBinaryExecutableFileInformation ( string sourceFilename, SgAsmFile* asmFile )
+   {
+  // Need a mechanism to select what kind of binary we will process.
+
+#if 1
+  // printf ("Calling SgAsmExecutableFileFormat::parseBinaryFormat() \n");
+
+     SgAsmExecutableFileFormat::parseBinaryFormat(sourceFilename,asmFile);
+
+#else
+  // JJW (7/23/2008): We are using Robb's code for this, and it crashes on PE files
+  // printf ("Calling generateBinaryExecutableFileInformation_ELF() \n");
+     bool handled = false;
+
+  // DQ (13/8/2008): Skip the use of the older binary file format support (from before Robb's work).
+  // if (!handled) handled = generateBinaryExecutableFileInformation_ELF( sourceFilename, asmFile );
+  // if (!handled) {} // generateBinaryExecutableFileInformation_Windows ( sourceFilename, asmFile );
+
+     if (!handled) {
+
+    // DQ (13/8/2008): This is one of the few remaining data member in a SgAsmFile IR node.
+       asmFile->set_name(sourceFilename);
+
+    // Hard wire this for the moment while I work on getting Robb's work into place...
+    // DQ (13/8/2008): Removed this data member (such information is now in the SgAsmGenericHeader).
+    // asmFile->set_machine_architecture(SgAsmFile::e_machine_architecture_Intel_80386);
+
+       handled = true;
+     }
+     ROSE_ASSERT (handled);
+#endif
+   }
+
+
+
+
+
+
+
 static string makeSysIncludeList(const Rose_STL_Container<string>& dirs) {
   string includeBase = findRoseSupportPathFromBuild("include-staging", "include");
   string result;
@@ -2569,7 +2647,7 @@
           autoInstantiation = true;
         }
 
-     if ( CommandlineProcessing::isOption(argv,"-rose:","wave",false) == true )
+     if ( CommandlineProcessing::isOption(argv,"-rose:","wave",ROSE_WAVE_DEFAULT) == true )
         {
        // printf ("Option -c found (compile only)! \n");
           set_wave(true);
@@ -2693,6 +2771,12 @@
   // display("at base of build_EDG_CommandLine()");
    }
 
+//FMZ(5/19/2008):
+#ifdef USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+extern void jserver_init();
+extern void jserver_finish();
+#endif // USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+
 //! internal function to invoke the EDG frontend and generate the AST
 int
 SgProject::parse(const vector<string>& argv)
@@ -2766,7 +2850,22 @@
                   {
                  // This is a compile line
                  // printf ("Calling parse() from SgProject::parse(const vector<string>& argv) \n");
+
+
+                  /*
+                   * FMZ (5/19/2008)
+                   *   "jserver_init()"   does nothing. The Java VM will be loaded at the first time
+                   *                      it needed (i.e for parsing the 1st fortran file).
+                   *   "jserver_finish()" will dostroy the Java VM if it is running.
+                   */
+
+#ifdef USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+                    jserver_init();
+#endif // USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+
                     errorCode = parse();
+
+                    // FMZ deleteComm jserver_finish();
                   }
 
             // DQ (5/26/2007): This is meaningless, so remove it!
@@ -2778,8 +2877,19 @@
    }
 
 
+SgSourceFile::SgSourceFile ( vector<string> & argv , SgProject* project )
+// : SgFile (argv,errorCode,fileNameIndex,project)
+   {
+  // printf ("In the SgSourceFile constructor \n");
 
+     set_globalScope(NULL);
 
+  // This constructor actually makes the call to EDG to build the AST (via callFrontEnd()).
+     doSetupForConstructor(argv,  project);
+
+    }
+
+#if 0
 SgSourceFile::SgSourceFile ( vector<string> & argv , int & errorCode, int fileNameIndex, SgProject* project )
 // : SgFile (argv,errorCode,fileNameIndex,project)
    {
@@ -2790,6 +2900,17 @@
   // This constructor actually makes the call to EDG to build the AST (via callFrontEnd()).
      doSetupForConstructor(argv, errorCode, fileNameIndex, project);
 
+    }
+#endif
+
+int
+SgSourceFile::callFrontEnd()
+   {
+#ifdef USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+     FortranParserState* currStks = new FortranParserState(); 
+#endif // USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+
+     int frontendErrorLevel = SgFile::callFrontEnd();
   // DQ (1/21/2008): This must be set for all languages
      ROSE_ASSERT(get_globalScope() != NULL);
      ROSE_ASSERT(get_globalScope()->get_file_info() != NULL);
@@ -2799,9 +2920,30 @@
   // DQ (8/21/2008): Added assertion.
      ROSE_ASSERT (get_globalScope()->get_startOfConstruct() != NULL);
      ROSE_ASSERT (get_globalScope()->get_endOfConstruct()   != NULL);
-    }
- 
-SgBinaryFile::SgBinaryFile ( vector<string> & argv , int & errorCode, int fileNameIndex, SgProject* project )
+
+#ifdef USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+     delete  currStks ;
+#endif // USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+
+     return frontendErrorLevel;
+   }
+
+int
+SgBinaryFile::callFrontEnd()
+   {
+     int frontendErrorLevel = SgFile::callFrontEnd();
+  // DQ (1/21/2008): This must be set for all languages
+     return frontendErrorLevel;
+   }
+
+int
+SgUnknownFile::callFrontEnd()
+   {
+     abort(); 
+     return 0;
+   }
+
+SgBinaryFile::SgBinaryFile ( vector<string> & argv ,  SgProject* project )
 // : SgFile (argv,errorCode,fileNameIndex,project)
    {
      p_binaryFile = NULL;
@@ -2810,7 +2952,7 @@
   // printf ("In the SgBinaryFile constructor \n");
 
   // This constructor actually makes the call to EDG to build the AST (via callFrontEnd()).
-     doSetupForConstructor(argv, errorCode, fileNameIndex, project);
+     doSetupForConstructor(argv,  project);
    }
 
 
@@ -2824,6 +2966,11 @@
 
   // ROSE_ASSERT (p_fileList != NULL);
 
+  // FMZ (5/29/2008)
+#ifdef USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+     FortranModuleInfo::setCurrentProject(this);
+#endif // USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+
   // Simplify multi-file handling so that a single file is just the trivial 
   // case and not a special separate case.
 
@@ -2844,80 +2991,26 @@
        // printf ("In SgProject::parse(): command line for file = %s \n",CommandlineProcessing::generateStringFromArgList(argv,false,false).c_str());
        // printf ("currentFileName = %s \n",currentFileName.c_str());
 
-          SgFile* newFile = NULL;
+       // DQ (11/13/2008): Removed overly complex logic here!
+          SgFile* newFile = determineFileType(argv, nextErrorCode, this);
+          ROSE_ASSERT (newFile != NULL);
 
-#if 0
-          if (isBinaryExecutableFile(currentFileName) == true)
-             {
-            // If this file matches a source file name then include it in it's binary file pointer.
-            // If there are more than one source files, then we can't so easily associate the binary 
-            // file with a specific source file and the binary file will be built as a separate SgFile
-            // in the same SgProject as the other source files.
+       // printf ("In SgProject::parse(): newFile = %p = %s \n",newFile,newFile->class_name().c_str());
 
-               for (Rose_STL_Container<SgFile*>::iterator i = p_fileList.begin(); i != p_fileList.end(); i++)
-                  {
-                    string filenameWithoutSuffix = StringUtility::stripFileSuffixFromFileName((*i)->get_sourceFileNameWithoutPath());
-                    printf ("Comparing currentFileName for binary = %s to previously built source file = %s filenameWithoutSuffix = %s \n",
-                         currentFileName.c_str(),(*i)->get_sourceFileNameWithoutPath().c_str(),filenameWithoutSuffix.c_str());
-                    if ( filenameWithoutSuffix == currentFileName )
-                       {
-                      // This is a binary file that matches the name of a source file so
-                      // put the binary AST into the same SgFile IR node with the source.
-                      // So reuse the SgFile from the generation of the source file.
+          ROSE_ASSERT (newFile->get_startOfConstruct() != NULL);
+          ROSE_ASSERT (newFile->get_parent() != NULL);
 
-                      // Hopefuly this does not change the data fields in the SgFile IR nodes to be inconsistant with it being a source file.
+       // DQ (9/2/2008): This should have already been set!
+       // Set the parent explicitly (so that we can easily find the SgProject from the SgFile).
+       // newFile->set_parent(this);
 
-                      // newFile = *i;
-                       }
-                  }
+       // This just adds the new file to the list of files stored internally
+           set_file ( *newFile );
 
-               newFile = new SgBinaryFile ( argv, nextErrorCode, 0, this );
-             }
-#endif
+       // newFile->display("Called from SgProject::parse()");
 
-       // DQ (2/24/2004): Added support for SgProject to be passed so that the parent 
-       // pointer could be set earily in the construction process.
-       // SgFile* newFile = new SgFile ( argc, argv, nextErrorCode, i, this );
-       // SgFile* newFile = new SgFile ( argv, nextErrorCode, 0, this );
-          if (newFile == NULL)
-             {
-            // newFile = new SgFile ( argv, nextErrorCode, 0, this );
-
-            // printf ("currentFileName = %s \n",currentFileName.c_str());
-
-               if (isBinaryExecutableFile(currentFileName) == true)
-                  {
-                 // printf ("This is a binary file so building a SgBinaryFile IR node! \n");
-                    newFile = new SgBinaryFile ( argv, nextErrorCode, 0, this );
-                  }
-                 else
-                  {
-                 // printf ("This is NOT a binary file so building a SgSourceFile IR node! \n");
-                    newFile = new SgSourceFile ( argv, nextErrorCode, 0, this );
-                  }
-
-               ROSE_ASSERT (newFile != NULL);
-
-            // printf ("In SgProject::parse(): newFile = %p = %s \n",newFile,newFile->class_name().c_str());
-
-               ROSE_ASSERT (newFile->get_startOfConstruct() != NULL);
-
-               ROSE_ASSERT (newFile->get_parent() != NULL);
-
-            // DQ (9/2/2008): This should have already been set!
-            // Set the parent explicitly (so that we can easily find the SgProject from the SgFile).
-            // newFile->set_parent(this);
-
-            // This just adds the new file to the list of files stored internally
-               set_file ( *newFile );
-
-            // newFile->display("Called from SgProject::parse()");
-             }
-
-          ROSE_ASSERT (newFile != NULL);
 #if 0
-          printf ("In Project::parse(): get_file(%d).get_skipfinalCompileStep() = %s \n",
-               i,(get_file(i).get_skipfinalCompileStep()) ? "true" : "false");
+          printf ("In Project::parse(): get_file(%d).get_skipfinalCompileStep() = %s \n",i,(get_file(i).get_skipfinalCompileStep()) ? "true" : "false");
 #endif
 
        // errorCode = (errorCode >= nextErrorCode) ? errorCode : nextErrorCode; // use STL max
@@ -2960,12 +3053,19 @@
      return errorCode;
    }
 
+#if 0
 void
 SgFile::doSetupForConstructor(const vector<string>& argv, int& errorCode, int fileNameIndex, SgProject* project)
    {
+
   // JJW 10-26-2007 ensure that this object is not on the stack
      preventConstructionOnStack(this);
 
+  // FMZ 6/10/2008 create new stacks for the SgFile
+#ifdef USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+     FortranParserState* currStks = new FortranParserState(); 
+#endif // USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+
      // printf ("Inside of SgFile::doSetupForConstructor() \n");
 
   // DQ (4/21/2006): I think we can now assert this! This is an unused function parameter!
@@ -2998,8 +3098,37 @@
      ROSE_ASSERT(get_parent() != NULL);
 
   // DQ (4/21/2006): Setup the source filename as early as possible
-     setupSourceFilename(argv);
+     //setupSourceFilename(argv);
 
+     Rose_STL_Container<string> fileList = CommandlineProcessing::generateSourceFilenames(argv);
+
+     // this->display("In SgFile::setupSourceFilename()");
+     // printf ("listToString(argv) = %s \n",StringUtility::listToString(argv).c_str());
+     // printf ("listToString(fileList) = %s \n",StringUtility::listToString(fileList).c_str());
+
+     if (fileList.empty() == false)
+     {
+
+       string sourceFilename = *(fileList.begin());
+
+       // printf ("Before conversion to absolute path: sourceFilename = %s \n",sourceFilename.c_str());
+
+       // sourceFilename = StringUtility::getAbsolutePathFromRelativePath(sourceFilename);
+       sourceFilename = StringUtility::getAbsolutePathFromRelativePath(sourceFilename, true);
+
+       set_sourceFileNameWithPath(sourceFilename);
+
+       //printf ("In SgFile::setupSourceFilename(const vector<string>& argv): p_sourceFileNameWithPath = %s \n",get_sourceFileNameWithPath().c_str());
+
+
+       set_sourceFileNameWithoutPath( ROSE::stripPathFromFileName(get_sourceFileNameWithPath().c_str()) );
+       get_file_info()->set_filenameString( get_sourceFileNameWithPath() );
+     }else{
+       //A file should never be created without a filename so this branch should be impossible
+       abort();
+     }
+
+     
 #if 1
   // DQ (9/5/2008): Handle the case that this is a SgSourceFile.  This is awkward code, and may be a temporary fix.
      const SgSourceFile* sourceFile = isSgSourceFile(this);
@@ -3015,6 +3144,8 @@
 
        // p_root->get_file_info()->set_filenameString(p_sourceFileNameWithPath);
        // ROSE_ASSERT(p_root->get_file_info()->get_filenameString().empty() == false);
+
+
           sourceFile->get_globalScope()->get_startOfConstruct()->set_filenameString(p_sourceFileNameWithPath);
           ROSE_ASSERT(sourceFile->get_globalScope()->get_startOfConstruct()->get_filenameString().empty() == false);
 
@@ -3100,15 +3231,20 @@
           get_skipfinalCompileStep() ? "true" : "false");
 #endif
 
-#if 1
+
+#if 0
+  //AS(10/04/08) Removed code because of refactoring into determineFileType(..). callFrontEnd relies on all
+  //the appropriate flags being set first.
+
   // DQ (10/16/2005): Modified to make clear that argc and argv are not modified
   // Call the EDG fron-end to generate the abstract syntax tree
   // int EDG_FrontEndErrorCode = callFrontEnd ( argc, argv, *this, fileNameIndex );
   // int EDG_FrontEndErrorCode = callFrontEnd (  local_commandLineArgumentList, *this, fileNameIndex );
   // int EDG_FrontEndErrorCode = callFrontEnd (  local_commandLineArgumentList );
   // int EDG_FrontEndErrorCode = callFrontEnd();
-     int EDG_FrontEndErrorCode = callFrontEnd();
 
+     int EDG_FrontEndErrorCode =  get_sourceFileTypeIsUnknown() == false ? callFrontEnd() : 0 ;
+
   // Warning from EDG processing are OK but not errors
      ROSE_ASSERT (EDG_FrontEndErrorCode <= 3);
 
@@ -3128,42 +3264,161 @@
   // ROSE_ASSERT (localfileInfo != NULL);
   // set_file_info(localfileInfo);
 
-#if 0
-  // DQ (9/5/2008): This was easier to move to the constructor for SgSourceFile
 
-  // DQ (10/15/2005): This has not been converted to a C++ string!
-  // DQ (5/24/2005): Now fixup the file info's file name in the global scope!
-  // printf ("In SgFile::doSetupForConstructor p_sourceFileNamesWithPath[%d] = %s \n",fileNameIndex,p_sourceFileNamesWithPath[fileNameIndex]);
-  // p_root->get_file_info()->set_filename(p_sourceFileNamesWithPath[fileNameIndex]);
 
-  // DQ (1/22/2008): This should have been set above!
-  // p_root->get_file_info()->set_filenameString(p_sourceFileNameWithPath);
-
-  // DQ (1/21/2008): This must be set for all languages
-     ROSE_ASSERT(p_root != NULL);
-     ROSE_ASSERT(p_root->get_file_info() != NULL);
-     ROSE_ASSERT(p_root->get_file_info()->get_filenameString().empty() == false);
-  // printf ("p_root->get_file_info()->get_filenameString() = %s \n",p_root->get_file_info()->get_filenameString().c_str());
-#endif
-
   // DQ (1/18/2006): Set the filename in the SgFile::p_file_info
      ROSE_ASSERT(get_file_info() != NULL);
      get_file_info()->set_filenameString(p_sourceFileNameWithPath);
 
-#if 0
-     printf ("In SgFile::doSetupForConstructor(): get_skipfinalCompileStep() = %s \n",
-          get_skipfinalCompileStep() ? "true" : "false");
-#endif
 
+
   // DQ (5/3/2007): Added assertion.
      ROSE_ASSERT (get_startOfConstruct() != NULL);
 
   // DQ (8/21/2008): Added assertion.
   // ROSE_ASSERT (p_root->get_startOfConstruct() != NULL);
   // ROSE_ASSERT (p_root->get_endOfConstruct()   != NULL);
+
+  // FMZ(5/19/2008)
+#ifdef USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+     delete  currStks ;
+#endif // USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
    }
 
 
+#endif
+
+
+void
+SgSourceFile::doSetupForConstructor(const vector<string>& argv, SgProject* project)
+   {
+
+     SgFile::doSetupForConstructor(argv, project);
+     
+     // DQ (1/21/2008): Set the filename in the SgGlobal IR node so that the traversal to add CPP directives and comments will succeed.
+     ROSE_ASSERT (get_globalScope() != NULL);
+     ROSE_ASSERT(get_globalScope()->get_startOfConstruct() != NULL);
+
+     // DQ (8/21/2008): Modified to make endOfConstruct consistant (avoids warning in AST consistancy check).
+     // ROSE_ASSERT(p_root->get_endOfConstruct()   == NULL);
+     ROSE_ASSERT(get_globalScope()->get_endOfConstruct()   != NULL);
+
+     // p_root->get_file_info()->set_filenameString(p_sourceFileNameWithPath);
+     // ROSE_ASSERT(p_root->get_file_info()->get_filenameString().empty() == false);
+
+
+     get_globalScope()->get_startOfConstruct()->set_filenameString(p_sourceFileNameWithPath);
+     ROSE_ASSERT(get_globalScope()->get_startOfConstruct()->get_filenameString().empty() == false);
+
+     // DQ (8/21/2008): Uncommented to make the endOfConstruct consistant (avoids warning in AST consistancy check).
+     get_globalScope()->get_endOfConstruct()->set_filenameString(p_sourceFileNameWithPath);
+     ROSE_ASSERT(get_globalScope()->get_endOfConstruct()->get_filenameString().empty() == false);
+
+     
+   }
+
+void
+SgBinaryFile::doSetupForConstructor(const vector<string>& argv, SgProject* project)
+   {
+       SgFile::doSetupForConstructor(argv, project);
+
+   }
+
+void
+SgUnknownFile::doSetupForConstructor(const vector<string>& argv, SgProject* project)
+   {
+       SgFile::doSetupForConstructor(argv, project);
+
+   }
+
+void
+SgFile::doSetupForConstructor(const vector<string>& argv, SgProject* project)
+   {
+
+  // JJW 10-26-2007 ensure that this object is not on the stack
+     preventConstructionOnStack(this);
+
+
+  // Set the project early in the construction phase so that we can access data in 
+  // the parent if needed (useful for template handling but also makes sure the parent is
+  // set (and avoids fixup (currently done, but too late in the construction process for 
+  // the template support).
+     if (project != NULL)
+          set_parent(project);
+
+     ROSE_ASSERT (project != NULL);
+
+     ROSE_ASSERT(get_parent() != NULL);
+
+
+  // initalize all local variables to default values
+     initialization();
+
+     ROSE_ASSERT(get_parent() != NULL);
+
+  // DQ (4/21/2006): Setup the source filename as early as possible
+     //setupSourceFilename(argv);
+
+     Rose_STL_Container<string> fileList = CommandlineProcessing::generateSourceFilenames(argv);
+
+
+     if (fileList.empty() == false)
+     {
+
+       string sourceFilename = *(fileList.begin());
+
+       // printf ("Before conversion to absolute path: sourceFilename = %s \n",sourceFilename.c_str());
+
+       // sourceFilename = StringUtility::getAbsolutePathFromRelativePath(sourceFilename);
+       sourceFilename = StringUtility::getAbsolutePathFromRelativePath(sourceFilename, true);
+
+       set_sourceFileNameWithPath(sourceFilename);
+
+       //printf ("In SgFile::setupSourceFilename(const vector<string>& argv): p_sourceFileNameWithPath = %s \n",get_sourceFileNameWithPath().c_str());
+
+
+       set_sourceFileNameWithoutPath( ROSE::stripPathFromFileName(get_sourceFileNameWithPath().c_str()) );
+       get_file_info()->set_filenameString( get_sourceFileNameWithPath() );
+     }else{
+       //A file should never be created without a filename so this branch should be impossible
+       abort();
+     }
+
+     
+  // DQ (5/9/2007): Moved this call from above to where the file name is available so that we could include 
+  // the filename in the label.  This helps to identify the performance data with individual files where
+  // multiple source files are specificed on the command line.
+  // printf ("p_sourceFileNameWithPath = %s \n",p_sourceFileNameWithPath);
+     string timerLabel = "AST SgFile Constructor for " + p_sourceFileNameWithPath + ":";
+     TimingPerformance timer (timerLabel);
+
+  // Build a DEEP COPY of the input parameters!
+     vector<string> local_commandLineArgumentList = argv;
+
+  // Save the commandline as a list of strings (we made a deep copy because the "callFrontEnd()" function might change it!
+     set_originalCommandLineArgumentList( local_commandLineArgumentList );
+
+  // DQ (5/22/2005): Store the file name index in the SgFile object so that it can figure out 
+  // which file name applies to it.  This helps support functions such as "get_filename()" 
+  // used elsewhere in Sage III.  Not clear if we really need this!
+  // error checking
+     ROSE_ASSERT (argv.size() > 1);
+
+  // DQ (1/18/2006): Set the filename in the SgFile::p_file_info
+     ROSE_ASSERT(get_file_info() != NULL);
+     get_file_info()->set_filenameString(p_sourceFileNameWithPath);
+
+
+
+  // DQ (5/3/2007): Added assertion.
+     ROSE_ASSERT (get_startOfConstruct() != NULL);
+
+
+   }
+
+
+
+
 #if 1
 #define CASE_SENSITIVE_SYSTEM 1
 
@@ -3725,6 +3980,10 @@
                          frontendErrorLevel = binaryFile->buildAST(argv,inputCommandLine);
                          break;
                        }
+                    case V_SgUnknownFile:
+                       {
+                         break;
+                       }
 
                     default:
                        {
@@ -3775,9 +4034,33 @@
   // AST fixups are not so temporary so the name of the function might change at some point.
   // Notice that all AST fixup is done before attachment of the comments to the AST.
   // temporaryAstFixes(this);
+  //
+
+  // FMZ  
+#if 0
+     list<SgScopeStatement*> *stmp = &astScopeStack;
+
+     printf("FMZ :: before AstPostProcessing astScopeStack = %p \n",stmp);
+#endif
+ 
      AstPostProcessing(this);
 
+  // FMZ: 05/30/2008.  Do not generate .rmod file for the PU imported by "use" stmt
+#ifdef USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+     if (get_Fortran_only() == true && FortranModuleInfo::isRmodFile()==false)
+        {
+          if (get_verbose() > 1)
+               printf ("Generating a Fortran 90 module file (*.rmod) \n");
 
+          generateModFile(this);
+
+          if (get_verbose() > 1)
+               printf ("DONE: Generating a Fortran 90 module file (*.rmod) \n");
+        }
+#endif // USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+
+
+
   // **************************************************************************
   //                      Secondary Pass Over Source File
   // **************************************************************************
@@ -3857,6 +4140,7 @@
    }
 
 
+#ifdef USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
 // DQ (9/30/2008): Refactored the setup of the class path for Java and OFP.
 string
 SgSourceFile::build_classpath()
@@ -3872,7 +4156,7 @@
 
      return classpath;
    }
- 
+
 int
 SgSourceFile::build_Fortran_AST( vector<string> argv, vector<string> inputCommandLine )
    {
@@ -3884,6 +4168,8 @@
   // build the Fotran AST using the existing SgFile.
      extern SgSourceFile* OpenFortranParser_globalFilePointer;
 
+  // printf ("######################### Inside of SgSourceFile::build_Fortran_AST() ############################ \n");
+
      bool requires_C_preprocessor = get_requires_C_preprocessor();
      if (requires_C_preprocessor == true)
         {
@@ -3941,6 +4227,8 @@
   // bool syntaxCheckInputCode = true;
      bool syntaxCheckInputCode = (get_skip_syntax_check() == false);
 
+  // printf ("In build_Fortran_AST(): syntaxCheckInputCode = %s \n",syntaxCheckInputCode ? "true" : "false");
+
      if (syntaxCheckInputCode == true)
         {
        // Note that syntax checking of Fortran 2003 code using gfortran versions greater than 4.1 can 
@@ -3967,6 +4255,8 @@
        // string warnings = "-Wall -Wconversion -Waliasing -Wampersand -Wimplicit-interface -Wline-truncation -Wnonstd-intrinsics -Wsurprising -Wunderflow -Wunused-labels";
        // DQ (12/8/2007): Added commandline control over warnings output in using gfortran sytax checking prior to use of OFP.
 
+       // printf ("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Setting up Fortran Syntax check @@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n");
+
           vector<string> fortranCommandLine;
           fortranCommandLine.push_back(ROSE_GFORTRAN_PATH);
           fortranCommandLine.push_back("-fsyntax-only");
@@ -4051,7 +4341,7 @@
 
        // Note that "-c" is required to enforce that we only compile and not link the result (even though -fno-backend is specified)
        // A web page specific to -fno-backend suggests using -fsyntax-only instead (so the "-c" options is not required).
-#if 0
+#if 1
        // if ( SgProject::get_verbose() > 0 )
           if ( get_verbose() > 0 )
              {
@@ -4098,6 +4388,8 @@
              }
           ROSE_ASSERT(returnValueForSyntaxCheckUsingBackendCompiler == 0);
 
+       // printf ("@@@@@@@@@@@@@@@@@@@@@@@@@@ DONE: Setting up Fortran Syntax check @@@@@@@@@@@@@@@@@@@@@@@@@ \n");
+
 #if 0
           printf ("Exiting as a test ... (after syntax check) \n");
           ROSE_ASSERT(false);
@@ -4302,7 +4594,19 @@
 
      return frontendErrorLevel;
    }
+#else // for !USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+string SgSourceFile::build_classpath() {
+  fprintf(stderr, "Fortran parser not supported\n");
+  abort();
+}
 
+int
+SgSourceFile::build_Fortran_AST( vector<string> argv, vector<string> inputCommandLine ) {
+  fprintf(stderr, "Fortran parser not supported\n");
+  abort();
+}
+#endif // USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
+
  
 int
 SgSourceFile::build_C_and_Cxx_AST( vector<string> argv, vector<string> inputCommandLine )
@@ -4372,7 +4676,7 @@
   // Find the headers in the executable format and convert
   // them into SgAsmInterpretation objects
      SgAsmGenericFile* genericFile = asmFile->get_genericFile();
-     ROSE_ASSERT (genericFile);
+     ROSE_ASSERT (genericFile != NULL);
      SgAsmGenericHeaderList* headerList = genericFile->get_headers();
      ROSE_ASSERT (headerList);
      const SgAsmGenericHeaderPtrList& headers = headerList->get_headers();
@@ -4382,8 +4686,15 @@
           interp->set_parent(asmFile);
           interp->set_header(headers[i]);
           asmFile->get_interpretations().push_back(interp);
+
+       // If dwarf is available then read it into the AST.
         }
 
+#if USE_ROSE_DWARF_SUPPORT
+  // DQ (11/7/2008): New Dwarf support in ROSE (Dwarf IR nodes are generated in the AST).
+     readDwarf(asmFile);
+#endif
+
   // Fill in the instructions into the SgAsmFile IR node
      SgProject* project = isSgProject(this->get_parent());
      ROSE_ASSERT(project != NULL);
@@ -4422,12 +4733,19 @@
 int
 SgSourceFile::buildAST( vector<string> argv, vector<string> inputCommandLine )
    {
-  // printf ("Calling SgSourceFile::buildAST() \n");
+  // printf ("######################## Calling SgSourceFile::buildAST() ##########################\n");
 
+  // ROSE_ASSERT(false);
+
      int frontendErrorLevel = 0;
      if (get_Fortran_only() == true)
         {
+#ifdef USE_ROSE_OPEN_FORTRAN_PARSER_SUPPORT
           frontendErrorLevel = build_Fortran_AST(argv,inputCommandLine);
+#else
+          fprintf(stderr, "Trying to parse a Fortran file when Fortran is not supported\n");
+          abort();
+#endif
         }
        else
         {
@@ -4503,7 +4821,7 @@
   // ROSE_ASSERT(get_fileInfo() != NULL);
 
 #if 0
-     display("SgFile::buildCompilerCommandLineOptions()");
+  // display("SgFile::buildCompilerCommandLineOptions()");
      printf ("C   compiler       = %s \n",BACKEND_C_COMPILER_NAME_WITH_PATH);
      printf ("C++ compiler       = %s \n",BACKEND_CXX_COMPILER_NAME_WITH_PATH);
      printf ("Fortran compiler   = %s \n",BACKEND_FORTRAN_COMPILER_NAME_WITH_PATH);
@@ -4800,7 +5118,7 @@
              }
         }
 
-  // printf ("At base of buildCompilerCommandLineOptions: compilerNameString = \n%s\n",compilerNameString.c_str());
+  // printf ("At base of buildCompilerCommandLineOptions: compilerNameString = \n%s\n",CommandlineProcessing::generateStringFromArgList(compilerNameString,false,false).c_str());
 
 #if 0
      printf ("Exiting at base of buildCompilerCommandLineOptions() ... \n");
@@ -4819,6 +5137,12 @@
   // DQ (4/21/2006): I think we can now assert this!
      ROSE_ASSERT(fileNameIndex == 0);
 
+#if 0
+     printf ("\n\n***************************************************** \n");
+     printf ("Calling SgFile::compileOutput() \n");
+     printf ("***************************************************** \n\n\n");
+#endif
+
   // This function does the final compilation of the unparsed file
   // Remaining arguments from the original compile time are used as well
   // as additional arguments added by the buildCompilerCommandLineOptions() function
@@ -4891,18 +5215,23 @@
   // Now call the compiler that rose is replacing
   // if (get_useBackendOnly() == false)
      if ( SgProject::get_verbose() >= 1 )
+        {
           printf ("Now call the backend (vendor's) compiler compilerNameOrig = %s for file = %s \n",compilerNameOrig.c_str(),get_unparse_output_filename().c_str());
+        }
 
   // Build the commandline to hand off to the C++/C compiler
      vector<string> compilerNameString = buildCompilerCommandLineOptions (argv,fileNameIndex, compilerName );
   // ROSE_ASSERT (compilerNameString != NULL);
 
+  // printf ("SgFile::compileOutput(): compilerNameString = \n%s\n",CommandlineProcessing::generateStringFromArgList(compilerNameString,false,false).c_str());
+
      int returnValueForCompiler = 0;
 
   // error checking
   // display("Called from SgFile::compileOutput()");
 
-  // allow conditional skipping of the final compile step for testing ROSE
+  // Allow conditional skipping of the final compile step for testing ROSE.
+  // printf ("SgFile::compileOutput(): get_skipfinalCompileStep() = %s \n",get_skipfinalCompileStep() ? "true" : "false");
      if (get_skipfinalCompileStep() == false)
         {
        // Debugging code
@@ -4991,6 +5320,8 @@
        // exit(1);
         }
 
+  // printf ("In SgProject::compileOutput(): get_C_PreprocessorOnly() = %s \n",get_C_PreprocessorOnly() ? "true" : "false");
+
      if (get_C_PreprocessorOnly() == true)
         {
        // DQ (10/16/2005): Handle special case (issue a single compile command for all files)
@@ -5053,21 +5384,26 @@
         }
        else
         {
+       // printf ("In Project::compileOutput(): Compiling numberOfFiles() = %d \n",numberOfFiles());
+
        // Typical case
           for (i=0; i < numberOfFiles(); i++)
              {
                SgFile & file = get_file(i);
 #if 0
-               printf ("In Project::compileOutput(%s): get_file(%d).get_skipfinalCompileStep() = %s \n",
-                    compilerName,i,(get_file(i).get_skipfinalCompileStep()) ? "true" : "false");
+               printf ("In Project::compileOutput(%s): (in loop) get_file(%d).get_skipfinalCompileStep() = %s \n",compilerName,i,(get_file(i).get_skipfinalCompileStep()) ? "true" : "false");
 #endif
+            // printf ("In Project::compileOutput(): (TOP of loop) file = %d \n",i);
 
             // DQ (8/13/2006): Only use the first file (I don't think this
             // makes sense with multiple files specified on the commandline)!
             // int localErrorCode = file.compileOutput(i, compilerName);
                int localErrorCode = file.compileOutput(0, compilerName);
+
                if (localErrorCode > errorCode)
                     errorCode = localErrorCode;
+
+            // printf ("In Project::compileOutput(): (BASE of loop) file = %d errorCode = %d localErrorCode = %d \n",i,errorCode,localErrorCode);
              }
         }
 
@@ -5209,6 +5545,8 @@
 "                             follow C99 standard, disable C++\n"
 "     -rose:Cxx_only, -rose:Cxx\n"
 "                             follow C++ 89 standard\n"
+"     -rose:OpenMP, -rose:openmp\n"   
+"                             follow OpenMP 3.0 C/C++ specification\n"
 "     -rose:UPC_only, -rose:UPC\n"   
 "                             follow Unified Parallel C 1.2 specification\n"
 "     -rose:upc_threads n     Enable UPC static threads compilation with n threads\n"
@@ -5668,4 +6006,4 @@
 
      return  returnList;
    }
- 
+

Modified: branches/testonly/src/frontend/SageIII/virtualCFG/filteredCFGImpl.h
===================================================================
--- branches/testonly/src/frontend/SageIII/virtualCFG/filteredCFGImpl.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/virtualCFG/filteredCFGImpl.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -15,7 +15,7 @@
         typename Join, typename FilteredEdge > struct MakeClosure
     {
         std::set < CFGNode > visitedNodes;
-        std::set < CFGPath > visitedPaths;
+        std::vector < CFGPath > visitedPaths;
         const FindSuccessors & findSuccessors;
         const FindEnd & findEnd;
         const DontAddChildren & dontAddChildren;
@@ -36,7 +36,7 @@
             if (visitedNodes.find(end) != visitedNodes.end())
                   return;
               visitedNodes.insert(end);
-              visitedPaths.insert(p);
+              visitedPaths.push_back(p);
             if (dontAddChildren(end))
                   return;
               std::vector < CFGEdge > edges = findSuccessors(end);
@@ -49,7 +49,7 @@
         std::vector < FilteredEdge > filter() const
         {
             std::vector < FilteredEdge > edges;
-            for (std::set < CFGPath >::const_iterator i = visitedPaths.begin();
+            for (std::vector < CFGPath >::const_iterator i = visitedPaths.begin();
                  i != visitedPaths.end(); ++i)
             {
                 const CFGPath & p = *i;

Modified: branches/testonly/src/frontend/SageIII/virtualCFG/virtualCFG.C
===================================================================
--- branches/testonly/src/frontend/SageIII/virtualCFG/virtualCFG.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/virtualCFG/virtualCFG.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -659,20 +659,20 @@
 				      vector<CFGEdge> (CFGNode::*closure)() const,
 				      CFGNode (CFGPath::*otherSide)() const,
 				      CFGPath (*merge)(const CFGPath&, const CFGPath&)) {
-    set<CFGPath> rawEdges(orig.begin(), orig.end());
+    vector<CFGPath> rawEdges(orig.begin(), orig.end());
     // cerr << "makeClosure starting with " << orig.size() << endl;
     while (true) {
       top:
       // cerr << "makeClosure loop: " << rawEdges.size() << endl;
-      for (set<CFGPath>::iterator i = rawEdges.begin(); i != rawEdges.end(); ++i) {
+      for (vector<CFGPath>::iterator i = rawEdges.begin(); i != rawEdges.end(); ++i) {
 	if (!((*i).*otherSide)().isInteresting()) {
 	  unsigned int oldSize = rawEdges.size();
 	  vector<CFGEdge> rawEdges2 = (((*i).*otherSide)().*closure)();
 	  for (unsigned int j = 0; j < rawEdges2.size(); ++j) {
 	    CFGPath merged = (*merge)(*i, rawEdges2[j]);
-	    pair<set<CFGPath>::iterator, bool> x = rawEdges.insert(merged);
-	    // if (x.second)
-	      // cerr << "Added " << merged.source().toString() << " -> " << merged.target().toString() << ": " << merged.toString() << endl;
+            if (std::find(rawEdges.begin(), rawEdges.end(), merged) == rawEdges.end()) {
+              rawEdges.push_back(merged);
+            }
 	  }
 	  if (rawEdges.size() != oldSize) goto top; // To restart iteration
 	}
@@ -681,7 +681,7 @@
     }
     // cerr << "makeClosure loop done: " << rawEdges.size() << endl;
     vector<InterestingEdge> edges;
-    for (set<CFGPath>::const_iterator i = rawEdges.begin(); i != rawEdges.end(); ++i) {
+    for (vector<CFGPath>::const_iterator i = rawEdges.begin(); i != rawEdges.end(); ++i) {
       if (((*i).*otherSide)().isInteresting())
 	edges.push_back(InterestingEdge(*i));
     }

Modified: branches/testonly/src/frontend/SageIII/virtualCFG/virtualCFG.h
===================================================================
--- branches/testonly/src/frontend/SageIII/virtualCFG/virtualCFG.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/frontend/SageIII/virtualCFG/virtualCFG.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -72,7 +72,9 @@
     std::vector<SgInitializedName*> scopesBeingEntered() const;
     bool operator==(const CFGEdge& o) const {return src == o.src && tgt == o.tgt;}
     bool operator!=(const CFGEdge& o) const {return src != o.src || tgt != o.tgt;}
+#if 0
     bool operator<(const CFGEdge& o) const {return src < o.src || (src == o.src && tgt < o.tgt);}
+#endif
   };
 
   void makeEdge(CFGNode from, CFGNode to, std::vector<CFGEdge>& result); // Used in inEdges() and outEdges() methods
@@ -136,6 +138,7 @@
     }
     bool operator==(const CFGPath& o) const {return edges == o.edges;}
     bool operator!=(const CFGPath& o) const {return edges != o.edges;}
+#if 0
     bool operator<(const CFGPath& o) const {
       // An arbitrary order
       if (edges.size() != o.edges.size()) {
@@ -148,6 +151,7 @@
       }
       return false;
     }
+#endif
   };
 
   inline CFGPath mergePaths(const CFGPath& hd, const CFGPath& tl) {
@@ -210,7 +214,9 @@
     std::vector<SgInitializedName*> scopesBeingEntered() const {return p.scopesBeingEntered();}
     bool operator==(const InterestingEdge& o) const {return p == o.p;}
     bool operator!=(const InterestingEdge& o) const {return p != o.p;}
+#if 0
     bool operator<(const InterestingEdge& o) const {return p < o.p;}
+#endif
   };
 
   inline InterestingNode makeInterestingCfg(SgNode* start) {

Modified: branches/testonly/src/midend/abstractHandle/loopAdapter.cpp
===================================================================
--- branches/testonly/src/midend/abstractHandle/loopAdapter.cpp	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/abstractHandle/loopAdapter.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -10,8 +10,9 @@
 using namespace std;
 using namespace AbstractHandle;
 
-// an internal map to avoid duplicated nodes for a same file
+// an internal map to avoid duplicated nodes 
 map<string, abstract_node*> file_node_map;
+map<MyLoop*, abstract_node*> loop_node_map;
 
 /* Only handle for loops
 * */
@@ -31,12 +32,20 @@
  return getNode()->sourceFileName;
 }
 
-/* Assume MyLoop only works for flat list of loops, no real parent-child relation 
- * but file node can be treated as their parent here
+/* 
  * */
 abstract_node* loopNode::getParent() const
 {
-  return getFileNode();
+  if (getNode()->parent!=NULL)
+  {
+    abstract_node* result = loop_node_map[getNode()->parent];
+    if (result == NULL)
+      return new loopNode(getNode()->parent);
+    else
+      return result;
+  }
+  else
+    return getFileNode();
 }
 
 /* 
@@ -46,7 +55,10 @@
 {
  abstract_node* filenode = file_node_map[getNode()->sourceFileName];
  if (filenode==NULL)
+ {
    filenode = new fileNode (getNode()->sourceFileName);
+   file_node_map[getNode()->sourceFileName]=filenode;
+ }
  return filenode;
 }
 
@@ -60,16 +72,24 @@
 }
 
 // return the numbering within a scope (file)
-// MyLoop only cares about numbering inside its source file
-// The parameter has to be a fileNode
+// MyLoop can be attached to a file node or another loop node.
+// The parameter must be either of a fileNode or a loopNode
 size_t loopNode::getNumbering(const abstract_node * another_node) const
 {
   int number=1;
   const fileNode* file_node = dynamic_cast<const fileNode*> (another_node);
-  assert(file_node!=NULL);
-  vector<MyLoop*> *loops = file_node->getMLoops();
- for (vector<MyLoop *>::iterator i=(*loops).begin();
-      i!=(*loops).end(); i++)
+  const loopNode* p_loop_node = dynamic_cast<const loopNode*> (another_node);
+
+  vector<MyLoop*> loops;
+
+  if (file_node)
+    loops = file_node->getMLoops();
+  else if (p_loop_node)  
+    loops = p_loop_node->getChildren();
+  else
+    assert(false);
+ for (vector<MyLoop*>::iterator i=loops.begin();
+      i!=loops.end(); i++)
   {
     if ((*i)==getNode())
       break;
@@ -79,10 +99,45 @@
   return number;
 }
 
+AbstractHandle::abstract_node* loopNode::findNode(std::string construct_type_str, AbstractHandle::specifier mspecifier) const
+{
+   abstract_node* result=NULL;
+    //Get all matched nodes according to node type
+  vector<MyLoop*> loops = getChildren();  
+  for (vector<MyLoop *>::iterator i=loops.begin();i!=loops.end();i++)
+  {
+    abstract_node* cnode = new loopNode(*i);
+    if (mspecifier.get_type()==e_position)
+    {
+      if (isEqual(mspecifier.get_value().positions, cnode->getSourcePos()))
+      {
+        result = cnode;
+        break;
+      }
+    }
+    else if (mspecifier.get_type()==e_numbering)
+    {
+      if (mspecifier.get_value().int_v == cnode->getNumbering(this))
+      {
+        result = cnode;
+        break;
+      }
+    }
+    else 
+    {
+      cerr<<"error: unhandled specifier type in loopNode::findNode()"<<endl;
+      assert(false);
+    }
+  }//end for
+  return result;
+
+}
+
 std::string loopNode::toString() const
 {
   std::string result;
-  result= getNode()->loop_code;
+  //We ignore this for simplicity
+  //result= getNode()->loop_code;
   return result;
 }
 
@@ -115,7 +170,7 @@
   abstract_node* result=NULL;
 
   //Get all matched nodes according to node type
-  vector<MyLoop*> loops = *mLoops;  
+  vector<MyLoop*> loops = mLoops;  
 
   for (vector<MyLoop *>::iterator i=loops.begin();i!=loops.end();i++)
   {
@@ -127,6 +182,13 @@
         result = cnode;
         break;
       }
+    } else if (mspecifier.get_type()==e_numbering)
+    {
+      if (mspecifier.get_value().int_v == cnode->getNumbering(this))
+      {
+        result = cnode;
+        break;
+      }
     }
     else 
     {

Modified: branches/testonly/src/midend/abstractHandle/loopAdapter.h
===================================================================
--- branches/testonly/src/midend/abstractHandle/loopAdapter.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/abstractHandle/loopAdapter.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -21,11 +21,14 @@
    virtual bool hasSourcePos() const;
    virtual AbstractHandle::abstract_node* getFileNode() const;
    virtual AbstractHandle::abstract_node* getParent() const;
+   virtual AbstractHandle::abstract_node* findNode(std::string construct_type_str, AbstractHandle::specifier mspecifier) const;
    virtual std::string getFileName() const;
    virtual AbstractHandle::source_position getStartPos() const;
    virtual std::string toString() const;
    virtual size_t getNumbering( const abstract_node*  another_node) const;
    virtual bool operator == (const abstract_node & x) const;
+   //Additional stuff
+   std::vector<MyLoop*> getChildren() const {return mNode->children;};
 protected:
   MyLoop* mNode;
 };
@@ -48,11 +51,11 @@
   virtual bool operator == (const abstract_node & x) const;
 
   //Additional stuff
-  void setMLoops(std::vector<MyLoop*>* myloops ){mLoops = myloops;}
-  std::vector<MyLoop*>* getMLoops() const {return mLoops;}
+  void setMLoops(std::vector<MyLoop*> myloops ){mLoops = myloops;}
+  std::vector<MyLoop*> getMLoops() const {return mLoops;}
 
 protected:
   std::string mfileName;
-  std::vector<MyLoop*>* mLoops;
+  std::vector<MyLoop*> mLoops;
 };
 #endif

Modified: branches/testonly/src/midend/abstractHandle/makefile-myloop
===================================================================
--- branches/testonly/src/midend/abstractHandle/makefile-myloop	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/abstractHandle/makefile-myloop	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,11 +1,11 @@
 testMyLoop:testMyLoop.o abstract_handle.o loopAdapter.o
 	g++ -o testMyLoop testMyLoop.o abstract_handle.o loopAdapter.o
 testMyLoop.o:testMyLoop.cpp myloop.h abstract_handle.h loopAdapter.h 
-	g++ -c testMyLoop.cpp
+	g++ -c -g testMyLoop.cpp
 abstract_handle.o:abstract_handle.cpp abstract_handle.h 
-	g++ -c abstract_handle.cpp
+	g++ -c -g abstract_handle.cpp
 loopAdapter.o:myloop.h loopAdapter.cpp loopAdapter.h 
-	g++ -c loopAdapter.cpp
+	g++ -c -g loopAdapter.cpp
 
 clean:
 	rm -rf *.o testMyLoop

Modified: branches/testonly/src/midend/abstractHandle/myloop.h
===================================================================
--- branches/testonly/src/midend/abstractHandle/myloop.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/abstractHandle/myloop.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,17 +1,19 @@
 /*
  * A toy loop data structure demonstrating a thin client of abstract handles:
- * A simplest loop tool which keeps a flat list of loop information in a file
+ * A simplest loop tool which keeps a tree of loops in a file
  */
 #ifndef my_loop_INCLUDED
 #define my_loop_INCLUDED
 
 #include <string>
+#include <vector>
 class MyLoop 
 {
 public:  
   std::string sourceFileName;
   size_t line_number;
-  std::string loop_code;
+  std::vector<MyLoop*> children; 
+  MyLoop* parent;
 };
 
 #endif

Modified: branches/testonly/src/midend/abstractHandle/testMyLoop.cpp
===================================================================
--- branches/testonly/src/midend/abstractHandle/testMyLoop.cpp	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/abstractHandle/testMyLoop.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -10,32 +10,36 @@
 
 int main()
 {
-  // declare and init a list of loops using MyLoop  
+  //-------------Preparing the internal loop representation---------
+  // declare and initialize a list of loops using MyLoop  
+  // The loop tool should be able to generate its representation from 
+  // source code somehow. We fill it up manually here. 
   vector <MyLoop* > loops;
 
-  MyLoop loop1, loop2;
-
+  MyLoop loop1, loop2, loop3;
   loop1.sourceFileName="file1.c";
   loop1.line_number = 7;
-  loop1.loop_code = "for (i=0;i<100;i++) \n a[i]=0;";
-
+  loop1.parent = NULL;
   loop2.sourceFileName="file1.c";
-  loop2.line_number = 12;
-  loop2.loop_code = "for (i=0;i<100;i++) \n b[i]=0;";
-
+  loop2.line_number = 8;
+  loop2.parent=&loop1;
+  loop1.children.push_back(&loop2);
+  loop3.sourceFileName="file1.c";
+  loop3.line_number = 12;
+  loop3.parent=NULL;
   loops.push_back(&loop1);
-  loops.push_back(&loop2);
+  loops.push_back(&loop3);
 
+  //------------------ using abstract handles-------------
   //Generate the abstract handle  for the source file
   fileNode* filenode = new fileNode("file1.c");
-  filenode->setMLoops(&loops);
- 
+  filenode->setMLoops(loops);
   abstract_handle* file_handle = new abstract_handle(filenode);
   cout<<"Created a file handle:"<<endl<<file_handle->toString()<<endl;
 
-  //Create a loop handle within the file
+  //Create a loop handle within the file using numbering info.
   abstract_node* loop_node1= new loopNode(&loop1);
-  abstract_handle* loop_handle1= new abstract_handle(loop_node1);
+  abstract_handle* loop_handle1= new abstract_handle(loop_node1,e_numbering,file_handle);
   cout<<"Created a loop handle:"<<endl<<loop_handle1->toString()<<endl;
 
   //Create another loop handle within a file using its source position information
@@ -43,5 +47,10 @@
   abstract_handle* loop_handle2= new abstract_handle(file_handle,input1); 
   cout<<"Created a loop handle:"<<endl<<loop_handle2->toString()<<endl;
 
+  //Create yet another loop handle within a loop using its relative numbering information
+  string input2("ForStatement<numbering,1>");
+  abstract_handle* loop_handle3= new abstract_handle(loop_handle1,input2); 
+  cout<<"Created a loop handle:"<<endl<<loop_handle3->toString()<<endl;
+
   return 0;
 }

Modified: branches/testonly/src/midend/astDiagnostics/AstConsistencyTests.C
===================================================================
--- branches/testonly/src/midend/astDiagnostics/AstConsistencyTests.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astDiagnostics/AstConsistencyTests.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -3233,6 +3233,7 @@
             // case V_SgFile:
                case V_SgSourceFile:
                case V_SgBinaryFile:
+               case V_SgUnknownFile:
                case V_SgTypedefSeq:
                case V_SgFunctionParameterTypeList:
                case V_SgPragma:

Modified: branches/testonly/src/midend/astInlining/inlinerSupport.C
===================================================================
--- branches/testonly/src/midend/astInlining/inlinerSupport.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astInlining/inlinerSupport.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -451,14 +451,16 @@
                                   const set<SgFunctionDeclaration*>& s):
     used_decls(u), safe_functions(s) {}
 
+  // Note: this now (11/7/2008) considers pointer derefs and array derefs safe,
+  // which doesn't preserve invalid memory access behavior
   bool isSimpleInitializer(SgExpression* e) {
     if (isSgVarRefExp(e)) return true;
     if (isSgValueExp(e)) return true;
     if (isSgUnaryOp(e) && isSimpleInitializer(isSgUnaryOp(e)->get_operand())) {
-      return isSgBitComplementOp(e) || isSgMinusOp(e) || isSgNotOp(e) || isSgUnaryAddOp(e) || isSgCastExp(e);
+      return isSgBitComplementOp(e) || isSgMinusOp(e) || isSgNotOp(e) || isSgUnaryAddOp(e) || isSgCastExp(e) || isSgPointerDerefExp(e);
     }
     if (isSgBinaryOp(e) && isSimpleInitializer(isSgBinaryOp(e)->get_lhs_operand()) && isSimpleInitializer(isSgBinaryOp(e)->get_rhs_operand())) {
-      return isSgAddOp(e) || isSgAndOp(e) || isSgBitAndOp(e) || isSgBitOrOp(e) || isSgBitXorOp(e) || isSgCommaOpExp(e) || isSgDivideOp(e) || isSgEqualityOp(e) || isSgGreaterOrEqualOp(e) || isSgGreaterThanOp(e) || isSgLessOrEqualOp(e) || isSgLessThanOp(e) || isSgLshiftOp(e) || isSgModOp(e) || isSgMultiplyOp(e) || isSgNotEqualOp(e) || isSgOrOp(e) || isSgRshiftOp(e) || isSgSubtractOp(e);
+      return isSgAddOp(e) || isSgAndOp(e) || isSgBitAndOp(e) || isSgBitOrOp(e) || isSgBitXorOp(e) || isSgCommaOpExp(e) || isSgDivideOp(e) || isSgEqualityOp(e) || isSgGreaterOrEqualOp(e) || isSgGreaterThanOp(e) || isSgLessOrEqualOp(e) || isSgLessThanOp(e) || isSgLshiftOp(e) || isSgModOp(e) || isSgMultiplyOp(e) || isSgNotEqualOp(e) || isSgOrOp(e) || isSgRshiftOp(e) || isSgSubtractOp(e) || isSgPntrArrRefExp(e);
     }
     if (isSgConditionalExp(e)) {
       SgConditionalExp* c = isSgConditionalExp(e);

Modified: branches/testonly/src/midend/astProcessing/AstDOTGeneration.C
===================================================================
--- branches/testonly/src/midend/astProcessing/AstDOTGeneration.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astProcessing/AstDOTGeneration.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -8,6 +8,11 @@
 #include "AstDOTGeneration.h"
 #include "AstConsistencyTests.h"
 
+// DQ (11/6/2008): Added to support the PRIx64 macro for portable (32/64)-bit address I/O.
+// It might be that this should be added more uniformally in ROSE.
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
+
 // DQ (12/31/2005): This is OK if not declared in a header file
 using namespace std;
 
@@ -144,6 +149,97 @@
           nodeoption="color=\"orange\" ";
         }
      string nodelabel=string("\\n")+node->sage_class_name();
+
+  // DQ (10/29/2008): Added some support for additional output of internal names for specific IR nodes.
+  // In generall there are long list of these IR nodes in the binary and this helps make some sense of 
+  // the lists (sections, symbols, etc.).
+     SgAsmExecutableFileFormat* binaryFileFormatNode = isSgAsmExecutableFileFormat(node);
+     if (binaryFileFormatNode != NULL)
+        {
+       // The case of binary file format IR nodes can be especially confusing so we want the 
+       // default to output some more specific information for some IR nodes (e.g. sections).
+          string name;
+          SgAsmGenericSection* genericSection = isSgAsmGenericSection(node);
+          if (genericSection != NULL)
+             {
+               SgAsmGenericString* genericString = genericSection->get_name();
+               ROSE_ASSERT(genericString != NULL);
+
+               name = genericString->get_string();
+             }
+
+          SgAsmGenericSymbol* genericSymbol = isSgAsmGenericSymbol(node);
+          if (genericSymbol != NULL)
+             {
+               SgAsmGenericString* genericString = genericSymbol->get_name();
+               ROSE_ASSERT(genericString != NULL);
+
+               name = genericString->get_string();
+
+               if (name.empty() == true)
+                    name = "no_name_for_symbol";
+             }
+
+          SgAsmGenericDLL* genericDLL = isSgAsmGenericDLL(node);
+          if (genericDLL != NULL)
+             {
+               SgAsmGenericString* genericString = genericDLL->get_name();
+               ROSE_ASSERT(genericString != NULL);
+
+               name = genericString->get_string();
+             }
+
+          SgAsmPEImportHNTEntry* peImportHNTEntry = isSgAsmPEImportHNTEntry(node);
+          if (peImportHNTEntry != NULL)
+             {
+               SgAsmGenericString* genericString = peImportHNTEntry->get_name();
+               ROSE_ASSERT(genericString != NULL);
+
+               name = genericString->get_string();
+             }
+
+          SgAsmDwarfLine* asmDwarfLine = isSgAsmDwarfLine(node);
+          if (asmDwarfLine != NULL)
+             {
+               char buffer[100];
+
+            // It does not work to embed the "\n" into the single sprintf parameter.
+            // sprintf(buffer," Addr: 0x%08"PRIx64" \n line: %d col: %d ",asmDwarfLine->get_address(),asmDwarfLine->get_line(),asmDwarfLine->get_column());
+
+               sprintf(buffer,"Addr: 0x%08"PRIx64,asmDwarfLine->get_address());
+               name = buffer;
+               sprintf(buffer,"line: %d col: %d",asmDwarfLine->get_line(),asmDwarfLine->get_column());
+               name += string("\\n") + buffer;
+             }
+
+          SgAsmDwarfConstruct* asmDwarfConstruct = isSgAsmDwarfConstruct(node);
+          if (asmDwarfConstruct != NULL)
+             {
+               name = asmDwarfConstruct->get_name();
+             }
+
+#if 0
+       // This might not be the best way to implement this, since we want to detect common base classes of IR nodes.
+          switch (node->variantT())
+             {
+               case V_SgAsmElfSection:
+                  {
+                    SgAsmElfSection* n = isSgAsmElfSection(node);
+                    name = n->get_name();
+                    break;
+                  }
+
+               default:
+                  {
+                 // No additional information is suggested for the default case!
+                  }
+             }
+#endif
+
+          if (name.empty() == false)
+               nodelabel += string("\\n") + name;
+        }
+
      nodelabel += additionalNodeInfo(node);
 
   // DQ (11/1/2003) added mechanism to add additional options (to add color, etc.)
@@ -164,8 +260,12 @@
      bool commentoutNode = commentOutNodeInGraph(node);
      if (commentoutNode == true)
         {
+       // DQ (11/10/2008): Fixed to only output message when (verbose_level > 0); command-line option.
        // DQ (7/27/2008): For now just return to test this mechanism, then we want to add comment "//" propoerly to generated DOT file.
-          printf ("Skipping the use of this IR node in the DOT Graph \n");
+          if (SgProject::get_verbose() > 0)
+             {
+               printf ("Skipping the use of this IR node in the DOT Graph \n");
+             }
         }
        else
         {

Modified: branches/testonly/src/midend/astProcessing/AstProcessing.C
===================================================================
--- branches/testonly/src/midend/astProcessing/AstProcessing.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astProcessing/AstProcessing.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -49,7 +49,14 @@
         }
        else
         {
-          isCompilerGeneratedOrPartOfTransformation = node->get_file_info()->isCompilerGenerated() || node->get_file_info()->isTransformation();
+       // DQ (11/14/2008): Implicitly defined functions in Fortran are not marked as compiler generated 
+       // (the function body is at least explicit in the source file), but the function declaration IR 
+       // nodes is marked as coming from file == NULL_FILE and it is also marked as "outputInCodeGeneration"
+       // So it should be traversed so that we can see the function body and so that it can be a proper 
+       // part of the definition of the AST.
+       // isCompilerGeneratedOrPartOfTransformation = node->get_file_info()->isCompilerGenerated() || node->get_file_info()->isTransformation();
+          bool isOutputInCodeGeneration = node->get_file_info()->isOutputInCodeGeneration();
+          isCompilerGeneratedOrPartOfTransformation = node->get_file_info()->isCompilerGenerated() || node->get_file_info()->isTransformation() || isOutputInCodeGeneration;
         }
 
   // Traverse this node if it is in the file we want to visit.

Modified: branches/testonly/src/midend/astRewriteMechanism/rewriteMidLevelInterfaceTemplatesImpl.h
===================================================================
--- branches/testonly/src/midend/astRewriteMechanism/rewriteMidLevelInterfaceTemplatesImpl.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astRewriteMechanism/rewriteMidLevelInterfaceTemplatesImpl.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -333,7 +333,11 @@
 
   // We need the lifetime to be extended beyond that of this function (to avoid purify error)
   // SgFile transformationAST (transformation_argc,transformation_argv,errorCode);
-     SgSourceFile* transformationASTPointer = new SgSourceFile (transformation_argv,errorCode, 0, project);
+     //AS(10/04/08) Because it is hard to get all the initializations correct without doing determine file type we now require the
+     //calling of the constructor directly to create the AST
+  //   SgSourceFile* transformationASTPointer = new SgSourceFile (transformation_argv,errorCode, 0, project);
+     SgSourceFile* transformationASTPointer = isSgSourceFile(determineFileType(transformation_argv, errorCode, project));
+
      ROSE_ASSERT (transformationASTPointer != NULL);
      ROSE_ASSERT (errorCode <= 2);
 
@@ -407,6 +411,7 @@
   // specification via strings.
      NodeCollectionType dataCollection = synthesizedAttribute.treeFragementListArray;
 
+
   // Error checking
      bool notAnEmptyContainer = false;
      for (unsigned int i=0; i < dataCollection.size(); i++)
@@ -414,8 +419,12 @@
           if (dataCollection[i].size() > 0)
                notAnEmptyContainer = true;
         }
-     ROSE_ASSERT (notAnEmptyContainer == true);
 
+    
+     std::cout << "AST NODE " << astNode->class_name() << std::endl;
+     
+     ROSE_ASSERT (notAnEmptyContainer == true || isSgUnknownFile(astNode) != NULL );
+
      return dataCollection;
    }
 

Modified: branches/testonly/src/midend/astUtil/annotation/AnnotCollect.h
===================================================================
--- branches/testonly/src/midend/astUtil/annotation/AnnotCollect.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/annotation/AnnotCollect.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -5,9 +5,10 @@
 #include "OperatorDescriptors.h"
 
 typedef AnnotCollectionBase<OperatorDeclaration> OperatorCollectionBase;
-typedef ReadAnnotCollection<OperatorDeclaration, '{', ';','}'> 
-ReadOperatorCollection;
+typedef ReadAnnotCollection<OperatorDeclaration, '{', ';','}'> ReadOperatorCollection;
 
+//! An interface to read into type(class) and operator(function) annotations
+// Each type of 
 class ReadAnnotation {
   ReadTypeCollection typeInfo;
   ReadOperatorCollection opInfo;

Modified: branches/testonly/src/midend/astUtil/annotation/AnnotDescriptors.C
===================================================================
--- branches/testonly/src/midend/astUtil/annotation/AnnotDescriptors.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/annotation/AnnotDescriptors.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -127,7 +127,7 @@
 
 #ifndef TEMPLATE_ONLY
 //! Read in a class name, could be a derived class with a qualified name
-// "class" is already processed before calling this function
+// "class" is already processed by ReadAnnotation::read() before this function is called.
 bool TypeDescriptor:: read(istream& in)
 {
   if (!StringDescriptor::read(in))

Modified: branches/testonly/src/midend/astUtil/annotation/AnnotDescriptors.h
===================================================================
--- branches/testonly/src/midend/astUtil/annotation/AnnotDescriptors.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/annotation/AnnotDescriptors.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -29,7 +29,7 @@
     //, beginning character 'left' and ending character 'right'
     static void write( const Container& c, std::ostream& out);
 };
-
+//! A pair of items separated by 'sep'
 template <class First, class Second, char sep>
 struct CollectPair : public std::pair<First, Second>
 {
@@ -43,7 +43,7 @@
    void Dump() const  { write(std::cerr); }
    std::string ToString() const { std::stringstream out; write(out); return out.str(); }
 };
-
+//! Similar to CollectPair, but the second item may start with 'sel' without 'sep' in front of it.
 template <class First, class Second, char sep, char sel>
 struct SelectPair : public std::pair<First, Second>
 {
@@ -149,6 +149,7 @@
 {
   std::string name;
  protected:
+  //Return the identifier
   std::string& get_name() { return name; }
  public:
   StringDescriptor() : name("") {}
@@ -211,7 +212,7 @@
   void Dump() const { write(std::cerr); }
   std::string ToString() const { std::stringstream out; write(out); return out.str(); }
 };
-
+//! A descriptor with begin(left) and end(right) characters, such as {x}, (x), etc
 template <class Descriptor, char left, char right>
 class CloseDescriptor : public Descriptor {
  public:

Modified: branches/testonly/src/midend/astUtil/annotation/AnnotExpr.C
===================================================================
--- branches/testonly/src/midend/astUtil/annotation/AnnotExpr.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/annotation/AnnotExpr.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -472,6 +472,7 @@
 void SymbolicFunctionDeclarationGroup::Dump() const
 { write(cerr); }
 
+//! store the function name in r ??  Store the result in 'r' ?
 bool SymbolicFunctionDeclaration:: 
 get_val(const std::vector<SymbolicVal>& parList, SymbolicVal& r) const
 {
@@ -479,6 +480,7 @@
 
   int j = 0;
   r = second;
+  // For each parameter in this function declaration's parameter list
   for (size_t i = 0; i < first.size(); ++i) {
     const ExtendibleParamDescriptor& cur = first[i];
     const SymbolicValDescriptor& cur1 = cur.get_param();
@@ -488,9 +490,9 @@
 	return false;
       ++j;
     }
-    else {
-      string basename = cur1.get_val().toString();
-      string extname = cur.get_extend_var();
+    else { // variable parameter may have range information
+      string basename = cur1.get_val().toString(); // parameter name
+      string extname = cur.get_extend_var();    // extension name
       if (extname == "") {
 	r = ReplaceVal(r, SymbolicVar(basename, AST_NULL), parList[j]);
 	++j;

Modified: branches/testonly/src/midend/astUtil/annotation/AnnotExpr.h
===================================================================
--- branches/testonly/src/midend/astUtil/annotation/AnnotExpr.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/annotation/AnnotExpr.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -6,7 +6,7 @@
 #include "FunctionObject.h"
 #include <stdlib.h>
 #include <vector>
-
+//! SymbolicVal with I/O interface
 class SymbolicValDescriptor
 {
   SymbolicVal val;
@@ -91,10 +91,11 @@
    static std::string get_varname( std::string var, int index);
 };
 
-
+//!  a parameter with a named range of values. parameter:range_name:lower_bound:upper_bound
+// e.g:  _size:dim:1:dimension
 class ExtendibleParamDescriptor 
-  : private SelectPair < SymbolicValDescriptor,
-                         CollectPair<NameDescriptor, 
+  : private SelectPair < SymbolicValDescriptor, // parameter itself 
+                         CollectPair<NameDescriptor, // a range's name followed by its lower and upper bound
                                      CollectPair<SymbolicValDescriptor,
                                                  SymbolicValDescriptor, ':'>,
                                      ':'>,
@@ -125,13 +126,16 @@
   SymbolicValDescriptor& get_param() { return first; }
   std::string get_param_name() const 
         { assert(first.get_val().GetValType() == VAL_VAR); return first.get_val().toString(); }
+  //! Get the name for the range 	
   std::string get_extend_var() const { return second.first; }
+  //! Get the lower bound and upper bound of the parameter
   bool get_extension( int& lb, int& ub) const; 
 
   void replace_var( const std::string& varname, const SymbolicVal& val);
   void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl);
 };
-
+//! A list of parameter descriptors, separated by ',', enclosed in '(..)'
+// Each parameter has a range of values
 class SymbolicParamListDescriptor 
   : public ContainerDescriptor< std::vector <ExtendibleParamDescriptor>, 
                              ExtendibleParamDescriptor,',','(', ')'>
@@ -140,7 +144,10 @@
   void replace_var( const std::string& varname, const SymbolicVal& val);
   void Dump() const;
 };
-
+//! A symbolic function declaration with 
+// a parameter list 'SymbolicParamListDescriptor' and a name (??) 'SymbolicValDescriptor',
+// separated by ':' in their string format
+// Note the reversed order for function name and parameter list
 class SymbolicFunctionDeclaration
  : private CollectPair<SymbolicParamListDescriptor,SymbolicValDescriptor,':'>
 {
@@ -162,7 +169,7 @@
   void replace_var( const std::string& varname, const SymbolicVal& val);
   void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl);
 };
-
+//! A list of symbolic function declarations, separated by ',', enclosed in '(..)'
 class SymbolicFunctionDeclarationGroup
   : public ContainerDescriptor< std::list<SymbolicFunctionDeclaration>, 
                                 SymbolicFunctionDeclaration, ',', '(', ')'>

Modified: branches/testonly/src/midend/astUtil/annotation/CPPAnnotation.h
===================================================================
--- branches/testonly/src/midend/astUtil/annotation/CPPAnnotation.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/annotation/CPPAnnotation.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -9,7 +9,8 @@
 #include "AnnotExpr.h"
 #include <sstream>
 #include <list>
-
+// No CPPAnnotation.C since only template classes are defined here.
+// Descriptor could be ArrayDefineDescriptor: is_array annotation
 template <class Descriptor>
 class CPPTypeCollection 
 {
@@ -17,10 +18,12 @@
  public:
   CPPTypeCollection(TypeCollection<Descriptor>* p) : cp(p) {}
   typedef typename TypeCollection<Descriptor>::const_iterator const_iterator;
+  //! Check if an expression is a member function call expression
+  // If yes, store the object of the member function, argument list , and the collected descriptor for this class
   std::string is_known_member_function( CPPAstInterface& fa, const AstNodePtr& exp, 
                                    AstNodePtr* obj = 0, 
                                    AstInterface::AstNodeList* args = 0,
-                                   Descriptor* desc = 0);
+                                   Descriptor* desc = 0);			   
   std::string is_known_member_function( CPPAstInterface& fa, const SymbolicVal& exp,
                                    AstNodePtr* obj = 0,
                                    SymbolicFunction::Arguments* args = 0,

Modified: branches/testonly/src/midend/astUtil/annotation/OperatorAnnotation.h
===================================================================
--- branches/testonly/src/midend/astUtil/annotation/OperatorAnnotation.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/annotation/OperatorAnnotation.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -171,7 +171,9 @@
       op->add_OperatorCollection(&aliasInfo); 
       op->add_OperatorCollection(&allowaliasInfo); }
 };
-
+//! Replace an operator with another equivalent operation, which is specified by "inline" annotation
+//e.g: operator floatArray::operator() (int index) {  inline { this.elem(index) }; }
+//     All ..array(index).. will be replaced by array.elem(index) in the code
 class OperatorInlineRewrite : public TransformAstTree
 {
  public:

Modified: branches/testonly/src/midend/astUtil/annotation/TypeAnnotation.h
===================================================================
--- branches/testonly/src/midend/astUtil/annotation/TypeAnnotation.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/annotation/TypeAnnotation.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -52,7 +52,8 @@
 typedef AnnotCollectionBase<TypeDescriptor> TypeCollectionBase;
 typedef ReadAnnotCollection<TypeDescriptor, '{', ';','}'> ReadTypeCollection;
 
-//! A map storing types and their descriptors
+//! A map storing types and their descriptors, the descriptor could be any instantiated types as a template class
+// Descriptor could be either of has_value, array, array_opt annoation types
 template <class Descriptor>
 class TypeCollection 
 {

Modified: branches/testonly/src/midend/astUtil/astInterface/AstInterface.C
===================================================================
--- branches/testonly/src/midend/astUtil/astInterface/AstInterface.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/astInterface/AstInterface.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -434,6 +434,11 @@
         assert(mf != 0);
         return mf;
      }
+     else
+     {
+       cerr <<"AstInterface.C GetMemberFunc() cannot find a symbol for "<<funcname<<" within a class "<<classname<< endl;
+       isSgScopeStatement(def)->print_symboltable("Dump the symbol table of the class definition:");
+     }
   }
   else {
      SgDeclarationStatementPtrList & decls = def->get_members ();
@@ -625,7 +630,10 @@
 
   // Build the AST
   // std::cerr << "generating declaration: \n";
-     SgSourceFile* addDecls = new SgSourceFile(argv, error);
+     //SgSourceFile* addDecls = new SgSourceFile(argv, error);
+     //AS (10/04/08) using factory function to determine file type. This is due to
+     //cleanup of ROSE code
+     SgSourceFile* addDecls = isSgSourceFile(determineFileType(argv,error,0));
   // std::cerr << "Finished generating declaration \n";
 
   // system( "rm _astInterface_Tmp.c");
@@ -1216,7 +1224,8 @@
   }
   return true;
 }
-
+//! Check if a node is an assignment statement/expression, grab its lhs and rhs
+//Set readlhs to false if the operation is not Assign op (Others read lhs and write it also)
 bool AstInterface::
 IsAssignment( const AstNodePtr& _s, AstNodePtr* lhs, AstNodePtr* rhs, bool *readlhs) 
 { 
@@ -1254,6 +1263,7 @@
   return false;
 }
 
+//! Check if a node is a variable declaration, store its declared variables and initial values
 bool AstInterface:: 
 IsVariableDecl(const AstNodePtr& _s, AstNodeList* vars, AstNodeList* init)
 {
@@ -1427,6 +1437,7 @@
   return true;
 }
 
+//! Two references are the same if they have the same name and same scope
 bool AstInterface::
 IsSameVarRef( const AstNodePtr& _n1, const AstNodePtr& _n2)
 {
@@ -1759,10 +1770,12 @@
      }
      return false;
     }
-  }
+  } // end switch
   return true;
 }
 
+//! Check if _s is an array access.
+//If so, store array name in array, and subscripts into index[], Liao 11/5/2008
 bool AstInterface::
 IsArrayAccess( const AstNodePtr& _s, AstNodePtr* array, AstNodeList* index)
 {
@@ -1876,6 +1889,7 @@
   return true;
 }
 
+//! Check if a node is an unary operation , return its operation type and operand when needed
 bool AstInterface::
 IsUnaryOp( const AstNodePtr& _exp, OperatorEnum* opr, AstNodePtr* opd) 
 { 
@@ -1926,7 +1940,7 @@
   };
   return false;
 }
-
+//! Check if there is a function call: store its declaration and argument list
 bool AstInterfaceImpl::
 IsFunctionCall( SgNode* s, SgNode** func, AstNodeList* args)
 {
@@ -1943,7 +1957,7 @@
   case V_SgFunctionCallExp:
     {
       SgFunctionCallExp *fs = isSgFunctionCallExp(exp);
-      f = fs->get_function();
+      f = fs->get_function(); //Should be SgFunctionRefExp
       argexp = fs->get_args();
     }
     break;
@@ -1998,6 +2012,9 @@
     *func = f;
   return true;
 }
+//! Check if a node is a function all, store function declaration, argument list, 
+//outargs: arguments using pass-by-reference, only consider C++ reference type now
+// parameter type list, return type
 bool AstInterface::
 IsFunctionCall( const AstNodePtr& _s, AstNodePtr* fname, AstNodeList* args, 
                 AstNodeList* outargs, AstTypeList* paramtypes, AstNodeType* returntype)
@@ -2169,7 +2186,8 @@
       lb = 0;
       return IsConstInt( AstNodePtrImpl(exp), &ub);
     }
-
+//! Check if _s is an expression, 
+// If yes, return its real expression node (strip off SgExpressionRoot) and grab its type
 AstNodePtr AstInterface::
 IsExpression( const AstNodePtr& _s, AstNodeType* exptype)
 {

Modified: branches/testonly/src/midend/astUtil/astInterface/AstInterface.h
===================================================================
--- branches/testonly/src/midend/astUtil/astInterface/AstInterface.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/astInterface/AstInterface.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -185,9 +185,13 @@
   bool IsConstInt( const AstNodePtr& exp, int* value = 0) ;
   AstNodePtr CreateConstInt( int val)  ;
 
+  //!Check if a node is storing values for int, string, char, float, double, enum, etc
   bool IsConstant( const AstNodePtr& exp, std::string* valtype=0, std::string* value = 0) ;
+  //! Create an AST for valtype of the following types: more than just constant values
+  // int, bool, string, char, float, double, function, memberfunction, field
+  // e.g: CreateConstant("memberfunction","floatArray::length")
   AstNodePtr CreateConstant( const std::string& valtype, const std::string& val);
-
+  //! Check if a node is a variable reference. If yes, get its  type, name, scope, and global/local information
   bool IsVarRef( const AstNodePtr& exp, AstNodeType* vartype = 0,
                    std::string* varname = 0, AstNodePtr* scope = 0, 
                     bool *isglobal = 0) ;
@@ -238,7 +242,7 @@
    virtual ~ProcessAstNode() {}
 };
 
-// Interface to invoke any analyzer on AST
+// Interface to invoke any analyzer 'op' on AST sub tree from 'root'
 bool ReadAstTraverse(AstInterface& fa, const AstNodePtr& root, 
                         ProcessAstNode& op, 
                         AstInterface::TraversalOrderType t = AstInterface::PreOrder); 

Modified: branches/testonly/src/midend/astUtil/astInterface/CPPAstInterface.C
===================================================================
--- branches/testonly/src/midend/astUtil/astInterface/CPPAstInterface.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/astInterface/CPPAstInterface.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -3,7 +3,9 @@
 #include "CPPAstInterface.h"
 #include "AstInterface_ROSE.h"
 using namespace std;
-
+//! Check if a node is a data member access function for an object, 
+// such as dot (object.a) or arrow (objectptr->a)expression
+// If yest, return the object, and the data field name
 bool CPPAstInterface ::
 IsMemberAccess( const AstNodePtr& _s,  AstNodePtr* obj, std::string* field)
 {
@@ -40,7 +42,9 @@
   return AstNodePtrImpl(impl->CreateFunctionCall(AstNodePtrImpl(func).get_ptr(), args));
 }
 
-
+//Check if a node '_s' is a member function call of an object
+// If yes, store the object into 'obj', member function name into 'func', function arguments into '_args'
+// and the dot or arrow expressions nodes into 'access'
 bool CPPAstInterface :: 
 IsMemberFunctionCall( const AstNodePtr& _s,  AstNodePtr* obj, 
                       std::string* func,
@@ -52,32 +56,37 @@
   if (!impl->IsFunctionCall(s, &f, &args)) {
     return false;
   }
+  //Excluding member function reference expressions.
   switch (f->variantT()) {
-  case V_SgMemberFunctionRefExp:
+    case V_SgMemberFunctionRefExp:
         break;
-  default:
+    default:
        return false;
   }
+  //Store member function access nodes: dot, or arrow expressions in ROSE AST
   if (access != 0) {
      AstNodePtrImpl dot = f->get_parent();
      assert( dot->variantT() == V_SgDotExp ||
              dot->variantT() == V_SgArrowExp);
      *access = dot;
   }
+  //Store the member function's name
   if (func != 0)
     *func = isSgMemberFunctionRefExp(f)->get_symbol()->get_name().str();
 
+  //Store object from the first argument
   if (obj != 0) {
      assert(args.size() > 0);
      *obj = args.front();
   }
+  //Store function call arguments, excluding the firt one
   if (_args != 0) {
      args.erase( args.begin());
      *_args = args;
    }
   return true;
 }
-
+//! Check if a node is a variable reference to pointer or C++ reference type variables
 bool CPPAstInterface :: IsPointerVariable( const AstNodePtr& _n)
 {
   SgNode* n = AstNodePtrImpl(_n).get_ptr();

Modified: branches/testonly/src/midend/astUtil/astInterface/CPPAstInterface.h
===================================================================
--- branches/testonly/src/midend/astUtil/astInterface/CPPAstInterface.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/astInterface/CPPAstInterface.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -7,9 +7,15 @@
 {
  public:
   CPPAstInterface(AstInterfaceImpl* _impl) : AstInterface(_impl) {}
+  //! Check if a node is a data member access function for an object, 
+  // such as dot (object.a) or arrow (objectptr->a)expression
+  // If yest, return the object, and the data field name
   bool IsMemberAccess( const AstNodePtr& n, AstNodePtr* obj = 0,
                                          std::string* fieldname = 0);
 
+  //Check if a node '_s' is a member function call of an object
+  // If yes, store the object into 'obj', member function name into 'func', function arguments into '_args'
+  // and the dot or arrow expressions nodes into 'access'
   bool IsMemberFunctionCall( const AstNodePtr& n, 
                                        AstNodePtr* obj = 0,
 	                               std::string* funcname = 0, 
@@ -17,6 +23,7 @@
                                        AstInterface::AstNodeList* args = 0);
   AstNodePtr CreateFunctionCall( const AstNodePtr& func, 
                           const AstInterface::AstNodeList& args);
+  //! Check if a node is a variable reference to pointer or C++ reference type variables
   bool IsPointerVariable( const AstNodePtr& n); 
   AstNodePtr GetVarScope( const AstNodePtr& n);
 

Modified: branches/testonly/src/midend/astUtil/astSupport/AnalysisInterface.h
===================================================================
--- branches/testonly/src/midend/astUtil/astSupport/AnalysisInterface.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/astSupport/AnalysisInterface.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -66,7 +66,7 @@
    { return false; }
   virtual ~NoFunctionAliasAnalysis() {}
 };
-
+//! Abstract interface to alias analysis
 class AliasAnalysisInterface
 {
  public:

Modified: branches/testonly/src/midend/astUtil/astSupport/ProcessAstTree.C
===================================================================
--- branches/testonly/src/midend/astUtil/astSupport/ProcessAstTree.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/astSupport/ProcessAstTree.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -68,7 +68,7 @@
       cur = tmp;
       return r;
     }
-
+//-----------------ProcessAstTree -------------------
 bool ProcessAstTree:: ProcessLoop(AstInterface &fa, const AstNodePtr& s, const AstNodePtr& body,
 	                       AstInterface::TraversalVisitType t) 
      { 

Modified: branches/testonly/src/midend/astUtil/astSupport/ProcessAstTree.h
===================================================================
--- branches/testonly/src/midend/astUtil/astSupport/ProcessAstTree.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/astSupport/ProcessAstTree.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -11,7 +11,9 @@
   typedef enum {BEFORE = 1, AT = 2, INSIDE = 4, BEFORE_AT = 3, INSIDE_AT = 6} TraverseLocation;
  private:
   struct TraverseState{ 
-      AstNodePtr scope;  int state;  int skip;
+      AstNodePtr scope; 
+      int state;  
+      int skip;
       TraverseState( const AstNodePtr &_scope, int _skip, 
                      TraverseLocation _state)
                     : scope(_scope), state(_state), skip(_skip) {}
@@ -28,6 +30,7 @@
   TraverseState GetScope() const;
   void PopScope();
   void PushScope( const AstNodePtr& scope, int skip, TraverseLocation state);
+  //! Inherited from ProcessAstNode
   bool Traverse( AstInterface &fa, const AstNodePtr& s, 
                       AstInterface::TraversalVisitType t);
  protected:
@@ -38,6 +41,7 @@
   void SkipUntil( const AstNodePtr& s);
   void SkipOnly( const AstNodePtr& s);
  public:
+  //! Read only traverse
   bool operator()( AstInterface &fa, const AstNodePtr& s);
 
 // DQ (2/18/2008): Added to fix warning from GNU g++

Modified: branches/testonly/src/midend/astUtil/astSupport/StmtInfoCollect.C
===================================================================
--- branches/testonly/src/midend/astUtil/astSupport/StmtInfoCollect.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/astSupport/StmtInfoCollect.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -85,7 +85,7 @@
    else  {
       if (DebugLocalInfoCollect()) 
          std::cerr << "previsiting cur node " << AstToString(s) << "\n";
-      if (curstmt == AST_NULL) {
+      if (curstmt == AST_NULL) { //Fixup curstmt if not yet set
         AstNodePtr s1 = fa.GetParent(s);
         for ( ; s1 != AST_NULL && !fa.IsStatement(s1); s1 = fa.GetParent(s1));
         if (s1 != AST_NULL)
@@ -102,8 +102,11 @@
    bool readlhs = false;
 
    if (fa.IsAssignment(s, &lhs, &rhs, &readlhs)) {
+     // For an assignment statement or expression, 
+     // get its lhs, rhs, and check if lhs is being read also 
      ModMap *mp = modstack.size()?  &modstack.back().modmap : 0;
      if (mp == 0 || mp->find(lhs) == mp->end()) {
+       // Add a new stack entry and ModRecord only for lhs not visited before
         modstack.push_back(s);
         modstack.back().modmap[lhs] =  ModRecord( rhs,readlhs); 
      }
@@ -140,12 +143,16 @@
          if (DebugLocalInfoCollect()) 
              std::cerr << " append function call " << AstToString(s) << std::endl;
          AppendFuncCall(fa, s);
-         Skip(s);
+         Skip(s); 
      }
      if ( fa.IsMemoryAccess(s)) {
         ModMap *mp = modstack.size()?  &modstack.back().modmap : 0;
+        //Get the latest ModMap from modstack
+        //If cannot find a record for s, then s is being read
+        //Or if can find a record for s, but readlhs is true, then s is being read
         if (mp == 0 || mp->find(s) == mp->end() || (*mp)[s].readlhs)
            AppendReadLoc(fa, s);
+        // For array reference, collect references in its subscripts one by one   
         if (fa.IsArrayAccess(s, 0, &args))  {
            for (AstInterface::AstNodeList::const_iterator p = args.begin(); 
                 p != args.end();  ++p) {
@@ -157,7 +164,7 @@
       }
    }   
  }
- else {
+ else { // only for post-visiting 
       if (DebugLocalInfoCollect()) 
          std::cerr << "postvisiting cur node " << AstToString(s) << "\n";
        if (modstack.size() && modstack.back().root == s) {
@@ -366,7 +373,8 @@
      return get_unique_name(fname, func, varname);
  }
 
-
+//! Find the alias group of a variable named 'varname' within 'scope'
+// Create a new alias group if it does not exist for this variable
 UF_elem*  StmtVarAliasCollect::VarAliasMap::
 get_alias_map( const std::string& varname, const AstNodePtr& scope)
 {

Modified: branches/testonly/src/midend/astUtil/astSupport/StmtInfoCollect.h
===================================================================
--- branches/testonly/src/midend/astUtil/astSupport/StmtInfoCollect.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/astSupport/StmtInfoCollect.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -9,23 +9,29 @@
 #include "union_find.h"
 #include <map>
 #include <sstream>
-
+//! An abstract class to collect read/mod/call information
 class StmtInfoCollect : public ProcessAstTreeBase
 { 
  protected:
+  //Store the rhs operand (read) of operations, indicate if lhs is also read 
   struct ModRecord{
      AstNodePtr rhs;
-     bool readlhs;
+     bool readlhs; //Some operations like +=, -= also read lhs operand
+     // default constructor: 
      ModRecord() : readlhs(false) {}
+     // Constructor
      ModRecord( const AstNodePtr& _rhs, bool _readlhs)
       : rhs(_rhs), readlhs(_readlhs) {}
   };
+  // A map between a lhs operand (write) and its corresponding rhs operand
   typedef std::map<AstNodePtr, ModRecord, std::less<AstNodePtr> > ModMap;
+
   struct ModStackEntry {
-      AstNodePtr root;
-      ModMap modmap;
+      AstNodePtr root; //The statement/expression in question
+      ModMap modmap;   // Its lhs and rhs operand
       ModStackEntry(const AstNodePtr& r) : root(r) {}
   };
+  //Use: modstack.back().modmap[lhs] =  ModRecord( rhs,readlhs); 
   std::list<ModStackEntry> modstack;
   AstNodePtr curstmt;
  protected:
@@ -44,6 +50,7 @@
 };
 
 class FunctionSideEffectInterface;
+//! Collect statement side effects with the help of side effect analysis
 class StmtSideEffectCollect 
 : public StmtInfoCollect, public SideEffectAnalysisInterface
 {
@@ -66,6 +73,7 @@
 		       CollectObject<std::pair<AstNodePtr,AstNodePtr> >* collectread = 0,
                        CollectObject<std::pair<AstNodePtr,AstNodePtr> >* collectkill = 0)
     { return operator()( fa, h, collectmod, collectread, collectkill); }
+  //! Collect mod, read, and kill information for a node h using an interface fa  
   bool operator()( AstInterface& fa, const AstNodePtr& h, 
                    CollectObject< std::pair<AstNodePtr,AstNodePtr> >* mod, 
                    CollectObject< std::pair<AstNodePtr,AstNodePtr> >* read=0,
@@ -131,6 +139,8 @@
                delete (*p).second;
          }
        }
+       //! Find the alias group of a variable named 'varname' within 'scope'
+      // Create a new alias group if it does not exist for this variable
        UF_elem* get_alias_map( const std::string& varname, const AstNodePtr& scope);
    };
  private:
@@ -139,6 +149,7 @@
   bool hasunknown, hasresult;
 
   UF_elem* get_alias_map( const std::string& varname, const AstNodePtr& scope);
+  // Inherited from StmtInfoCollect
   virtual void AppendModLoc( AstInterface& fa, const AstNodePtr& mod,
                               const AstNodePtr& rhs = AstNodePtr());
   virtual void AppendFuncCall( AstInterface& fa, const AstNodePtr& fc);
@@ -147,29 +158,36 @@
   StmtVarAliasCollect( FunctionAliasInterface* a = 0) 
     : funcanal(a), hasunknown(false), hasresult(false) {}
   void operator()( AstInterface& fa, const AstNodePtr& funcdefinition);
+  // Inherited from AliasAnalysisInterface: if r1 and r2 may be alias to each other
   bool may_alias(AstInterface& fa, const AstNodePtr& r1, 
 		 const AstNodePtr& r2);
 };
 
+//! An interface to collect modified variables for a set of AST nodes chosen by 'Select', such as loop nodes 
+// and to query if a variable is modifed within the node (e.g: loop)
 template <class Select>
 class ModifyVariableMap 
    : public CollectObject<std::pair<AstNodePtr,AstNodePtr> >,
      public StmtSideEffectCollect
 {
   AstInterface& ai;
+  // A set of AST node pointers
   class VarModSet : public std::set<AstNodePtr> {};
+  // A map between a named variable and the AST nodes(selected by 'Select') modifying it.
   typedef std::map <std::string, VarModSet, std::less<std::string> > VarModInfo;
   VarModInfo varmodInfo;
   Select sel;
+  // Collect the loops containing nodes modifying a variable
   bool operator()(const std::pair<AstNodePtr,AstNodePtr>& cur)
    {
      std::string varname;
      if (ai.IsVarRef(cur.first,0, &varname)) {
          AstNodePtr l = ai.GetParent(cur.first);
-         VarModSet& cur = varmodInfo[varname];
+         VarModSet& modset = varmodInfo[varname];
+	 // Collect all the parent loops containing the variable reference node into the var mod set
          for ( ; l != AST_NULL; l = ai.GetParent(l)) {
-           if (sel(ai,l))
-              cur.insert(l);
+           if (sel(ai,l)) 
+              modset.insert(l);
          }
      }
      return true;
@@ -182,13 +200,17 @@
      {
       StmtSideEffectCollect::get_side_effect(ai, root, this);
      }
+   // Check if a node ( e.g: loop node) modifies a variable named 'varname'  
    bool Modify( const AstNodePtr& l, const std::string& varname) const
       { 
+         // Find mode set for the variable 
          typename VarModInfo::const_iterator p = varmodInfo.find(varname);
          if (p != varmodInfo.end()) {
+	    // Return true if the node is NULL. It means this variable is actually modified somewhere.
             if (l == AST_NULL)
                  return true;
             const VarModSet& cur = (*p).second;
+	    // Find node in the mod set
             return cur.find(l) != cur.end();
          }
          else

Modified: branches/testonly/src/midend/astUtil/symbolicVal/SymbolicBound.C
===================================================================
--- branches/testonly/src/midend/astUtil/symbolicVal/SymbolicBound.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/symbolicVal/SymbolicBound.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -37,7 +37,7 @@
         r.Intersect( r2);
     return r;
 }
-
+//! A map for symbolic variables and their bound information
 class ValGetBound : public SymbolicVisitor
 {
  protected:

Modified: branches/testonly/src/midend/astUtil/symbolicVal/SymbolicBound.h
===================================================================
--- branches/testonly/src/midend/astUtil/symbolicVal/SymbolicBound.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/symbolicVal/SymbolicBound.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -3,7 +3,7 @@
 
 #include "SymbolicVal.h"
 #include <map>
-
+//! A single variable's bound
 class SingleValBound : public MapObject<SymbolicVal, SymbolicBound>
 {
   SymbolicVal val;

Modified: branches/testonly/src/midend/astUtil/symbolicVal/SymbolicVal.h
===================================================================
--- branches/testonly/src/midend/astUtil/symbolicVal/SymbolicVal.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/astUtil/symbolicVal/SymbolicVal.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -27,12 +27,15 @@
   virtual ~SymbolicVisitor() {}
 };
 
+//! Supported symbolic expression value types: only integer?
 typedef enum {VAL_BASE = 0, VAL_CONST = 1, VAL_VAR = 2, VAL_AST = 4, 
               VAL_FUNCTION = 8, VAL_EXPR = 16}
       SymbolicValType;
+//! Supported operators: *, +, -, max(), power(^)      
 typedef enum { SYMOP_NIL = 0, SYMOP_MULTIPLY=1, SYMOP_PLUS = 2,
                SYMOP_MIN=3, SYMOP_MAX=4, SYMOP_POW = 5} SymOpType;
 
+//! Base interface for symbolic values
 class SymbolicValImpl 
 {
  protected:
@@ -54,11 +57,11 @@
 inline SymbolicValImpl* Clone(const SymbolicValImpl& that) 
   { return that.Clone(); }
 
-
+//! Constant symbol for integers and fractions
 class SymbolicConst : public SymbolicValImpl
 {
-  std:: string val, type;
-  int intval, dval;
+  std:: string val, type;//val: string format; type: one of "int" or "fraction"
+  int intval, dval; // dval is for denominator of a fraction type
 
   SymbolicValImpl* Clone() const { return new SymbolicConst(*this); }
  public:
@@ -90,6 +93,7 @@
   std:: string GetVal() const { return val; }
 };
 
+//! Symbolic variable: name and scope
 class SymbolicVar : public SymbolicValImpl
 {
   std:: string varname;
@@ -139,6 +143,7 @@
   const AstNodePtr& get_ast() const { return ast; }
 };
 
+//! A count reference handle to all kinds of symbolic items, including variables and values
 class SymbolicVal : public CountRefHandle <SymbolicValImpl>
 {
  public:
@@ -211,7 +216,7 @@
 
 class SymbolicFunction : public SymbolicValImpl
 {
-  std:: string op;
+  std:: string op; // Function name?
   std:: vector<SymbolicVal> args;
  protected:
   typedef AstInterface::OperatorEnum OpType;
@@ -252,7 +257,8 @@
   virtual SymbolicFunction* cloneFunction(const Arguments& args) const
      { return  new SymbolicFunction(t, op,args); }
 };
-
+//! Check if a symbolic variable is a function call expression
+// If yes, return function name and parameter list
 inline bool 
 SymbolicVal:: isFunction(std:: string& name, std:: vector<SymbolicVal>* argp) const
 {
@@ -303,6 +309,7 @@
 typedef enum {REL_NONE = 0, REL_EQ = 1, REL_LT = 2, REL_LE = 3,
               REL_GT = 4, REL_GE = 5, REL_NE = 6, REL_UNKNOWN = 8} CompareRel;
  
+//! Symbolic conditions: x>y  
 class SymbolicCond
 {
   SymbolicVal val1, val2;
@@ -328,7 +335,7 @@
   std:: string toString () const;
   AstNodePtr  CodeGen(AstInterface &fa) const;
 };
-
+//! A bound using symbolic lower bound and upper bound
 struct SymbolicBound{
   SymbolicVal lb, ub;
   SymbolicBound() {}
@@ -397,6 +404,7 @@
                          const SymbolicVar &pivot, SymbolicBound& pivotBound ); //return pivot coefficient
 
 bool FindVal( const SymbolicVal &v, const SymbolicVal &sub);
+//! Replace the variable 'sub' in 'v' with 'newval'
 SymbolicVal ReplaceVal( const SymbolicVal &v, const SymbolicVal &sub, const SymbolicVal& newval);
 SymbolicVal ReplaceVal( const SymbolicVal &v, MapObject<SymbolicVal, SymbolicVal>& valmap);
 

Modified: branches/testonly/src/midend/binaryAnalyses/RoseBin_FlowAnalysis.cpp
===================================================================
--- branches/testonly/src/midend/binaryAnalyses/RoseBin_FlowAnalysis.cpp	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/binaryAnalyses/RoseBin_FlowAnalysis.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -570,7 +570,7 @@
     ROSE_ASSERT(stat);
 
     //   if (RoseBin_support::DEBUG_MODE())
-    //      cout << " checking statement in function : " << name << " .. " << stat->class_name() << endl;
+    //    cout << ">>>>>>>>>>>>>. checking statement in function : " << name << " .. " << stat->class_name() << endl;
     if (isSgAsmInstruction(stat)) {
       SgAsmInstruction* inst = isSgAsmInstruction(stat);
       ROSE_ASSERT(inst);
@@ -666,7 +666,7 @@
 	src= vizzGraph->checkIfGraphNodeExists(hexStr);
 	if (src==NULL) {
 	  src= vizzGraph->createNode (src_mnemonic, typeNode, src_address, vizzGraph->graph->get_graph_id(), false, thisbin);
-	
+
 	  string unp_name = unparseInstructionWithAddress(thisbin);
 	  src->append_properties(RoseBin_Def::name,unp_name);
 	  if (analysisName=="dfa")
@@ -779,9 +779,10 @@
 	  target_visited=true;
       
 	if (trg==NULL) {
-	  if (analysisName=="callgraph") 
+	  if (analysisName=="callgraph") { 
+	    //	    cerr << " >>> TARGET FUNC NAME " << trg_func_name << endl;
 	    trg = vizzGraph->createNode (trg_func_name, typeNode, trg_func_address, vizzGraph->graph->get_graph_id(),false, funcDeclparent);
-	  else
+	  }	  else
 	    trg = vizzGraph->createNode (trg_mnemonic, typeNode, trg_address, vizzGraph->graph->get_graph_id(),false, bin_target);
 	
 	  string unp_name = unparseInstructionWithAddress(bin_target);

Modified: branches/testonly/src/midend/binaryAnalyses/RoseBin_FlowAnalysis.h
===================================================================
--- branches/testonly/src/midend/binaryAnalyses/RoseBin_FlowAnalysis.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/binaryAnalyses/RoseBin_FlowAnalysis.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -32,6 +32,16 @@
     }
 };
 
+class FindSgFunctionsVisitor: public std::binary_function<SgNode*, std::vector<SgFunctionDeclaration *>* , void* >
+{
+  public:
+    void* operator()(first_argument_type node, std::vector<SgFunctionDeclaration*>* insns ) const{
+      if (isSgFunctionDeclaration(node)) insns->push_back(isSgFunctionDeclaration(node));
+      return NULL;
+    }
+};
+
+
 class FindInstructionsVisitor: public std::binary_function<SgNode*, std::vector<SgAsmInstruction *>* , void* >
 {
  public:
@@ -41,6 +51,7 @@
   }
 };
 
+
 class FindInstructionsVisitorx86: public std::binary_function<SgNode*, std::vector<SgAsmx86Instruction *>* , void* >
 {
  public:
@@ -50,7 +61,7 @@
   }
 };
 
-class FindStatementsVisitor: public std::binary_function<SgNode*, std::vector<SgAsmStatement *>* , void* >
+class FindAsmStatementsVisitor: public std::binary_function<SgNode*, std::vector<SgAsmStatement *>* , void* >
 {
  public:
   void* operator()(first_argument_type node, std::vector<SgAsmStatement*>* insns ) const{
@@ -59,6 +70,38 @@
   }
 };
 
+class FindAsmStatementsHeaderVisitor: public std::binary_function<SgNode*, std::vector<SgAsmNode *>* , void* >
+{
+ public:
+  void* operator()(first_argument_type node, std::vector<SgAsmNode*>* insns ) const{
+    if (isSgAsmStatement(node)) insns->push_back(isSgAsmStatement(node));
+    if (isSgAsmExecutableFileFormat(node)) insns->push_back(isSgAsmExecutableFileFormat(node));
+    return NULL;
+  }
+};
+
+class FindStatementsVisitor: public std::binary_function<SgNode*, std::vector<SgStatement *>* , void* >
+{
+ public:
+  void* operator()(first_argument_type node, std::vector<SgStatement*>* insns ) const{
+    if (isSgStatement(node)) 
+      //      if (!isSgStatement(node)->get_file_info()->isCompilerGenerated())
+	insns->push_back(isSgStatement(node));
+	//}
+    return NULL;
+  }
+};
+
+class FindNodeVisitor: public std::binary_function<SgNode*, std::vector<SgLocatedNode *>* , void* >
+{
+ public:
+  void* operator()(first_argument_type node, std::vector<SgLocatedNode*>* insns ) const{
+    if (isSgNode(node)) 
+      insns->push_back(isSgLocatedNode(node));
+    return NULL;
+  }
+};
+
 // ************************************************************************************
 
 

Modified: branches/testonly/src/midend/binaryAnalyses/graph/RoseBin_DotGraph.cpp
===================================================================
--- branches/testonly/src/midend/binaryAnalyses/graph/RoseBin_DotGraph.cpp	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/binaryAnalyses/graph/RoseBin_DotGraph.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -26,7 +26,7 @@
 
 void 
 RoseBin_DotGraph::printNodesCallGraph(std::ofstream& myfile) {
-  cerr << " Preparing graph - Nr of Nodes : " << nodes.size() << "  forward analysis : " << endl;
+  cerr << " Preparing graph - Nr of Nodes : " << nodes.size() << endl;
 
   int counter=nodes.size();
   rose_hash::hash_set <std::string> funcNames;
@@ -104,7 +104,7 @@
 	  interrupt = true;
 	else if (addr==RoseBin_Def::name)
 	  name = prop->second;
-     }
+      }
       
 
       funcNr++;
@@ -115,53 +115,63 @@
       //if (grouping) {
       //	add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=red,fontname=\"7x13bold\",fontcolor=black,style=filled";
       //} else {
-	if (nodest_jmp)
-	  add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=red,fontname=\"7x13bold\",fontcolor=black,style=filled";
-	else if (nodest_call)
-	  add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=orange,fontname=\"7x13bold\",fontcolor=black,style=filled";
-	else if (interrupt)
-	  add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=blue,fontname=\"7x13bold\",fontcolor=black,style=filled";
-	else if (error)
-	  add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=lightblue,fontname=\"7x13bold\",fontcolor=black,style=filled";
-	else
-	  add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=purple,fontname=\"7x13bold\",fontcolor=black,style=filled";
-	//}
+      if (nodest_jmp)
+	add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=red,fontname=\"7x13bold\",fontcolor=black,style=filled";
+      else if (nodest_call)
+	add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=orange,fontname=\"7x13bold\",fontcolor=black,style=filled";
+      else if (interrupt)
+	add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=blue,fontname=\"7x13bold\",fontcolor=black,style=filled";
+      else if (error)
+	add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=lightblue,fontname=\"7x13bold\",fontcolor=black,style=filled";
+      else
+	add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=purple,fontname=\"7x13bold\",fontcolor=black,style=filled";
+      //}
 
-    string funcName = func->get_name();
-    int pos = funcName.find("+");
-    if (pos<=0) pos=funcName.find("-");
-    if (pos<=0) pos=funcName.length();
-    funcName=funcName.substr(0,pos);
+      string funcName = func->get_name();
+      int pos = funcName.find("+");
+      if (pos<=0) pos=funcName.find("-");
+      if (pos<=0) pos=funcName.length();
+      funcName=funcName.substr(0,pos);
 
       RoseBin_support::checkText(name);
+      //cerr << " +++ funcName " << funcName << "     name: " << name << endl;
  
       myfile << "subgraph \"cluster_" <</*name*/ hex_address<< "\" { \n"; 
       myfile << "\"" << hex_address << "\"[label=\"" << hex_address << ":" 
-	     << name << "\\n type = " << type << "\\n \"" << add <<"];\n"; 
+	     << funcName << "\\n type = " << type << "\\n \"" << add <<"];\n"; 
+      //	     << name << "\\n type = " << type << "\\n \"" << add <<"];\n"; 
 
       callNodeType::iterator inv = callMap.lower_bound(funcName);
       for (;inv!=callMap.upper_bound(funcName);++inv) {
 	pair <std::string, SgDirectedGraphNode*>  itn = inv->second;
 	string hex_address_n = itn.first;
 	SgDirectedGraphNode* node = isSgDirectedGraphNode(itn.second);
+	SgNode* internal = node->get_SgNode();
+	SgAsmFunctionDeclaration* func = isSgAsmFunctionDeclaration(internal);
+	string name_n="noname";
+	if (func)
+	  name_n=func->get_name();
+
 	string type_n = node->get_type();
-	string name_n="noname";
 	map < int , string> node_p = node->get_properties();
 	map < int , string>::iterator prop = node_p.begin();
-
+	/*
 	for (; prop!=node_p.end(); ++prop) {
 	  int addr = prop->first;
 	  // cerr << " dot : property for addr : " << addr << " and node " << hex_address << endl;
-	  if (addr==RoseBin_Def::name)
-	    name_n = prop->second;
+	  	  if (addr==RoseBin_Def::name)
+	  name_n = prop->second;
 	}
+	*/
+	//	cerr << "    +++ funcName " << funcName << "   name_n: " << name_n << endl;
 	myfile << "\"" << hex_address_n << "\"[label=\"" << hex_address_n << ":" 
 	       << name_n << "\\n type = " << type_n << "\\n \"" << add <<"];\n"; 
+	//	<< name_n << "\\n type = " << type_n << "\\n \"" << add <<"];\n"; 
 	
       }
 
 
-	myfile << "} \n"; 
+      myfile << "} \n"; 
     } 
   }
 
@@ -246,7 +256,7 @@
 	  interrupt = true;
 	else if (addr==RoseBin_Def::name)
 	  name = prop->second;
-     }
+      }
       
 
       funcNr++;
@@ -257,17 +267,17 @@
       //if (grouping) {
       //	add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=red,fontname=\"7x13bold\",fontcolor=black,style=filled";
       //} else {
-	if (nodest_jmp)
-	  add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=red,fontname=\"7x13bold\",fontcolor=black,style=filled";
-	else if (nodest_call)
-	  add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=orange,fontname=\"7x13bold\",fontcolor=black,style=filled";
-	else if (interrupt)
-	  add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=blue,fontname=\"7x13bold\",fontcolor=black,style=filled";
-	else if (error)
-	  add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=lightblue,fontname=\"7x13bold\",fontcolor=black,style=filled";
-	else
-	  add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=purple,fontname=\"7x13bold\",fontcolor=black,style=filled";
-	//}
+      if (nodest_jmp)
+	add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=red,fontname=\"7x13bold\",fontcolor=black,style=filled";
+      else if (nodest_call)
+	add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=orange,fontname=\"7x13bold\",fontcolor=black,style=filled";
+      else if (interrupt)
+	add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=blue,fontname=\"7x13bold\",fontcolor=black,style=filled";
+      else if (error)
+	add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=lightblue,fontname=\"7x13bold\",fontcolor=black,style=filled";
+      else
+	add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=purple,fontname=\"7x13bold\",fontcolor=black,style=filled";
+      //}
 
       RoseBin_support::checkText(name);
       if (grouping)
@@ -434,32 +444,32 @@
       add = ",shape=ellipse,regular=0, sides=5,peripheries=1,color=\"Black\",fillcolor=black,fontname=\"7x13bold\",fontcolor=white,style=filled";
       type = "Buffer Overflow" ;
     }
-      regs += eval;
-      string hex_name=hex_address.substr(1,hex_address.length());
-      if (hex_name.size()>1 && hex_name[0]==' ')
-	hex_name=hex_name.substr(1,hex_name.size());
-      hex_name="0x"+hex_name;
-      string nameL="0x";
-      for (unsigned int j=2;j<name.size();++j){
-	char c = name[j];
-	if (c==' ') continue;
-	else if (c==':')
-	  break;
-	else
-	  nameL+=name[j];
-	//	else 
-	//  cerr << " not a digit : " << name[j] << endl;
-      }
-      //      string nameL=name.substr(0,9);
-      if (type!="function") {
-	if (hex_name!=nameL)
-	  cerr << " hexName : ." << hex_name << ". == ." << nameL << ".   out of : " << name << endl;
-	//	cerr << " ERROR ................... SOMETHING WRONG HERE . ALLOWING THIS FOR NOW . " << endl;
-		ROSE_ASSERT(hex_name==nameL);
-      }
-      myfile << "\"" << hex_address << "\"[label=\""  << name << "\\n" << dfa_info << dfa_variable <<
-	" visited: " << visitedCounter <<"\\n" << 
-	"type = " << type << "\\n" << variable << "\\n" << regs << "\"" << add <<"];\n"; 
+    regs += eval;
+    string hex_name=hex_address.substr(1,hex_address.length());
+    if (hex_name.size()>1 && hex_name[0]==' ')
+      hex_name=hex_name.substr(1,hex_name.size());
+    hex_name="0x"+hex_name;
+    string nameL="0x";
+    for (unsigned int j=2;j<name.size();++j){
+      char c = name[j];
+      if (c==' ') continue;
+      else if (c==':')
+	break;
+      else
+	nameL+=name[j];
+      //	else 
+      //  cerr << " not a digit : " << name[j] << endl;
+    }
+    //      string nameL=name.substr(0,9);
+    if (type!="function") {
+      if (hex_name!=nameL)
+	cerr << " hexName : ." << hex_name << ". == ." << nameL << ".   out of : " << name << endl;
+      //	cerr << " ERROR ................... SOMETHING WRONG HERE . ALLOWING THIS FOR NOW . " << endl;
+      ROSE_ASSERT(hex_name==nameL);
+    }
+    myfile << "\"" << hex_address << "\"[label=\""  << name << "\\n" << dfa_info << dfa_variable <<
+      " visited: " << visitedCounter <<"\\n" << 
+      "type = " << type << "\\n" << variable << "\\n" << regs << "\"" << add <<"];\n"; 
   }
 
 }
@@ -509,157 +519,157 @@
 void RoseBin_DotGraph::printEdges( bool forward_analysis, std::ofstream& myfile, SgDirectedGraphEdge* edge ) {
   // traverse edges and visualize results of graph
   /*
-  cerr << " Writing graph to DOT - Nr of Edges : " << edges.size() << endl;
-  int edgeNr=0;
-  edgeType::iterator it = edges.begin();
-  for (; it!=edges.end();++it) {
+    cerr << " Writing graph to DOT - Nr of Edges : " << edges.size() << endl;
+    int edgeNr=0;
+    edgeType::iterator it = edges.begin();
+    for (; it!=edges.end();++it) {
     edgeNr++;
     if ((edgeNr % 5000) == 0)
-      cout << " Writing graph to DOT - Nr of Edges : " << edges.size() << "/" << edgeNr << endl;
+    cout << " Writing graph to DOT - Nr of Edges : " << edges.size() << "/" << edgeNr << endl;
     //    string name = it->first;
     SgDirectedGraphEdge* edge = it->second;
   */
-    SgDirectedGraphNode* source = isSgDirectedGraphNode(edge->get_from());
-    SgDirectedGraphNode* target = isSgDirectedGraphNode(edge->get_to());
+  SgDirectedGraphNode* source = isSgDirectedGraphNode(edge->get_from());
+  SgDirectedGraphNode* target = isSgDirectedGraphNode(edge->get_to());
 
 #if 0
-    // extra check to ensure that nodes exist. If not, skip
-      nodeType::iterator itn2 = nodes.begin();
-      bool foundS=false;
-      bool foundT=false;
-      for (; itn2!=nodes.end();++itn2) {
-	SgDirectedGraphNode* n = itn2->second;
-	if (n==source) foundS=true;
-	if (n==target) foundT=true;
+  // extra check to ensure that nodes exist. If not, skip
+  nodeType::iterator itn2 = nodes.begin();
+  bool foundS=false;
+  bool foundT=false;
+  for (; itn2!=nodes.end();++itn2) {
+    SgDirectedGraphNode* n = itn2->second;
+    if (n==source) foundS=true;
+    if (n==target) foundT=true;
+  }
+  if (foundS==false || foundT==false) {
+    cerr <<"WARNING :: printEdges - edge not found. " << endl; 
+    return;
+    if (source && target) {
+      SgAsmFunctionDeclaration* src = isSgAsmFunctionDeclaration(source->get_SgNode());
+      SgAsmFunctionDeclaration* trg = isSgAsmFunctionDeclaration(target->get_SgNode());
+      if (src && trg) {
+	cerr <<"WARNING :: printEdges - edge not found: " << 
+	  RoseBin_support::HexToString(src->get_address()) << " -> " << 
+	  RoseBin_support::HexToString(trg->get_address()) << endl;
+	//return;
+      } else {
+	if (src==NULL)
+	  cerr <<"WARNING :: printEdges - src == NULL " << source->get_SgNode()->class_name() <<endl;
+	else 
+	  cerr <<"WARNING :: printEdges - trg == NULL " << target->get_SgNode()->class_name() <<endl;
       }
-      if (foundS==false || foundT==false) {
-	cerr <<"WARNING :: printEdges - edge not found. " << endl; 
-	return;
-	if (source && target) {
-	  SgAsmFunctionDeclaration* src = isSgAsmFunctionDeclaration(source->get_SgNode());
-	  SgAsmFunctionDeclaration* trg = isSgAsmFunctionDeclaration(target->get_SgNode());
-	  if (src && trg) {
-	  cerr <<"WARNING :: printEdges - edge not found: " << 
-	    RoseBin_support::HexToString(src->get_address()) << " -> " << 
-	    RoseBin_support::HexToString(trg->get_address()) << endl;
-	  //return;
-	  } else {
-	    if (src==NULL)
-	      cerr <<"WARNING :: printEdges - src == NULL " << source->get_SgNode()->class_name() <<endl;
-	    else 
-	      cerr <<"WARNING :: printEdges - trg == NULL " << target->get_SgNode()->class_name() <<endl;
-	  }
-	} else {
-	  cerr <<"WARNING :: printEdges - source or target == NULL " <<endl;
-	}
-      }
+    } else {
+      cerr <<"WARNING :: printEdges - source or target == NULL " <<endl;
+    }
+  }
 #endif
-    ROSE_ASSERT(source);
-    ROSE_ASSERT(target);
-    string from_hex = source->get_name();
-    string to_hex =target->get_name();
+  ROSE_ASSERT(source);
+  ROSE_ASSERT(target);
+  string from_hex = source->get_name();
+  string to_hex =target->get_name();
 
-    // fix the problem that instructions and functions may have the same address (key)
-    if (grouping) {
-      // fix this only if we use groups (clusters)
-      if (isSgAsmFunctionDeclaration(source->get_SgNode()))
-	from_hex+="_f";
-      if (isSgAsmFunctionDeclaration(target->get_SgNode()))
-	to_hex+="_f";
-    }
+  // fix the problem that instructions and functions may have the same address (key)
+  if (grouping) {
+    // fix this only if we use groups (clusters)
+    if (isSgAsmFunctionDeclaration(source->get_SgNode()))
+      from_hex+="_f";
+    if (isSgAsmFunctionDeclaration(target->get_SgNode()))
+      to_hex+="_f";
+  }
 
 
-    string edgeLabel="";
-    map < int , string> edge_p = edge->get_properties();
-    map < int , string>::iterator prop = edge_p.begin();
-    //string type = node->get_type();
-    for (; prop!=edge_p.end(); ++prop) {
-      int addr = prop->first;
-      // cerr << " dot : property for addr : " << addr << " and node " << hex_address << endl;
-      if (addr==RoseBin_Def::edgeLabel)
-	edgeLabel = prop->second;
-    }
+  string edgeLabel="";
+  map < int , string> edge_p = edge->get_properties();
+  map < int , string>::iterator prop = edge_p.begin();
+  //string type = node->get_type();
+  for (; prop!=edge_p.end(); ++prop) {
+    int addr = prop->first;
+    // cerr << " dot : property for addr : " << addr << " and node " << hex_address << endl;
+    if (addr==RoseBin_Def::edgeLabel)
+      edgeLabel = prop->second;
+  }
 
-    string output = "\"" + from_hex + "\" -> \"" + to_hex + "\"[label=\"" + edgeLabel  + "\"" + "];\n";  
-    SgAsmx86Instruction* contrl = isSgAsmx86Instruction(source->get_SgNode());
-    if (contrl) {
-      // we use either dest or dest_list
-      // dest is used for single destinations during cfg run
-      // dest_list is used for a static cfg image
-      vector<VirtualBinCFG::CFGEdge> outEdges = contrl->cfgBinOutEdges(info);
-      if (contrl->get_kind() == x86_call || isAsmUnconditionalBranch(contrl)) {
-	SgAsmInstruction* next = info->getInstructionAtAddress(contrl->get_address() + contrl->get_raw_bytes().size());
-	if (next) {
-	  //	  outEdges.push_back(VirtualBinCFG::CFGEdge(VirtualBinCFG::CFGNode(contrl, info), VirtualBinCFG::CFGNode(next, info), info));
-	}
+  string output = "\"" + from_hex + "\" -> \"" + to_hex + "\"[label=\"" + edgeLabel  + "\"" + "];\n";  
+  SgAsmx86Instruction* contrl = isSgAsmx86Instruction(source->get_SgNode());
+  if (contrl) {
+    // we use either dest or dest_list
+    // dest is used for single destinations during cfg run
+    // dest_list is used for a static cfg image
+    vector<VirtualBinCFG::CFGEdge> outEdges = contrl->cfgBinOutEdges(info);
+    if (contrl->get_kind() == x86_call || isAsmUnconditionalBranch(contrl)) {
+      SgAsmInstruction* next = info->getInstructionAtAddress(contrl->get_address() + contrl->get_raw_bytes().size());
+      if (next) {
+	//	  outEdges.push_back(VirtualBinCFG::CFGEdge(VirtualBinCFG::CFGNode(contrl, info), VirtualBinCFG::CFGNode(next, info), info));
       }
-      SgAsmInstruction* dest = outEdges.empty() ? NULL : outEdges.front().target().getNode();
-      if (!x86InstructionIsControlTransfer(contrl) || contrl->get_kind() == x86_ret) dest = NULL;
-      bool dest_list_empty = true;
-      if (contrl->get_kind() == x86_ret)
-	dest_list_empty = outEdges.empty();
+    }
+    SgAsmInstruction* dest = outEdges.empty() ? NULL : outEdges.front().target().getNode();
+    if (!x86InstructionIsControlTransfer(contrl) || contrl->get_kind() == x86_ret) dest = NULL;
+    bool dest_list_empty = true;
+    if (contrl->get_kind() == x86_ret)
+      dest_list_empty = outEdges.empty();
 
-      SgAsmInstruction* nextNode = isSgAsmInstruction(target->get_SgNode());
-      ROSE_ASSERT(nextNode);
-      if (dest) {
-	string add = "";
-	string type = "jmp_if";
-	if (contrl->get_kind() == x86_call || contrl->get_kind() == x86_ret) {
-	  add= ",color=\"Red\",  style=\"dashed\"";
-	  type = "call";
-	} else if (contrl->get_kind() == x86_jmp) {
-	  add= ",color=\"Red\",  style=\"dashed\"";
-	  type = "jmp";
-	} else 
-	  add = ",color=\"Green\",  style=\"dashed\"";
-	if (dest==nextNode) 
-	  output =  "\"" + from_hex + "\" -> \"" + to_hex + "\"[label=\"" + type +"\\n"+ edgeLabel+ "\""  + add +  "];\n"; 
-	// the destination is the next node after a control transfer
-	// for this, if the source is a call or jmp, we want to hide
-	// the edge
-	else 
-	  if (forward_analysis && 
-	      (contrl->get_kind() == x86_call || contrl->get_kind() == x86_jmp)) {
-	    add = ",color=\"Yellow\",  style=\"solid\"";
-	    type="";
-	    output =  "\"" + from_hex + "\" -> \"" + to_hex + "\"[label=\"" + type  + "\\n"+ edgeLabel+"\""  + add +  "];\n"; 
-	  }
+    SgAsmInstruction* nextNode = isSgAsmInstruction(target->get_SgNode());
+    ROSE_ASSERT(nextNode);
+    if (dest) {
+      string add = "";
+      string type = "jmp_if";
+      if (contrl->get_kind() == x86_call || contrl->get_kind() == x86_ret) {
+	add= ",color=\"Red\",  style=\"dashed\"";
+	type = "call";
+      } else if (contrl->get_kind() == x86_jmp) {
+	add= ",color=\"Red\",  style=\"dashed\"";
+	type = "jmp";
       } else 
-	if (contrl->get_kind() == x86_ret ) { //&& dest_list_empty) {
-	  // in case of a multiple return
-	  string add= ",color=\"Blue\",  style=\"dashed\"";
-	  string type = "ret";
+	add = ",color=\"Green\",  style=\"dashed\"";
+      if (dest==nextNode) 
+	output =  "\"" + from_hex + "\" -> \"" + to_hex + "\"[label=\"" + type +"\\n"+ edgeLabel+ "\""  + add +  "];\n"; 
+      // the destination is the next node after a control transfer
+      // for this, if the source is a call or jmp, we want to hide
+      // the edge
+      else 
+	if (forward_analysis && 
+	    (contrl->get_kind() == x86_call || contrl->get_kind() == x86_jmp)) {
+	  add = ",color=\"Yellow\",  style=\"solid\"";
+	  type="";
 	  output =  "\"" + from_hex + "\" -> \"" + to_hex + "\"[label=\"" + type  + "\\n"+ edgeLabel+"\""  + add +  "];\n"; 
-	} 
-    }
+	}
+    } else 
+      if (contrl->get_kind() == x86_ret ) { //&& dest_list_empty) {
+	// in case of a multiple return
+	string add= ",color=\"Blue\",  style=\"dashed\"";
+	string type = "ret";
+	output =  "\"" + from_hex + "\" -> \"" + to_hex + "\"[label=\"" + type  + "\\n"+ edgeLabel+"\""  + add +  "];\n"; 
+      } 
+  }
 
-    string type_n = getProperty(RoseBin_Def::type, edge);
-    if (type_n==RoseBin_support::ToString(RoseBin_Edgetype::usage)) {
-      string add= ",color=\"Black\",  style=\"dashed\"";
-      output =  "\"" + from_hex + "\" -> \"" + to_hex + "\"[label=\""+ edgeLabel+"\""  + add +  "];\n";       
-    }
+  string type_n = getProperty(RoseBin_Def::type, edge);
+  if (type_n==RoseBin_support::ToString(RoseBin_Edgetype::usage)) {
+    string add= ",color=\"Black\",  style=\"dashed\"";
+    output =  "\"" + from_hex + "\" -> \"" + to_hex + "\"[label=\""+ edgeLabel+"\""  + add +  "];\n";       
+  }
 
-    if (!(forward_analysis)) {
-      SgAsmx86Instruction* thisNode = isSgAsmx86Instruction(source->get_SgNode());      
-      SgAsmx86Instruction* nextNode = isSgAsmx86Instruction(target->get_SgNode());
-      if (thisNode && nextNode) {
-	SgAsmFunctionDeclaration* f_1 = isSgAsmFunctionDeclaration(thisNode->get_parent());
-	SgAsmFunctionDeclaration* f_2 = isSgAsmFunctionDeclaration(nextNode->get_parent());
-	if (f_1==NULL)
-	  f_1 = isSgAsmFunctionDeclaration(thisNode->get_parent()->get_parent());
-	if (f_2==NULL)
-	  f_2 = isSgAsmFunctionDeclaration(nextNode->get_parent()->get_parent());
-	if (f_1==f_2)
-	  if (nextNode->get_kind() == x86_call || nextNode->get_kind() == x86_jmp) {
-	    string add = ",color=\"Green\",  style=\"invis\"";
-	    string type="";
-	    output =  "\"" + from_hex + "\" -> \"" + to_hex + "\"[label=\"" + type +"\\n"+ edgeLabel + "\""  + add +  "];\n"; 
-	  }
-      }
+  if (!(forward_analysis)) {
+    SgAsmx86Instruction* thisNode = isSgAsmx86Instruction(source->get_SgNode());      
+    SgAsmx86Instruction* nextNode = isSgAsmx86Instruction(target->get_SgNode());
+    if (thisNode && nextNode) {
+      SgAsmFunctionDeclaration* f_1 = isSgAsmFunctionDeclaration(thisNode->get_parent());
+      SgAsmFunctionDeclaration* f_2 = isSgAsmFunctionDeclaration(nextNode->get_parent());
+      if (f_1==NULL)
+	f_1 = isSgAsmFunctionDeclaration(thisNode->get_parent()->get_parent());
+      if (f_2==NULL)
+	f_2 = isSgAsmFunctionDeclaration(nextNode->get_parent()->get_parent());
+      if (f_1==f_2)
+	if (nextNode->get_kind() == x86_call || nextNode->get_kind() == x86_jmp) {
+	  string add = ",color=\"Green\",  style=\"invis\"";
+	  string type="";
+	  output =  "\"" + from_hex + "\" -> \"" + to_hex + "\"[label=\"" + type +"\\n"+ edgeLabel + "\""  + add +  "];\n"; 
+	}
     }
+  }
 
-    myfile << output;
-    //}
+  myfile << output;
+  //}
 }
 
 

Modified: branches/testonly/src/midend/loopProcessing/Makefile.am
===================================================================
--- branches/testonly/src/midend/loopProcessing/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,6 +1,6 @@
 include $(top_srcdir)/config/Makefile.for.ROSE.includes.and.libs
 
-SUBDIRS = depInfo depGraph computation slicing driver prepostTransformation
+SUBDIRS = depInfo depGraph computation outsideInterface slicing driver prepostTransformation
 
 INCLUDES = \
    $(ROSE_INCLUDES) -I${srcdir}/driver -I${srcdir}/prepostTransformation -I$(top_srcdir)/src/util/support -I$(top_srcdir)/src/util/graphs  -I$(top_srcdir)/src/midend/astUtil/astSupport -I$(top_srcdir)/src/midend/astUtil/symbolicVal -I$(top_srcdir)/src/midend/astUtil/astInterface

Modified: branches/testonly/src/midend/loopProcessing/depGraph/DepGraphBuild.C
===================================================================
--- branches/testonly/src/midend/loopProcessing/depGraph/DepGraphBuild.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/depGraph/DepGraphBuild.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -109,6 +109,7 @@
    return ProcessAstTree::ProcessGoto(fa, s, dest);
 }
 
+//!Compute dependence relations between current statement and any other previously visited statements, including self-to-self.
 bool BuildAstTreeDepGraph ::
 ProcessStmt( AstInterface &fa, const AstNodePtr& s)
 {

Modified: branches/testonly/src/midend/loopProcessing/depGraph/DepGraphBuild.h
===================================================================
--- branches/testonly/src/midend/loopProcessing/depGraph/DepGraphBuild.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/depGraph/DepGraphBuild.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -38,6 +38,7 @@
   const DomainCond& GetStmtDomain( LoopTransformInterface &fa, const AstNodePtr& s) 
      { return impl.GetStmtInfo(fa, s).domain; }
 
+  //! Compute the dependence (one of type set t) between two statements: n1 and n2
   void ComputeStmtDep(LoopTransformInterface &fa,const StmtNodeInfo& n1, const StmtNodeInfo& n2, int t);
   void ComputeDataDep(LoopTransformInterface &fa, const StmtNodeInfo& n1,
                       const StmtNodeInfo& n2, DepType t = DEPTYPE_ALL);

Modified: branches/testonly/src/midend/loopProcessing/depInfo/DepEDD.h
===================================================================
--- branches/testonly/src/midend/loopProcessing/depInfo/DepEDD.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/depInfo/DepEDD.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -3,7 +3,8 @@
 #define DEP_EDD_INFO
 
 #include <DepRel.h>
-
+//!Extended dependence matrix: 
+// each element of the matrix is a dependence direction relationship: 
 class DepEDD 
 {
   unsigned nr, nc, num;

Modified: branches/testonly/src/midend/loopProcessing/depInfo/DepInfo.C
===================================================================
--- branches/testonly/src/midend/loopProcessing/depInfo/DepInfo.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/depInfo/DepInfo.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -6,15 +6,18 @@
 class DepEDDTypeInfo : public DepInfoImpl
 {
   DepType t;
+  DepType st; //Supplementary information when t ==SCALAR_DEP or SCALAR_BACK_DEP
  public:
   DepEDDTypeInfo( DepType _t, int dim1, int dim2, bool p, int cl)
-    : DepInfoImpl( dim1, dim2,p, cl) { t = _t; }
+    : DepInfoImpl( dim1, dim2,p, cl) { t = _t; st = DEPTYPE_NONE; }
   DepEDDTypeInfo( const DepEDDTypeInfo &that) 
     : DepInfoImpl( that ) { t = that.t; }
   virtual ~DepEDDTypeInfo() {}
   virtual DepInfoImpl* Clone() const { return new DepEDDTypeInfo(*this); }
 
   virtual DepType GetDepType() const { return t; }
+  virtual DepType GetScalarDepType() const { return st; }
+  virtual void SetScalarDepType(DepType s_type) { st=s_type; }
 };
 
 class DepEDDRefInfo : public DepEDDTypeInfo
@@ -71,27 +74,68 @@
 DepInfo DepInfoGenerator:: 
 GetDepInfo( int nr, int nc, DepType t, const AstNodePtr& srcRef, const AstNodePtr& snkRef,
             bool p, int commLevel)
-  { return ( (t & DEPTYPE_DATA) || (t & DEPTYPE_INPUT) )? 
-                      DepInfo(new DepEDDRefInfo( t, nr, nc, srcRef, snkRef,p, commLevel))
-                     :  DepInfo(new DepEDDTypeInfo(t, nr, nc, p, commLevel)) ; }
+  {
+    DepInfo result;
+    if ( (t & DEPTYPE_DATA) || (t & DEPTYPE_INPUT) )
+    {
+      result= DepInfo(new DepEDDRefInfo( t, nr, nc, srcRef, snkRef,p, commLevel));
+    }
+    else
+    {
+      result= DepInfo(new DepEDDTypeInfo(t, nr, nc, p, commLevel)) ; 
+    }
+#if 0    
+    // Provide extra information for DEPTYPE_SCALAR and DEPTYPE_BACKSCALAR
+    if  ( (t & DEPTYPE_SCALAR) || (t & DEPTYPE_BACKSCALAR) )
+    {  // how to tell read/write access ??
+       if (srcRef == snkRef) // OUTPUT dependence for scalars
+          result.SetScalarDepType(DEPTYPE_OUTPUT);
+    }
+#endif    
+    return result;
+  }
 
 std::string DepType2String(DepType t) 
 {
+#if 1
+// Liao, the type could be some combination of several types, 11/13/2008
+  std::string result;
+  
+  if (t&DEPTYPE_CTRL) result += "CTRL_DEP";
+  if (t&DEPTYPE_TRUE) result += " TRUE_DEP";
+  if (t&DEPTYPE_OUTPUT) result+= " OUTPUT_DEP";
+  if (t&DEPTYPE_ANTI) result += " ANTI_DEP";
+  if (t&DEPTYPE_INPUT) result += " INPUT_DEP";
+  
+  if (t&DEPTYPE_SCALAR) result += " SCALAR_DEP";
+  if (t&DEPTYPE_BACKSCALAR) result += " SCALAR_BACK_DEP";
+  if (t&DEPTYPE_IO) result += " IO_DEP";
+  if (t&DEPTYPE_DATA) result += " DATA_DEP";	
+  if (t&DEPTYPE_BACKCTRL) result += " BACKCTRL_DEP";
+  
+  if (t&DEPTYPE_TRANS) result += " TRANS_DEP";
+  if (t&DEPTYPE_NONE) result += " TYPE_NONE";
+  
+  return result +=";";
+#else
   switch (t) {
   case DEPTYPE_CTRL: return "CTRL_DEP;"; 
   case DEPTYPE_TRUE: return  "TRUE_DEP;"; 
   case DEPTYPE_OUTPUT: return  "OUTPUT_DEP;"; 
   case DEPTYPE_ANTI: return  "ANTI_DEP;"; 
   case DEPTYPE_INPUT: return  "INPUT_DEP;"; 
+  
   case DEPTYPE_SCALAR: return  "SCALAR_DEP;"; 
   case DEPTYPE_BACKSCALAR: return  "SCALAR_BACK_DEP;"; 
   case DEPTYPE_IO: return  "IO_DEP;"; 
   case DEPTYPE_DATA: return  "DATA_DEP;"; 
   case DEPTYPE_BACKCTRL: return  "BACKCTRL_DEP;";  
+  
   case DEPTYPE_TRANS: return  "TRANS_DEP;"; 
   case DEPTYPE_NONE : return  "TYPE_NONE"; 
   default: assert(false);
   }
+#endif  
 }
   
 std::string DepInfo :: toString() const
@@ -100,6 +144,8 @@
   out << rows() << "*" << cols()<<" ";
   out << DepType2String(GetDepType()) << " commonlevel = " << CommonLevel() << " ";
   out << "CarryLevel = "<<CarryLevel()<< " ";
+  if ((GetDepType()==DEPTYPE_SCALAR)||(GetDepType()==DEPTYPE_BACKSCALAR))
+    out<< "Scalar dep type "<<DepType2String(GetScalarDepType()) ;
   if (is_precise()) 
       out << " Is precise ";
   out << AstToString(SrcRef())<<getAstLocation(SrcRef())<<"->" << AstToString(SnkRef())<<getAstLocation(SnkRef())<<" ";
@@ -444,8 +490,12 @@
     }
   }
   if (minLevel < 0) {
+    //Adjustment for DEPTYPE_BACKSCALAR. It must be loop-carried dependence
+    //For DEPTYPE_SCALAR with two same references to a variable, it also must be loop-carried dependence
      if (GetDepType() == DEPTYPE_BACKSCALAR)
         minLevel = maxLevel = num-1;
+     else if (GetScalarDepType() == DEPTYPE_OUTPUT)
+        minLevel = maxLevel = num-1;
      else
         minLevel = num;
   }

Modified: branches/testonly/src/midend/loopProcessing/depInfo/DepInfo.h
===================================================================
--- branches/testonly/src/midend/loopProcessing/depInfo/DepInfo.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/depInfo/DepInfo.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -11,12 +11,22 @@
 #include <Matrix.h>
 #include <iostream>
 
-
-typedef enum { DEPTYPE_NONE = 0, DEPTYPE_TRUE = 1, DEPTYPE_ANTI = 2,
-               DEPTYPE_OUTPUT = 4, DEPTYPE_SCALAR = 8, DEPTYPE_BACKSCALAR = 16,
-               DEPTYPE_INPUT = 32, DEPTYPE_ARRAY = 39, 
-               DEPTYPE_IO = 64, DEPTYPE_DATA = 95, DEPTYPE_CTRL = 128, DEPTYPE_BACKCTRL = 256,
-               DEPTYPE_ALL = 479, DEPTYPE_TRANS = 512} DepType;
+typedef enum { 
+  DEPTYPE_NONE = 0,       // B00000000
+  DEPTYPE_TRUE = 1,       // B00000001
+  DEPTYPE_ANTI = 2,       // B00000010   
+  DEPTYPE_OUTPUT = 4,     // B00000100
+  DEPTYPE_SCALAR = 8,     // B00001000
+  DEPTYPE_BACKSCALAR = 16,// B00010000
+  DEPTYPE_INPUT = 32,     // B00100000
+  DEPTYPE_ARRAY = 39,     // B00100111  //union of true, anti, output, input dependencies
+  DEPTYPE_IO = 64,        // B01000000
+  DEPTYPE_DATA = 95,      // B01011111 //union of array, scalar/backscalar,IO,w/o input
+  DEPTYPE_CTRL = 128,     // B10000000
+  DEPTYPE_BACKCTRL = 256, //B1 00000000
+  DEPTYPE_ALL = 479,      //B1 11011111 //All but input dependence
+  DEPTYPE_TRANS = 512    //B10 00000000
+} DepType;
 std::string DepType2String( DepType t);
 typedef enum {DEP_SRC = 1, DEP_SINK = 2, DEP_SRC_SINK = 3} DepDirection;
 
@@ -51,6 +61,10 @@
    virtual DepInfoImpl* Clone() const 
      { return new DepInfoImpl(*this); }
    virtual DepType GetDepType() const { return DEPTYPE_NONE; }
+   // Liao, 11/4/2008. Additional information for SCALAR_DEP and SCALAR_BACK_DEP
+   // Reuse DEPTYPE_TRUE, DEPTYPE_ANTI, DEPTYPE_OUTPUT etc for them
+   virtual DepType GetScalarDepType() const { return DEPTYPE_NONE; }
+   virtual void SetScalarDepType(DepType st) {}
    virtual AstNodePtr SrcRef() const { return AST_NULL; }
    virtual AstNodePtr SnkRef() const { return AST_NULL; }
 
@@ -61,7 +75,9 @@
 };
 
 inline DepInfoImpl* Clone(const DepInfoImpl& that) { return that.Clone(); }
-
+//!Extended Dependence Model information
+// DepRel (distance direction)-> EdpEDD (matrix of distance direction)-> DepInfoImpl (extra info)
+// -->DepEDDTypeInfo (dependence type)--> DepInfo (with reference count) 
 class DepInfo : protected CountRefHandle <DepInfoImpl>
 {
   DepInfo( DepInfoImpl *impl) : CountRefHandle<DepInfoImpl>(impl) {}
@@ -81,6 +97,16 @@
   int cols() const { return (ConstPtr() == 0)? 0 : ConstRef().cols(); }
   DepType GetDepType() const  
     { return (ConstPtr()==0)? DEPTYPE_NONE: ConstRef().GetDepType(); }
+    
+  DepType GetScalarDepType() const  
+    { return (ConstPtr()==0)? DEPTYPE_NONE: ConstRef().GetScalarDepType(); }
+  void SetScalarDepType(DepType st)
+    { 
+      if (ConstPtr()==0) 
+        return;
+      else 
+        NonConstRef().SetScalarDepType(st); 
+    }
   AstNodePtr SrcRef() const { return (ConstPtr()==0)?AST_NULL:ConstRef().SrcRef(); }
   AstNodePtr SnkRef() const { return (ConstPtr()==0)?AST_NULL:ConstRef().SnkRef(); }
   int CommonLevel() const { return  (ConstPtr()==0)?-1:ConstRef().CommonLevel(); }
@@ -138,6 +164,7 @@
 DepInfo Reverse( const DepInfo &d);
 DepInfo Closure( const DepInfo &d);
 
+//! A builder for DepInfo
 class DepInfoGenerator
 {
  public:

Modified: branches/testonly/src/midend/loopProcessing/depInfo/DepInfoAnal.C
===================================================================
--- branches/testonly/src/midend/loopProcessing/depInfo/DepInfoAnal.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/depInfo/DepInfoAnal.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -19,6 +19,11 @@
 extern DepTestStatistics DepStats;
 #endif
 
+//Liao, 11/5/2008
+//Support extra dependence type information for DEPTYPE_SCALAR and DEPTYPE_BACKSCALAR
+//This global variable is used to store the temp type t, which gets discarded 
+//when calling ComputeGlobalScalarDep() and ComputePrivateScalarDep()
+static DepType scalar_dep_type = DEPTYPE_NONE;
 
 extern bool DebugDep();
 
@@ -38,7 +43,9 @@
       std::cerr << buffer;
    }
 }
-
+//! A class to with an operator () to 
+//access and store the first element of a pair of AST node pointers ???
+// Accumulate AST references
 class AccuAstRefs : public CollectObject<std::pair<AstNodePtr,AstNodePtr> >
 {
    CollectObject<AstNodePtr> &col;
@@ -50,6 +57,8 @@
       return col(n.first);
    }
 };
+//! Analyze variable references within a statement n, put read and write references
+// into two sets (rRefs and wRefs)
 bool AnalyzeStmtRefs(LoopTransformInterface &la, const AstNodePtr& n, 
                       CollectObject<AstNodePtr> &wRefs, 
                       CollectObject<AstNodePtr> &rRefs)
@@ -57,6 +66,7 @@
   AstInterface &fa = la;
   AccuAstRefs colw(wRefs);
   AccuAstRefs colr(rRefs);
+  // Construct a StmtSideEffectCollect object and call its operator 
   return StmtSideEffectCollect(la.getSideEffectInterface())(fa,n,&colw,&colr);
 }
 
@@ -76,6 +86,7 @@
   return result;
 }
 
+//This is indeed a static function within this file, pos =1 (inDeps) or -1 (outDeps)
 DepInfo ComputePrivateDep( LoopTransformInterface &la, DepInfoAnal& anal,
                           const DepInfoAnal::StmtRefDep& ref, 
                           DepType t, int pos)
@@ -83,7 +94,7 @@
      const DepInfoAnal::LoopDepInfo& info1 = anal.GetStmtInfo(la, ref.r1.stmt);
      const DepInfoAnal::LoopDepInfo& info2 = anal.GetStmtInfo(la, ref.r2.stmt);
      int dim1 = info1.domain.NumOfLoops(), dim2 = info2.domain.NumOfLoops();
-
+     //Return default DepInfo if no common loops and pos <=0
      if (! ref.commLevel && pos <= 0)
        return DepInfo();
      DepInfo result=DepInfoGenerator::GetDepInfo( dim1, dim2, t, 
@@ -100,6 +111,25 @@
      }
      info2.domain.RestrictDepInfo( result, DEP_SINK);
      info1.domain.RestrictDepInfo( result, DEP_SRC);
+
+    //Extra info. for DEPTYPE_SCALAR and DEPTYPE_BACKSCALAR
+    if( ((result.GetDepType()==DEPTYPE_SCALAR) ||(result.GetDepType()==DEPTYPE_BACKSCALAR))
+      &&(scalar_dep_type!=DEPTYPE_NONE) )
+    {
+      if (pos>0) // inDeps
+        result.SetScalarDepType(scalar_dep_type);
+       else   //outDeps, reverse type 
+       {
+         if (scalar_dep_type==DEPTYPE_TRUE)
+           result.SetScalarDepType(DEPTYPE_ANTI);
+         else if (scalar_dep_type==DEPTYPE_ANTI)
+           result.SetScalarDepType(DEPTYPE_TRUE);
+         else if (scalar_dep_type==DEPTYPE_OUTPUT)
+           result.SetScalarDepType(DEPTYPE_INPUT);
+         else if (scalar_dep_type==DEPTYPE_INPUT)
+           result.SetScalarDepType(DEPTYPE_OUTPUT);
+       }
+    }
      return result;
   }
       
@@ -139,8 +169,10 @@
     AstInterface& ai = la;
     SymbolicVar ivar;
     SymbolicVal lb, ub;
+    
     if (s == AST_NULL || !la.IsFortranLoop(s, &ivar, &lb, &ub))
        return stmtInfo[AST_NULL];
+    // The entry to be filled for the statement   
     LoopDepInfo& info= stmtInfo[s];
     if (info.IsTop()) {
        AstNodePtr l = GetEnclosingLoop(s,ai);
@@ -165,33 +197,34 @@
        SetDep op(info.domain, DomainCond(), 0);
        if (!AnalyzeEquation(lbvec, info.ivarbounds, boundop, op, DepRel(DEPDIR_LE, 0)))
          if (DebugDep())
-            std::cerr << "unable to analyze equation: " << toString(lbvec) << std::endl;
-       SymbolicVal ubleft = 
-         DecomposeAffineExpression(la,ub,info1.ivars,ubvec,dim1);
+            std::cerr << "unable to analyze equation for lower bound: " << toString(lbvec) << std::endl;
+       SymbolicVal ubleft = DecomposeAffineExpression(la,ub,info1.ivars,ubvec,dim1);
        ubvec.push_back(-1);
        ubvec.push_back(-ubleft);
        if (!AnalyzeEquation(ubvec, info.ivarbounds, boundop, op, DepRel(DEPDIR_GE, 0))) 
           if (DebugDep())
-             std::cerr << "unable to analyze equation: " << toString(ubvec) << std::endl;
+             std::cerr << "unable to analyze equation for upper bound: " << toString(ubvec) << std::endl;
        info.domain = op.get_domain1();
        info.domain.ClosureCond();
        if (DebugDep())
          std::cerr << "domain of statement " << AstToString(s) << " is : " << info.domain.toString() << std::endl;
-    }
+    } // end if IsTop()
     assert(!info.IsTop());
     return info;
 }
-
 void DepInfoAnal :: 
 ComputePrivateScalarDep( LoopTransformInterface &fa, const StmtRefDep& ref,
                              DepInfoCollect &outDeps, DepInfoCollect &inDeps)
 {
    DepType t1 = DEPTYPE_SCALAR, t2 = DEPTYPE_BACKSCALAR;
+   // has common loops, or references involve two different variables
    if (ref.commLevel > 0 || ref.r1.ref != ref.r2.ref) {
      DepInfo d = ComputePrivateDep( fa, *this, ref, t1, 1);
      assert(!d.IsTop());
      outDeps(d);
    }
+   // has common loops and references involve two different variables
+   // Compute the reverse dependence edge stmt2->stmt1
    if ( ref.commLevel > 0 && ref.r1.ref != ref.r2.ref) {
       StmtRefDep ref2(ref.r2, ref.r1, ref.commLoop, ref.commLevel);
       DepInfo d1 = ComputePrivateDep( fa, *this, ref2, t2, -1);
@@ -273,7 +306,7 @@
 	if (CmdOptions::GetInstance()->HasOption("-adhoc") || !test)
 		test |= PlatoOmegaInterface::ADHOC;
 #endif
-
+       //! Calculate dependence only if having common loops OR two different array accesses 
 	if (ref.commLevel > 0 || ref.r1.ref != ref.r2.ref)
 	{
 		/*AstInterface& ai  = fa;
@@ -547,7 +580,7 @@
                              &r.commLevel);
   return r;
 }
-
+// t should be DEPTYPE_IO here
 void DepInfoAnal ::
 ComputeIODep(LoopTransformInterface &fa,  
              const AstNodePtr& s1,  const AstNodePtr& s2,
@@ -579,8 +612,10 @@
      outDeps(d);
   }
 }
-
-
+//! Compute dependence edges between two statements (ref.r1.stmt, ref.r2.stmt) between 
+// two data accesses from two read/write data sets (rs1,rs2), 
+//with known dependence type t, 
+//store stmt1->stmt2 edges into outDeps,   stmt2->stmt1 edges into inDeps
 void ComputeRefSetDep( DepInfoAnal& anal, LoopTransformInterface &la, 
                        DepInfoAnal::StmtRefDep& ref,
                        DoublyLinkedListWrap<AstNodePtr> *rs1, 
@@ -592,6 +627,7 @@
   for (DoublyLinkedListWrap<AstNodePtr>::iterator iter1 = rs1->begin(); 
       iter1 != rs1->end(); ++iter1) {
     AstNodePtr r1 = *iter1, array1;
+    // First access is array access?
     bool b1 = la.IsArrayAccess(r1, &array1);
     if (!b1)
        array1 = r1; 
@@ -604,19 +640,24 @@
        if (!b2)
           array2 = r2;
        ref.r2.ref = r2;
+       // Dependence only exists for accesses to the same memory location
        if ( fa.IsSameVarRef( array1, array2) ) {
            if (b1 && b2) 
                anal.ComputeArrayDep( la, ref, t, outDeps, inDeps);
            else if (b1 || b2) 
                anal.ComputeGlobalScalarDep( la, ref, outDeps, inDeps);
            else 
+           {   
+               scalar_dep_type = t;
                anal.ComputePrivateScalarDep( la, ref, outDeps, inDeps);
+               scalar_dep_type = DEPTYPE_NONE; 
+           }
        }
        else if ( la.IsAliasedRef( r1, r2)) {
           anal.ComputeGlobalScalarDep( la, ref, outDeps, inDeps); 
        }
-    }
-  }
+    }// end for (rs1)
+  } //end for (rs1)
 }
 
 void RemoveIvars( AstInterface& ai, DoublyLinkedListWrap<AstNodePtr>& refs,
@@ -639,6 +680,9 @@
    }
 }
 
+//! Compute data dependence between two statements s1 and s2
+// Collect their read and write reference sets first, then generate dependence edges
+// among the elements of the reference sets. 
 void DepInfoAnal ::
 ComputeDataDep(LoopTransformInterface &fa, 
                const AstNodePtr& s1,  const AstNodePtr& s2,
@@ -646,6 +690,7 @@
 {
   DoublyLinkedListWrap<AstNodePtr> rRef1, wRef1, rRef2, wRef2;
   CollectDoublyLinkedList<AstNodePtr> crRef1(rRef1),cwRef1(wRef1),crRef2(rRef2),cwRef2(wRef2);
+
   if (!AnalyzeStmtRefs(fa, s1, cwRef1, crRef1) || 
         (s1 != s2 && !AnalyzeStmtRefs(fa, s2, cwRef2, crRef2))) {
        if (DebugDep())

Modified: branches/testonly/src/midend/loopProcessing/depInfo/DepInfoAnal.h
===================================================================
--- branches/testonly/src/midend/loopProcessing/depInfo/DepInfoAnal.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/depInfo/DepInfoAnal.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -18,17 +18,21 @@
 class DepInfoAnal 
 {
  public:
+   //! Store information for a loop (could be nested): 
+   //   domain, loop invariant variables, bound information for each loop nest
   struct LoopDepInfo { 
       DomainCond domain; 
       std::vector<SymbolicVar> ivars;
       std::vector<SymbolicBound> ivarbounds;
       bool IsTop() const { return domain.IsTop(); }
    };
+   //!Store a single reference within a statement
    struct StmtRefInfo { 
      AstNodePtr stmt, ref;
      StmtRefInfo( const AstNodePtr& s, const AstNodePtr& r) 
         : stmt(s), ref(r) {}
    };
+   //!Store common loops and levels for two references from two statements
    struct StmtRefDep { 
      StmtRefInfo r1, r2;
      AstNodePtr commLoop;
@@ -37,6 +41,7 @@
                  const AstNodePtr& l, int level) 
         : r1(_r1), r2(_r2), commLoop(l), commLevel(level) {} 
    };
+  // Provide an operator to check if a node is a loop node 
   class SelectLoop {
     public:
       bool operator()(AstInterface& ai, const AstNodePtr& s)
@@ -44,7 +49,7 @@
   };
   typedef ModifyVariableMap<SelectLoop> ModifyVariableInfo;
   typedef CollectObject<DepInfo> DepInfoCollect;
-
+  // Constructor
   DepInfoAnal(LoopTransformInterface& la, DependenceTesting& h);
   DepInfoAnal(LoopTransformInterface& la);
 
@@ -70,15 +75,18 @@
                       const AstNodePtr& s1,  const AstNodePtr& s2,
                       DepInfoCollect &outDeps, DepInfoCollect &inDeps, 
                       DepType t = DEPTYPE_CTRL);
+  //! Compute all possible data dependencies among two references n1, n2 
+  //Store n1->n2 dependences in outDeps, n2->n1 oens int inDeps
   void ComputeDataDep( LoopTransformInterface &la, 
                       const AstNodePtr& n1,  const AstNodePtr& n2,
                       DepInfoCollect &outDeps, DepInfoCollect &inDeps, 
                       int deptype = DEPTYPE_DATA);
-
  private:
 	DependenceTesting& handle;
+	// A map store AST nodes and loop nest information
   	std::map <AstNodePtr, LoopDepInfo, std::less <AstNodePtr> > stmtInfo;
-  	ModifyVariableInfo varmodInfo;
+	// A map store modified variables and the set of loops modifying them.
+  	ModifyVariableInfo varmodInfo;		      
 };
 
 class DependenceTesting{
@@ -93,7 +101,8 @@
     DepInfo ComputeArrayDep(LoopTransformInterface &fa, DepInfoAnal& anal,
                        const DepInfoAnal::StmtRefDep& ref, DepType deptype);
 };
-
+//! Analyze variable references within a statement n, put read and write references
+// into two sets (rRefs and wRefs)
 bool AnalyzeStmtRefs(LoopTransformInterface &la, const AstNodePtr& n,
                       CollectObject<AstNodePtr> &wRefs, 
                       CollectObject<AstNodePtr> &rRefs);

Modified: branches/testonly/src/midend/loopProcessing/depInfo/DomainInfo.h
===================================================================
--- branches/testonly/src/midend/loopProcessing/depInfo/DomainInfo.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/depInfo/DomainInfo.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -4,7 +4,8 @@
 
 #include <DepInfo.h>
 #include <LatticeElemList.h>
-
+//! A code region (scope) with one or more loops to be analyzed or tranformed.
+// It contains extended matrix dependence information for the loops
 class DomainCond :  protected DepInfo 
 {
  public:

Modified: branches/testonly/src/midend/loopProcessing/driver/LoopTransformInterface.C
===================================================================
--- branches/testonly/src/midend/loopProcessing/driver/LoopTransformInterface.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/driver/LoopTransformInterface.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -185,7 +185,7 @@
   std::cerr << BreakupStatement::cmdline_help() << std::endl;
   LoopTransformOptions::GetInstance()->PrintUsage(out);
 }
-
+// funcInfo could be an instance of ArrayAnnotation, which derives from FunctionSideEffectInterface
 bool LoopTransformInterface::
 GetFunctionCallSideEffect( const AstNodePtr& fc,
                      CollectObject<AstNodePtr>& collectmod,

Modified: branches/testonly/src/midend/loopProcessing/driver/LoopTransformInterface.h
===================================================================
--- branches/testonly/src/midend/loopProcessing/driver/LoopTransformInterface.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/driver/LoopTransformInterface.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -8,14 +8,20 @@
 #include "SymbolicVal.h"
 #include "AnalysisInterface.h"
 
+//! Base pure virtual interface to Array, Used by ArrayInterface, ArrayUseAccessFunction etc.
 class ArrayAbstractionInterface {
  public:
+  //! Check if 's' is an array access. 
+  // Return the array node and list of subscripts if yes and requested
   virtual bool IsArrayAccess( AstInterface& fa,
                                  const AstNodePtr& s, AstNodePtr* array = 0,
                                  AstInterface::AstNodeList* index = 0) = 0 ;
+  //! Get the lower and upper bound of an array's dim'th dimension
+  // Return true if successful.				 
   virtual bool GetArrayBound( AstInterface& fa,
                                  const AstNodePtr& array, 
                                  int dim, int &lb, int &ub) = 0;
+  //! Create an array access node to array 'arr' using a list of subscripts 'index'
   virtual AstNodePtr CreateArrayAccess( AstInterface& fa, const AstNodePtr& arr,
                                 AstInterface::AstNodeList& index) = 0;
   virtual ~ArrayAbstractionInterface() {}
@@ -56,6 +62,7 @@
   ArrayAbstractionInterface* arrayInfo;
   AstInterface& fa;
  public:
+ //LoopTransformInterface la (fa,array_interface,array_annot, &array_interface);
   LoopTransformInterface( AstInterface& _fa, AliasAnalysisInterface& alias,
                           FunctionSideEffectInterface* func = 0,
                           ArrayAbstractionInterface* array = 0) 
@@ -66,27 +73,30 @@
   AstInterface& getAstInterface() { return fa;}
   AliasAnalysisInterface& getAliasInterface() { return aliasInfo; }
   FunctionSideEffectInterface* getSideEffectInterface() { return funcInfo; }
-
+  //! Check if two references are aliased, relying on aliasInfo
   bool IsAliasedRef( const AstNodePtr& r1, const AstNodePtr& r2)
     { return aliasInfo.may_alias(fa, r1, r2); }
+  //! Get modified and read variables by function call 'fc', relying on funcInfo  
   bool GetFunctionCallSideEffect( const AstNodePtr& fc,
                      CollectObject<AstNodePtr>& collectmod,
                      CollectObject<AstNodePtr>& collectread);
-
+  //! Check if a node is representing a memory access, relying on either arrayInfo or astInterface
   bool IsMemoryAccess( const AstNodePtr& s)
    { return (arrayInfo != 0 && arrayInfo->IsArrayAccess(fa, s)) ||
             fa.IsMemoryAccess(s); }
+	    
   bool IsLoop( const AstNodePtr& s, 
                        SymbolicVal* init = 0, SymbolicVal* cond=0,
                        SymbolicVal* incr =0, AstNodePtr* body=0);
   bool IsFortranLoop( const AstNodePtr& s, SymbolicVar* ivar = 0,
                        SymbolicVal* lb = 0, SymbolicVal* ub=0,
                        SymbolicVal* step =0, AstNodePtr* body=0);
-
+  //! Check if a node is representing an array access, relying on either arrayInfo or astInterface
   bool IsArrayAccess( const AstNodePtr& s, AstNodePtr* array = 0,
                                    AstInterface::AstNodeList* index = 0)  
    { return (arrayInfo != 0 && arrayInfo->IsArrayAccess(fa, s, array, index)) ||
             fa.IsArrayAccess(s, array, index); }
+  //! Create an array access, using arrayInfo by default, astInterface otherwise 	    
   virtual AstNodePtr CreateArrayAccess( const AstNodePtr& arr,
                                 AstInterface::AstNodeList& index) 
   { 
@@ -98,6 +108,7 @@
   //bool IsArrayType( AstInterface& fa, const AstNodeType& t)
   //  { return (arrayInfo != 0 && arrayInfo->IsArrayType(fa, t)) ||
   //          AstInterface::IsArrayType(t); }
+  //! Get array bounds, using arrayInfo by default. astInterface is used otherwise
   bool GetArrayBound( const AstNodePtr& array, int dim, int &lb, int &ub) 
    {   
        if (arrayInfo != 0)

Modified: branches/testonly/src/midend/loopProcessing/driver/LoopTransformOptions.C
===================================================================
--- branches/testonly/src/midend/loopProcessing/driver/LoopTransformOptions.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/driver/LoopTransformOptions.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -32,7 +32,7 @@
  assert (index < argv.size());
  int defaultblocksize = atoi(argv[index].c_str());
  if (defaultblocksize <= 1) {
-       std::cerr << "invalid blocking size: " << argv[index] << "; Use default (16)\n";
+       std::cerr << "Missing or invalid blocking size: " << argv[index] << "; Use default (16)\n";
        defaultblocksize = 16;
  } else {
        argv.erase(argv.begin() + index);

Modified: branches/testonly/src/midend/loopProcessing/driver/LoopTransformOptions.h
===================================================================
--- branches/testonly/src/midend/loopProcessing/driver/LoopTransformOptions.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/driver/LoopTransformOptions.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -59,7 +59,15 @@
   bool DoDynamicTuning() const;
   unsigned GetDynamicTuningIndex() const;
 
-  typedef enum {NO_OPT = 0, LOOP_NEST_OPT = 1, INNER_MOST_OPT = 2, MULTI_LEVEL_OPT = 3, LOOP_OPT = 3, DATA_OPT = 4, LOOP_DATA_OPT = 7} OptType;
+  typedef enum {
+    NO_OPT = 0, 
+    LOOP_NEST_OPT = 1, 
+    INNER_MOST_OPT = 2, 
+    MULTI_LEVEL_OPT = 3, 
+    LOOP_OPT = 3, 
+    DATA_OPT = 4, 
+    LOOP_DATA_OPT = 7
+  } OptType;
 
   OptType GetOptimizationType();
  

Copied: branches/testonly/src/midend/loopProcessing/outsideInterface (from rev 128, trunk/src/midend/loopProcessing/outsideInterface)

Deleted: branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayAnnot.C
===================================================================
--- trunk/src/midend/loopProcessing/outsideInterface/ArrayAnnot.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayAnnot.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,502 +0,0 @@
-#include <ArrayAnnot.h>
-#include <fstream>
-#include <CommandOptions.h>
-#include <iostream>
-
-bool DebugArrayAnnot()
-{
-  static int r = 0;
-  if (r == 0) {
-     if (CmdOptions::GetInstance()->HasOption("-debugarrayannot"))
-         r = 1;
-     else
-         r = -1;
-  }
-  return r == 1;
-}
-
-
-bool ArrayShapeDescriptor:: get_dimension( int& val) const
-{ 
-   SymbolicVal dimval = dimension.get_val();
-   return dimval.isConstInt( val);
-}
-
-
-bool ArrayShapeDescriptor::read( std::istream& in)
-{
-  return ReadContainer<ArrayShapeDescriptor, ReadSymbolicFunctionDeclaration,
-                        ';', '{','}'>::
-    read(*this, in);
-}
-
-bool ArrayElemDescriptor::read( std::istream& in)
-{
-  return ReadContainer<ArrayElemDescriptor, ReadSymbolicFunctionDeclaration,';', '{','}'>::
-    read(*this, in);
-}
-
-bool ArrayDescriptor::read( std::istream& in)
-{
-  return ReadContainer<ArrayDescriptor, ReadSymbolicFunctionDeclaration,';', '{','}'>::
-    read(*this, in);
-}
-
-void ArrayShapeDescriptor:: push_back( const ReadSymbolicFunctionDeclaration& cur)
-  {
-    std::string annot = cur.first.first;
-    if (annot == "dimension") {
-        assert(cur.first.second.size() == 0);
-        dimension = cur.second;
-    }
-    else if (annot == "length") {
-        length.push_back( SymbolicFunctionDeclaration( cur.first.second, cur.second) );
-    }
-    else {
-      std::cerr << "Error: non-recognized annotation: " << annot << std::endl;
-      assert(false);
-    }
-  }
-
-void ArrayElemDescriptor:: push_back( const ReadSymbolicFunctionDeclaration& cur)
-{
-  std::string annot = cur.first.first;
-  if (annot == "elem") {
-    elem.push_back( SymbolicFunctionDeclaration( cur.first.second, cur.second) );
-  }
-  else{
-      std::cerr << "Error: non-recognized annotation: " << annot << std::endl;
-      assert(false);
-    }
-
-}
-  
-void ArrayDescriptor:: push_back( const ReadSymbolicFunctionDeclaration& cur)
-{
-  std::string annot = cur.first.first;
-  if (annot == "elem") {
-     ArrayElemDescriptor::push_back( cur);
-  }
-  else 
-    ArrayShapeDescriptor::push_back(cur) ;
-}
-void ArrayShapeDescriptor::write( std::ostream& out) const
-{
-  out << "dimension=";
-  dimension.write(out); 
-  out << ";  length=" ;
-  length.write(out);
-}
-
-void ArrayShapeDescriptor :: Dump() const
-{
-  write(std::cerr);
-}
-
-void ArrayElemDescriptor::write( std::ostream& out) const
-{
-  out << ";  elem=";
-  elem.write(out);
-}
-
-void ArrayElemDescriptor :: Dump() const
-{
-  write(std::cerr);
-}
-
-void ArrayDescriptor::write( std::ostream& out) const
-{
-  out << "{";
-  ArrayShapeDescriptor::write(out);
-  ArrayElemDescriptor::write(out);
-  out << " } ";
-}
-
-void ArrayDescriptor :: Dump() const
-{
-  write(std::cerr);
-}
-
-void ArrayDefineDescriptor ::
-replace_var(  const std::string& varname, const SymbolicVal& repl)
-{ 
-  ArrayDescriptor::replace_var( varname, repl);
-  reshape.replace_var( varname, repl);
-}
-
-void ArrayDefineDescriptor ::
-replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
-{ 
-  ArrayDescriptor :: replace_val(repl);
-  reshape.replace_val(repl);
-}
-
-void ArrayDefineDescriptor::push_back( const ReadSymbolicFunctionDeclaration& cur)
-{
-  std::string annot = cur.first.first;
-  if (annot == "reshape")  {
-    if ( cur.first.second.size() > 1) {
-      cur.Dump();
-      assert(false);
-    }
-    reshape.push_back( SymbolicFunctionDeclaration( cur.first.second, cur.second) );
-  }
-  else
-     ArrayDescriptor::push_back(cur);
-}
-
-bool ArrayDefineDescriptor :: read( std::istream& in)
-{
-  return ReadContainer< ArrayDefineDescriptor, ReadSymbolicFunctionDeclaration,';', '{','}'>::
-               read(*this, in);
-}
-
-void ArrayDefineDescriptor :: write( std::ostream& out) const
-{ 
-  ArrayDescriptor::write(out);
-  out << "reshape = ";
-  reshape.write(out);
-}
-
-void ArrayDefineDescriptor :: Dump() const
-{
-  write(std::cerr);
-}
-
-
-bool ArrayOptDescriptor :: read( std::istream& in)
-{
-  read_ch(in, '{');
-  if (peek_id(in) == "define") { 
-     read_id(in,"define");
-     defs.read(in);
-  }
-  return ReadContainer< ArrayDescriptor, ReadSymbolicFunctionDeclaration,';', 0,'}'>::
-               read(*this, in);
-}
-
-void ArrayOptDescriptor :: write( std::ostream& out) const
-{ 
-  defs.write(out);
-  ArrayDescriptor::write(out);
-}
-
-void ArrayOptDescriptor :: 
-replace_var(  const std::string& varname, const SymbolicVal& repl)
-{ 
-  ArrayDescriptor::replace_var( varname, repl);
-  for (DefContainer::iterator p = defs.begin();
-       p != defs.end(); ++p) {
-    DefineVariableDescriptor& cur = *p;
-    cur.replace_var(varname, repl);
-  }
-}
-
-void ArrayOptDescriptor :: 
-replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
-{ 
-  ArrayDescriptor :: replace_val(repl);
-  for (DefContainer::iterator p = defs.begin();
-       p != defs.end(); ++p) {
-    DefineVariableDescriptor& cur = *p;
-    cur.replace_val(repl);
-  }
-}
-
-void ArrayOptDescriptor :: Dump() const
-{
-  write(std::cerr);
-}
-
-ArrayAnnotation* ArrayAnnotation::inst = 0;
-ArrayAnnotation* ArrayAnnotation::get_inst()
-{
-  if (inst == 0)
-    inst = new ArrayAnnotation();
-  return inst;
-}
-//Hook up ReadAnnotation: register various type and operator collectors, including
-// independent collectors: Operator side effect, inline, alias, value
-// own collectors: arrays, array optimizations, construct_array, modify_array
-void ArrayAnnotation:: register_annot()
-{
-   OperatorSideEffectAnnotation::get_inst()->register_annot();
-   OperatorInlineAnnotation::get_inst()->register_annot();
-   OperatorAliasAnnotation::get_inst()->register_annot();
-   ValueAnnotation::get_inst()->register_annot();
-   
-   ReadAnnotation* op = ReadAnnotation::get_inst();
-   op->add_TypeCollection(&arrays);
-   op->add_TypeCollection(&arrayopt);
-   
-   op->add_OperatorCollection(&arrayConstruct);
-   op->add_OperatorCollection(&arrayModify);
-}
-
-void ArrayAnnotation :: Dump() const
-{
-   OperatorSideEffectAnnotation::get_inst()->Dump();
-   OperatorAliasAnnotation::get_inst()->Dump();
-   ValueAnnotation::get_inst()->Dump();
-   arrays.Dump();
-   arrayopt.Dump();
-   arrayConstruct.Dump();
-   arrayModify.Dump();
-}
-
-bool ArrayAnnotation ::
-known_array_type( CPPAstInterface& fa, const AstNodeType& type, ArrayDefineDescriptor* r)
-{
-  return arrays.known_type( fa, type, r);
-}
-
-bool ArrayAnnotation ::
-known_array( CPPAstInterface& fa, const AstNodePtr& array, ArrayDefineDescriptor* r)
-{
-  return arrays.known_type( fa, array, r);
-}
-
-bool ArrayAnnotation ::
-has_array_opt( CPPAstInterface& fa, const AstNodePtr array, ArrayOptDescriptor* r)
-{
-  return arrayopt.known_type( fa, array, r);
-}
-//! Check if an expression 'arrayExp' is an expression(operation) modifying an array(creation or modifying)
-bool ArrayAnnotation::
-is_array_mod_op( CPPAstInterface& fa, const AstNodePtr& arrayExp,
-                 AstNodePtr* arrayp, ArrayDescriptor* descp, bool* reshape,
-                 ReplaceParams* repl)
-{
-  CPPAstInterface::AstNodeList args;
-  ArrayModifyDescriptor desc;
-  if (!arrayModify.known_operator( fa, arrayExp, &args, &desc, true)) {
-     if (DebugArrayAnnot()) {
-        std::cerr << "NOT mod-array operator: ";
-        std::cerr << AstToString(arrayExp);
-        std::cerr << std::endl;
-     }
-    return false;
-  }
-
-  if (arrayp != 0) {
-    if (!desc.first.get_val().isAstWrap(*arrayp))
-       assert( false);
-  }
-  if (descp != 0) {
-    *descp = desc.second;
-  }
-
-  if (reshape != 0) {
-    *reshape = !desc.second.get_dimension().is_top() || desc.second.get_length().size();
-  }
-
-  if (DebugArrayAnnot()) {
-     std::cerr << "recognized mod-array operator: ";
-     std::cerr << AstToString(arrayExp);
-     std::cerr << std::endl;
-
-     return true;
-  }
-  return true;
-}
-
-bool ArrayAnnotation::
-is_array_construct_op( CPPAstInterface& fa, const AstNodePtr& arrayExp, CPPAstInterface::AstNodeList* alias,
-                       ArrayDescriptor* descp, ReplaceParams* repl)
-{
-  CPPAstInterface::AstNodeList args;
-  ArrayConstructDescriptor desc;
-  if (!arrayConstruct.known_operator( fa, arrayExp, &args, &desc, true))
-    return false;
-
-  if (descp != 0) {
-    *descp = desc.second;
-  }
-  if (alias != 0) {
-    for (std::list<SymbolicValDescriptor>::const_iterator p = desc.first.begin(); 
-         p != desc.first.end(); ++p) {
-       SymbolicValDescriptor cur = *p;
-       AstNodePtr curarg;
-       if (!cur.get_val().isAstWrap(curarg))
-           assert(false);
-       alias->push_back(curarg);
-    }
-  }
-  return true;
-}
-
-AstNodePtr ArrayAnnotation::
-create_access_array_elem( CPPAstInterface& fa, const AstNodePtr& array,
-			  const AstInterface::AstNodeList& args)
-{
-  return arrays.create_known_member_function( fa, array, "elem", args);
-}
-
-SymbolicVal  ArrayAnnotation ::
-create_access_array_elem( const AstNodePtr& array, const SymbolicFunction::Arguments& args)
-{
-  return arrays.create_known_member_function( array, "elem", args);
-}
-
-AstNodePtr ArrayAnnotation ::
-create_reshape_array( CPPAstInterface& fa, const AstNodePtr& array,
-			  const CPPAstInterface::AstNodeList& args)
-{
-  return arrays.create_known_member_function( fa, array, "reshape", args);
-}
-
-SymbolicVal ArrayAnnotation::
-create_access_array_length( const AstNodePtr& array, const SymbolicVal& dim)
-{
-  SymbolicFunction::Arguments args;
-  args.push_back( dim);
-  return arrays.create_known_member_function( array, "length", args);
-}
-
-AstNodePtr ArrayAnnotation::
-create_access_array_length( CPPAstInterface& fa, const AstNodePtr& array, 
-			    int dim)
-{
-  CPPAstInterface::AstNodeList args;
-  args.push_back( fa.CreateConstInt(dim));
-  return arrays.create_known_member_function( fa, array, "length", args);
-}
-
-bool ArrayAnnotation ::
-is_access_array_length( CPPAstInterface& fa, const SymbolicVal& orig, 
-                         AstNodePtr* arrayp, SymbolicVal *dim)
-{
-  SymbolicFunction::Arguments args;
-  if (arrays.is_known_member_function( fa,orig, arrayp, &args) == "length") {
-     assert(args.size() == 1);
-     if (dim != 0)
-        *dim = args.front();
-     return true;
-  }
-  return false;
-}
-//! Check if a node is a known member function of an array to access the length of one dimension
-// If true, return the array node 'arrayp', function parameter 'dimAst', 
-// and the integer value of the prameter 'dim'
-bool ArrayAnnotation ::
-is_access_array_length( CPPAstInterface& fa, const AstNodePtr& orig, AstNodePtr* arrayp,
-                        AstNodePtr* dimAst, int *dim)
-{
-   CPPAstInterface::AstNodeList args;
-   if (arrays.is_known_member_function( fa, orig, arrayp, &args) == "length") {
-      assert (args.size() == 1);
-      AstNodePtr cur = *args.begin();
-      if (dimAst != 0)
-            *dimAst = cur;
-      if (dim != 0) {
-          if (!fa.IsConstInt(cur, dim)) // Must be constant? How about variables as parameter!!??
-              assert(false);
-      }
-      return true;
-   }
-   return false;
-}
-
-bool ArrayAnnotation ::
-is_access_array_elem( CPPAstInterface& fa, const SymbolicVal& orig, AstNodePtr* array, SymbolicFunction::Arguments* args)
-{
-   // It calls is_known_member_function() of CPPAstInterface<ArrayDefineDescriptor> ???
-  if (arrays.is_known_member_function( fa, orig, array, args) == "elem") {
-    return true;
-  }
-  return false;
-}
-
-bool ArrayAnnotation ::
-is_access_array_elem( CPPAstInterface& fa, const AstNodePtr& orig, 
-                      AstNodePtr* arrayp,
-                      CPPAstInterface::AstNodeList* args)
-{
-  if (arrays.is_known_member_function( fa, orig, arrayp, args) == "elem") {
-    return true;
-  }
-  return false;
-}
-
-bool ArrayAnnotation ::
-is_reshape_array( CPPAstInterface& fa, const AstNodePtr& orig, 
-                  AstNodePtr* arrayp,
-                  CPPAstInterface::AstNodeList* args)
-{
-  return arrays.is_known_member_function( fa, orig, arrayp, args) == "reshape" ;
-}
-
-bool ArrayAnnotation ::
-may_alias(AstInterface& _fa, const AstNodePtr& fc, const AstNodePtr& result,
-                         CollectObject< std::pair<AstNodePtr, int> >& collectalias)
-{
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-  if (is_access_array_elem( fa, fc) || is_access_array_length(fa, fc) ||
-      is_reshape_array( fa, fc))
-      return true;
-  return OperatorAliasAnnotation::get_inst()->may_alias(fa, fc, result, collectalias);
-}
-
-bool ArrayAnnotation ::
-allow_alias(AstInterface& fa, const AstNodePtr& fc, 
-                         CollectObject< std::pair<AstNodePtr, int> >& collectalias)
-{
-  return OperatorAliasAnnotation::get_inst()->allow_alias(fa, fc, collectalias);
-}
-
-bool ArrayAnnotation ::
-get_modify(AstInterface& _fa, const AstNodePtr& fc,
-                               CollectObject<AstNodePtr>* collect)
-{
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-    // No modified variables for array length retrieval and element read calls.  
-   if ( is_access_array_elem(fa, fc) || is_access_array_length(fa, fc)) 
-      return true;
-   // array reshape calls modify the entire array   
-   AstNodePtr array;
-   if (is_reshape_array( fa,fc, &array)) {
-      if (collect != 0)
-         (*collect)(array);
-      return true;
-   } 
-   // Relying on annotations for all other function calls 
-   return OperatorSideEffectAnnotation::get_inst()->get_modify(fa, fc, collect);
-}
-
-bool ArrayAnnotation ::
-get_read(AstInterface& _fa, const AstNodePtr& fc, CollectObject<AstNodePtr>* collect)
-{
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-   AstNodePtr dim;
-   //the 'dim' parameter used to retrieve array length of a dimension is a read accesss
-   if (is_access_array_length( fa, fc, 0, &dim)) {
-       if (collect != 0)
-           (*collect)(dim);
-       return true;
-   }
-   // The variables used as subscripts in array element access function call are read.
-   CPPAstInterface::AstNodeList args;
-   if (is_access_array_elem( fa, fc, 0, &args)) {
-      if (collect != 0) {
-           for (CPPAstInterface::AstNodeList::iterator p = args.begin();
-                  p != args.end(); ++p) 
-              (*collect)(*p);
-      }
-      return true;
-   }
-   //Use side effect annotation for all other function calls
-   return OperatorSideEffectAnnotation::get_inst()->get_read(fa, fc, collect);
-}
-
-#define TEMPLATE_ONLY
-#include <TypeAnnotation.C>
-//#include <OperatorDescriptors.C>
-template class TypeCollection<ArrayModifyDescriptor>;
-template class TypeCollection<ArrayConstructDescriptor>;
-template class OperatorAnnotCollection<ArrayModifyDescriptor>;
-template class OperatorAnnotCollection<ArrayConstructDescriptor>;
-template class TypeAnnotCollection<ArrayDefineDescriptor>;
-template class TypeAnnotCollection<ArrayOptDescriptor>;
-#include <AnnotDescriptors.C>
-template class CollectPair<TypeDescriptor, ArrayDescriptor, 0>;
-

Copied: branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayAnnot.C (from rev 128, trunk/src/midend/loopProcessing/outsideInterface/ArrayAnnot.C)
===================================================================
--- branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayAnnot.C	                        (rev 0)
+++ branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayAnnot.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,502 @@
+#include <ArrayAnnot.h>
+#include <fstream>
+#include <CommandOptions.h>
+#include <iostream>
+
+bool DebugArrayAnnot()
+{
+  static int r = 0;
+  if (r == 0) {
+     if (CmdOptions::GetInstance()->HasOption("-debugarrayannot"))
+         r = 1;
+     else
+         r = -1;
+  }
+  return r == 1;
+}
+
+
+bool ArrayShapeDescriptor:: get_dimension( int& val) const
+{ 
+   SymbolicVal dimval = dimension.get_val();
+   return dimval.isConstInt( val);
+}
+
+
+bool ArrayShapeDescriptor::read( std::istream& in)
+{
+  return ReadContainer<ArrayShapeDescriptor, ReadSymbolicFunctionDeclaration,
+                        ';', '{','}'>::
+    read(*this, in);
+}
+
+bool ArrayElemDescriptor::read( std::istream& in)
+{
+  return ReadContainer<ArrayElemDescriptor, ReadSymbolicFunctionDeclaration,';', '{','}'>::
+    read(*this, in);
+}
+
+bool ArrayDescriptor::read( std::istream& in)
+{
+  return ReadContainer<ArrayDescriptor, ReadSymbolicFunctionDeclaration,';', '{','}'>::
+    read(*this, in);
+}
+
+void ArrayShapeDescriptor:: push_back( const ReadSymbolicFunctionDeclaration& cur)
+  {
+    std::string annot = cur.first.first;
+    if (annot == "dimension") {
+        assert(cur.first.second.size() == 0);
+        dimension = cur.second;
+    }
+    else if (annot == "length") {
+        length.push_back( SymbolicFunctionDeclaration( cur.first.second, cur.second) );
+    }
+    else {
+      std::cerr << "Error: non-recognized annotation: " << annot << std::endl;
+      assert(false);
+    }
+  }
+
+void ArrayElemDescriptor:: push_back( const ReadSymbolicFunctionDeclaration& cur)
+{
+  std::string annot = cur.first.first;
+  if (annot == "elem") {
+    elem.push_back( SymbolicFunctionDeclaration( cur.first.second, cur.second) );
+  }
+  else{
+      std::cerr << "Error: non-recognized annotation: " << annot << std::endl;
+      assert(false);
+    }
+
+}
+  
+void ArrayDescriptor:: push_back( const ReadSymbolicFunctionDeclaration& cur)
+{
+  std::string annot = cur.first.first;
+  if (annot == "elem") {
+     ArrayElemDescriptor::push_back( cur);
+  }
+  else 
+    ArrayShapeDescriptor::push_back(cur) ;
+}
+void ArrayShapeDescriptor::write( std::ostream& out) const
+{
+  out << "dimension=";
+  dimension.write(out); 
+  out << ";  length=" ;
+  length.write(out);
+}
+
+void ArrayShapeDescriptor :: Dump() const
+{
+  write(std::cerr);
+}
+
+void ArrayElemDescriptor::write( std::ostream& out) const
+{
+  out << ";  elem=";
+  elem.write(out);
+}
+
+void ArrayElemDescriptor :: Dump() const
+{
+  write(std::cerr);
+}
+
+void ArrayDescriptor::write( std::ostream& out) const
+{
+  out << "{";
+  ArrayShapeDescriptor::write(out);
+  ArrayElemDescriptor::write(out);
+  out << " } ";
+}
+
+void ArrayDescriptor :: Dump() const
+{
+  write(std::cerr);
+}
+
+void ArrayDefineDescriptor ::
+replace_var(  const std::string& varname, const SymbolicVal& repl)
+{ 
+  ArrayDescriptor::replace_var( varname, repl);
+  reshape.replace_var( varname, repl);
+}
+
+void ArrayDefineDescriptor ::
+replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
+{ 
+  ArrayDescriptor :: replace_val(repl);
+  reshape.replace_val(repl);
+}
+
+void ArrayDefineDescriptor::push_back( const ReadSymbolicFunctionDeclaration& cur)
+{
+  std::string annot = cur.first.first;
+  if (annot == "reshape")  {
+    if ( cur.first.second.size() > 1) {
+      cur.Dump();
+      assert(false);
+    }
+    reshape.push_back( SymbolicFunctionDeclaration( cur.first.second, cur.second) );
+  }
+  else
+     ArrayDescriptor::push_back(cur);
+}
+
+bool ArrayDefineDescriptor :: read( std::istream& in)
+{
+  return ReadContainer< ArrayDefineDescriptor, ReadSymbolicFunctionDeclaration,';', '{','}'>::
+               read(*this, in);
+}
+
+void ArrayDefineDescriptor :: write( std::ostream& out) const
+{ 
+  ArrayDescriptor::write(out);
+  out << "reshape = ";
+  reshape.write(out);
+}
+
+void ArrayDefineDescriptor :: Dump() const
+{
+  write(std::cerr);
+}
+
+
+bool ArrayOptDescriptor :: read( std::istream& in)
+{
+  read_ch(in, '{');
+  if (peek_id(in) == "define") { 
+     read_id(in,"define");
+     defs.read(in);
+  }
+  return ReadContainer< ArrayDescriptor, ReadSymbolicFunctionDeclaration,';', 0,'}'>::
+               read(*this, in);
+}
+
+void ArrayOptDescriptor :: write( std::ostream& out) const
+{ 
+  defs.write(out);
+  ArrayDescriptor::write(out);
+}
+
+void ArrayOptDescriptor :: 
+replace_var(  const std::string& varname, const SymbolicVal& repl)
+{ 
+  ArrayDescriptor::replace_var( varname, repl);
+  for (DefContainer::iterator p = defs.begin();
+       p != defs.end(); ++p) {
+    DefineVariableDescriptor& cur = *p;
+    cur.replace_var(varname, repl);
+  }
+}
+
+void ArrayOptDescriptor :: 
+replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
+{ 
+  ArrayDescriptor :: replace_val(repl);
+  for (DefContainer::iterator p = defs.begin();
+       p != defs.end(); ++p) {
+    DefineVariableDescriptor& cur = *p;
+    cur.replace_val(repl);
+  }
+}
+
+void ArrayOptDescriptor :: Dump() const
+{
+  write(std::cerr);
+}
+
+ArrayAnnotation* ArrayAnnotation::inst = 0;
+ArrayAnnotation* ArrayAnnotation::get_inst()
+{
+  if (inst == 0)
+    inst = new ArrayAnnotation();
+  return inst;
+}
+//Hook up ReadAnnotation: register various type and operator collectors, including
+// independent collectors: Operator side effect, inline, alias, value
+// own collectors: arrays, array optimizations, construct_array, modify_array
+void ArrayAnnotation:: register_annot()
+{
+   OperatorSideEffectAnnotation::get_inst()->register_annot();
+   OperatorInlineAnnotation::get_inst()->register_annot();
+   OperatorAliasAnnotation::get_inst()->register_annot();
+   ValueAnnotation::get_inst()->register_annot();
+   
+   ReadAnnotation* op = ReadAnnotation::get_inst();
+   op->add_TypeCollection(&arrays);
+   op->add_TypeCollection(&arrayopt);
+   
+   op->add_OperatorCollection(&arrayConstruct);
+   op->add_OperatorCollection(&arrayModify);
+}
+
+void ArrayAnnotation :: Dump() const
+{
+   OperatorSideEffectAnnotation::get_inst()->Dump();
+   OperatorAliasAnnotation::get_inst()->Dump();
+   ValueAnnotation::get_inst()->Dump();
+   arrays.Dump();
+   arrayopt.Dump();
+   arrayConstruct.Dump();
+   arrayModify.Dump();
+}
+
+bool ArrayAnnotation ::
+known_array_type( CPPAstInterface& fa, const AstNodeType& type, ArrayDefineDescriptor* r)
+{
+  return arrays.known_type( fa, type, r);
+}
+
+bool ArrayAnnotation ::
+known_array( CPPAstInterface& fa, const AstNodePtr& array, ArrayDefineDescriptor* r)
+{
+  return arrays.known_type( fa, array, r);
+}
+
+bool ArrayAnnotation ::
+has_array_opt( CPPAstInterface& fa, const AstNodePtr array, ArrayOptDescriptor* r)
+{
+  return arrayopt.known_type( fa, array, r);
+}
+//! Check if an expression 'arrayExp' is an expression(operation) modifying an array(creation or modifying)
+bool ArrayAnnotation::
+is_array_mod_op( CPPAstInterface& fa, const AstNodePtr& arrayExp,
+                 AstNodePtr* arrayp, ArrayDescriptor* descp, bool* reshape,
+                 ReplaceParams* repl)
+{
+  CPPAstInterface::AstNodeList args;
+  ArrayModifyDescriptor desc;
+  if (!arrayModify.known_operator( fa, arrayExp, &args, &desc, true)) {
+     if (DebugArrayAnnot()) {
+        std::cerr << "NOT mod-array operator: ";
+        std::cerr << AstToString(arrayExp);
+        std::cerr << std::endl;
+     }
+    return false;
+  }
+
+  if (arrayp != 0) {
+    if (!desc.first.get_val().isAstWrap(*arrayp))
+       assert( false);
+  }
+  if (descp != 0) {
+    *descp = desc.second;
+  }
+
+  if (reshape != 0) {
+    *reshape = !desc.second.get_dimension().is_top() || desc.second.get_length().size();
+  }
+
+  if (DebugArrayAnnot()) {
+     std::cerr << "recognized mod-array operator: ";
+     std::cerr << AstToString(arrayExp);
+     std::cerr << std::endl;
+
+     return true;
+  }
+  return true;
+}
+
+bool ArrayAnnotation::
+is_array_construct_op( CPPAstInterface& fa, const AstNodePtr& arrayExp, CPPAstInterface::AstNodeList* alias,
+                       ArrayDescriptor* descp, ReplaceParams* repl)
+{
+  CPPAstInterface::AstNodeList args;
+  ArrayConstructDescriptor desc;
+  if (!arrayConstruct.known_operator( fa, arrayExp, &args, &desc, true))
+    return false;
+
+  if (descp != 0) {
+    *descp = desc.second;
+  }
+  if (alias != 0) {
+    for (std::list<SymbolicValDescriptor>::const_iterator p = desc.first.begin(); 
+         p != desc.first.end(); ++p) {
+       SymbolicValDescriptor cur = *p;
+       AstNodePtr curarg;
+       if (!cur.get_val().isAstWrap(curarg))
+           assert(false);
+       alias->push_back(curarg);
+    }
+  }
+  return true;
+}
+
+AstNodePtr ArrayAnnotation::
+create_access_array_elem( CPPAstInterface& fa, const AstNodePtr& array,
+			  const AstInterface::AstNodeList& args)
+{
+  return arrays.create_known_member_function( fa, array, "elem", args);
+}
+
+SymbolicVal  ArrayAnnotation ::
+create_access_array_elem( const AstNodePtr& array, const SymbolicFunction::Arguments& args)
+{
+  return arrays.create_known_member_function( array, "elem", args);
+}
+
+AstNodePtr ArrayAnnotation ::
+create_reshape_array( CPPAstInterface& fa, const AstNodePtr& array,
+			  const CPPAstInterface::AstNodeList& args)
+{
+  return arrays.create_known_member_function( fa, array, "reshape", args);
+}
+
+SymbolicVal ArrayAnnotation::
+create_access_array_length( const AstNodePtr& array, const SymbolicVal& dim)
+{
+  SymbolicFunction::Arguments args;
+  args.push_back( dim);
+  return arrays.create_known_member_function( array, "length", args);
+}
+
+AstNodePtr ArrayAnnotation::
+create_access_array_length( CPPAstInterface& fa, const AstNodePtr& array, 
+			    int dim)
+{
+  CPPAstInterface::AstNodeList args;
+  args.push_back( fa.CreateConstInt(dim));
+  return arrays.create_known_member_function( fa, array, "length", args);
+}
+
+bool ArrayAnnotation ::
+is_access_array_length( CPPAstInterface& fa, const SymbolicVal& orig, 
+                         AstNodePtr* arrayp, SymbolicVal *dim)
+{
+  SymbolicFunction::Arguments args;
+  if (arrays.is_known_member_function( fa,orig, arrayp, &args) == "length") {
+     assert(args.size() == 1);
+     if (dim != 0)
+        *dim = args.front();
+     return true;
+  }
+  return false;
+}
+//! Check if a node is a known member function of an array to access the length of one dimension
+// If true, return the array node 'arrayp', function parameter 'dimAst', 
+// and the integer value of the prameter 'dim'
+bool ArrayAnnotation ::
+is_access_array_length( CPPAstInterface& fa, const AstNodePtr& orig, AstNodePtr* arrayp,
+                        AstNodePtr* dimAst, int *dim)
+{
+   CPPAstInterface::AstNodeList args;
+   if (arrays.is_known_member_function( fa, orig, arrayp, &args) == "length") {
+      assert (args.size() == 1);
+      AstNodePtr cur = *args.begin();
+      if (dimAst != 0)
+            *dimAst = cur;
+      if (dim != 0) {
+          if (!fa.IsConstInt(cur, dim)) // Must be constant? How about variables as parameter!!??
+              assert(false);
+      }
+      return true;
+   }
+   return false;
+}
+
+bool ArrayAnnotation ::
+is_access_array_elem( CPPAstInterface& fa, const SymbolicVal& orig, AstNodePtr* array, SymbolicFunction::Arguments* args)
+{
+   // It calls is_known_member_function() of CPPAstInterface<ArrayDefineDescriptor> ???
+  if (arrays.is_known_member_function( fa, orig, array, args) == "elem") {
+    return true;
+  }
+  return false;
+}
+
+bool ArrayAnnotation ::
+is_access_array_elem( CPPAstInterface& fa, const AstNodePtr& orig, 
+                      AstNodePtr* arrayp,
+                      CPPAstInterface::AstNodeList* args)
+{
+  if (arrays.is_known_member_function( fa, orig, arrayp, args) == "elem") {
+    return true;
+  }
+  return false;
+}
+
+bool ArrayAnnotation ::
+is_reshape_array( CPPAstInterface& fa, const AstNodePtr& orig, 
+                  AstNodePtr* arrayp,
+                  CPPAstInterface::AstNodeList* args)
+{
+  return arrays.is_known_member_function( fa, orig, arrayp, args) == "reshape" ;
+}
+
+bool ArrayAnnotation ::
+may_alias(AstInterface& _fa, const AstNodePtr& fc, const AstNodePtr& result,
+                         CollectObject< std::pair<AstNodePtr, int> >& collectalias)
+{
+  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
+  if (is_access_array_elem( fa, fc) || is_access_array_length(fa, fc) ||
+      is_reshape_array( fa, fc))
+      return true;
+  return OperatorAliasAnnotation::get_inst()->may_alias(fa, fc, result, collectalias);
+}
+
+bool ArrayAnnotation ::
+allow_alias(AstInterface& fa, const AstNodePtr& fc, 
+                         CollectObject< std::pair<AstNodePtr, int> >& collectalias)
+{
+  return OperatorAliasAnnotation::get_inst()->allow_alias(fa, fc, collectalias);
+}
+
+bool ArrayAnnotation ::
+get_modify(AstInterface& _fa, const AstNodePtr& fc,
+                               CollectObject<AstNodePtr>* collect)
+{
+  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
+    // No modified variables for array length retrieval and element read calls.  
+   if ( is_access_array_elem(fa, fc) || is_access_array_length(fa, fc)) 
+      return true;
+   // array reshape calls modify the entire array   
+   AstNodePtr array;
+   if (is_reshape_array( fa,fc, &array)) {
+      if (collect != 0)
+         (*collect)(array);
+      return true;
+   } 
+   // Relying on annotations for all other function calls 
+   return OperatorSideEffectAnnotation::get_inst()->get_modify(fa, fc, collect);
+}
+
+bool ArrayAnnotation ::
+get_read(AstInterface& _fa, const AstNodePtr& fc, CollectObject<AstNodePtr>* collect)
+{
+  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
+   AstNodePtr dim;
+   //the 'dim' parameter used to retrieve array length of a dimension is a read accesss
+   if (is_access_array_length( fa, fc, 0, &dim)) {
+       if (collect != 0)
+           (*collect)(dim);
+       return true;
+   }
+   // The variables used as subscripts in array element access function call are read.
+   CPPAstInterface::AstNodeList args;
+   if (is_access_array_elem( fa, fc, 0, &args)) {
+      if (collect != 0) {
+           for (CPPAstInterface::AstNodeList::iterator p = args.begin();
+                  p != args.end(); ++p) 
+              (*collect)(*p);
+      }
+      return true;
+   }
+   //Use side effect annotation for all other function calls
+   return OperatorSideEffectAnnotation::get_inst()->get_read(fa, fc, collect);
+}
+
+#define TEMPLATE_ONLY
+#include <TypeAnnotation.C>
+//#include <OperatorDescriptors.C>
+template class TypeCollection<ArrayModifyDescriptor>;
+template class TypeCollection<ArrayConstructDescriptor>;
+template class OperatorAnnotCollection<ArrayModifyDescriptor>;
+template class OperatorAnnotCollection<ArrayConstructDescriptor>;
+template class TypeAnnotCollection<ArrayDefineDescriptor>;
+template class TypeAnnotCollection<ArrayOptDescriptor>;
+#include <AnnotDescriptors.C>
+template class CollectPair<TypeDescriptor, ArrayDescriptor, 0>;
+

Deleted: branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayAnnot.h
===================================================================
--- trunk/src/midend/loopProcessing/outsideInterface/ArrayAnnot.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayAnnot.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,292 +0,0 @@
-#ifndef ARRAY_ANNOT_H
-#define ARRAY_ANNOT_H
-
-#include <AnnotExpr.h>
-#include <AnnotCollect.h>
-#include <OperatorDescriptors.h>
-#include <CPPAnnotation.h>
-#include <ValuePropagate.h>
-#include <list>
-
-//! Descriptor (string format) of array shape: 
-//    maximum number of dimensions: integer constant or symbol 
-//    size(length) of each dimension: a symbolic function of the dimension number
-class ArrayShapeDescriptor {
-  SymbolicValDescriptor dimension;
-  SymbolicFunctionDeclarationGroup length;
- public:
-  void push_back( const ReadSymbolicFunctionDeclaration& cur);
-  void write(std::ostream& out) const;
-  void Dump() const;
-  bool read( std::istream& in);
-
-  const SymbolicValDescriptor& get_dimension() const { return dimension; }
-  SymbolicValDescriptor& get_dimension() { return dimension; }
-  bool get_dimension( int& val) const ;
-
-  void set_length( const SymbolicFunctionDeclarationGroup v) { length = v; }
-  SymbolicFunctionDeclarationGroup get_length() const { return length; }
-  bool get_length( int dim, SymbolicVal& result) const 
-    {
-       std::vector<SymbolicVal> args;
-       args.push_back( SymbolicConst(dim));
-       return length.get_val(args, result);
-    }
-
-  void replace_var(  const std::string& varname, const SymbolicVal& repl)
-   { 
-     dimension.replace_var( varname, repl);
-     length.replace_var(varname, repl);
-   }
-  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
-   { 
-     dimension.replace_val(repl);
-     length.replace_val(repl);
-   }
-};
-
-class ArrayElemDescriptor 
-{
-  SymbolicFunctionDeclarationGroup elem;
- public:
-  void push_back( const ReadSymbolicFunctionDeclaration& cur);
-  void Dump() const;
-  void write(std::ostream& out) const;
-  bool read(std::istream& in);
-  void replace_var(  const std::string& varname, const SymbolicVal& repl)
-   { 
-     elem.replace_var( varname, repl);
-   }
-  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
-   { 
-     elem.replace_val(repl);
-   }
-
-  const SymbolicFunctionDeclarationGroup& get_elem()  const { return elem; }
-};
-
-class ArrayDescriptor 
-: public ArrayShapeDescriptor, public ArrayElemDescriptor
-{
- public:
-  void push_back( const ReadSymbolicFunctionDeclaration& cur);
-  bool read( std::istream& in) ;
-  void write(std::ostream& out) const;
-  void Dump() const;
-  void replace_var(  const std::string& varname, const SymbolicVal& repl)
-   { 
-     ArrayShapeDescriptor::replace_var( varname, repl);
-     ArrayElemDescriptor::replace_var( varname, repl);
-   }
-  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
-   { 
-     ArrayShapeDescriptor :: replace_val(repl);
-     ArrayElemDescriptor :: replace_val(repl);
-   }
-};
-
-class ArrayDefineDescriptor : public ArrayDescriptor
-{
-  SymbolicFunctionDeclarationGroup reshape;
- public:
-  void push_back( const ReadSymbolicFunctionDeclaration& cur);
-  bool read( std::istream& in) ;
-  void write(std::ostream& out) const;
-  void Dump() const;
-  void replace_var(  const std::string& varname, const SymbolicVal& repl);
-  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl);
-
-  SymbolicFunctionDeclarationGroup get_reshape() const 
-    {
-      return reshape;
-    }
-  
-};
-
-class ArrayOptDescriptor : public ArrayDescriptor
-{
-  typedef ContainerDescriptor <std::list<DefineVariableDescriptor>, 
-                               DefineVariableDescriptor, ';', '{', '}'> DefContainer;
-  DefContainer defs;
- public:
-  typedef std::list<DefineVariableDescriptor>::iterator InitVarIterator;
-  
-  InitVarIterator init_var_begin() 
-    {
-      return defs.begin();
-    }
-  InitVarIterator init_var_end()
-    {
-      return defs.end();
-    }
-  
-      
-
-  bool read( std::istream& in) ;
-  void write(std::ostream& out) const;
-  void Dump() const;
-  void replace_var(  const std::string& varname, const SymbolicVal& repl);
-  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl);
-};
-
-class ArrayConstructDescriptor 
-: public OPDescriptorTemp
-          < CollectPair< ContainerDescriptor<std::list<SymbolicValDescriptor>,
-                                             SymbolicValDescriptor, ',', '(', ')'>,
-                         ArrayDescriptor, 0 > >
-{
-  typedef OPDescriptorTemp
-          < CollectPair< ContainerDescriptor<std::list<SymbolicValDescriptor>, 
-                                             SymbolicValDescriptor, ',', '(', ')'>,
-                         ArrayDescriptor, 0 > 
-          > BaseClass;
- public:
-  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
-   {
-     for (std::list<SymbolicValDescriptor>::iterator p = first.begin(); p != first.end(); ++p) { 
-         (*p).replace_val(repl);
-     }
-     second.replace_val(repl);
-   }
-};
-//! Modify Array[symbolic_value]
-class ArrayModifyDescriptor : 
-public OPDescriptorTemp < CollectPair< CloseDescriptor<SymbolicValDescriptor, '(', ')'>, 
-                         ArrayDescriptor,0> > 
-{
-  typedef OPDescriptorTemp
-    < CollectPair< CloseDescriptor<NameDescriptor, '(', ')'>, 
-                         ArrayDescriptor,0> >  BaseClass;
- public:
-  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
-   {
-     first.replace_val(repl);
-     second.replace_val(repl);
-   }
-};
-
-class ArrayCollection 
-  : public TypeAnnotCollection< ArrayDefineDescriptor>,
-    public CPPTypeCollection< ArrayDefineDescriptor>
-{
-   typedef TypeAnnotCollection< ArrayDefineDescriptor > BaseClass;
-  virtual bool read_annot_name( const std::string& annotName) const 
-    { return annotName == "array"; }
- public:
-  ArrayCollection() : CPPTypeCollection<ArrayDefineDescriptor>(this) {}
-  void Dump() const 
-    { std::cerr << "arrays: \n"; BaseClass::Dump(); }
-};
-
-class ArrayOptCollection : public TypeAnnotCollection< ArrayOptDescriptor>
-{
-  typedef TypeAnnotCollection< ArrayOptDescriptor > BaseClass;
-  virtual bool read_annot_name( const std::string& annotName) const 
-    { return annotName == "array_optimize"; }
- public:
-  void Dump() const 
-    { std::cerr << "array optimizations: \n"; BaseClass::Dump(); }
-};
-
-class ArrayConstructOpCollection
-: public OperatorAnnotCollection<ArrayConstructDescriptor>
-{
-  virtual bool read_annot_name( const std::string& annotName) const
-    { return annotName == "construct_array"; }
- public:
-  void Dump() const
-    {
-      std::cerr << "construct_array: \n";
-      OperatorAnnotCollection<ArrayConstructDescriptor>::Dump();
-    }
-};
-
-class ArrayModifyOpCollection : public OperatorAnnotCollection<ArrayModifyDescriptor>
-{
-  virtual bool read_annot_name( const std::string& annotName) const
-    { return annotName == "modify_array"; }
- public:
-  void Dump() const
-    { 
-      std::cerr << "modify_array: \n"; 
-      OperatorAnnotCollection<ArrayModifyDescriptor>::Dump(); 
-    }
-};
-//! Array annotations contains semantics for 
-// * types/classes:    array attributes: dimension, length, 
-// * operators/functions: side effects such as mod/read; and alias information
-// It has its own annotation collectors and associated independent annotation collectors
-// * own: array, array optimization , modify_array, construct_array
-// * independent: operator side effect (OperatorSideEffectAnnotation), inline, alias, value 
-// Please refer to the following paper for details
-// Yi, Qing, and Dan Quinlan, Applying Loop Optimizations to Object-oriented Abstractions
-// Through General Classification of Array Semantics\u201d, the 17th International Workshop on
-// Languages and Compilers for Parallel Computing, West Lafayette, Indiana, USA. Sep. 2004.
-class ArrayAnnotation 
-    : public FunctionSideEffectInterface,
-      public FunctionAliasInterface
-{
-  //map <std::string, OperatorDeclaration> decl;
-  ArrayCollection arrays;
-  ArrayOptCollection arrayopt;
-  ArrayModifyOpCollection arrayModify;
-  ArrayConstructOpCollection arrayConstruct;
-  
-  static ArrayAnnotation* inst;// singleton instance
-  //Implementing FunctionAliasInterface::may_alias()
-  virtual bool may_alias(AstInterface& fa, const AstNodePtr& fc, 
-                         const AstNodePtr& result,
-                         CollectObject< std::pair<AstNodePtr, int> >& collectalias);
-  //Implementing FunctionAliasInterface::allow_alias()
-  virtual bool allow_alias(AstInterface& fa, const AstNodePtr& fc, 
-                         CollectObject< std::pair<AstNodePtr, int> >& collectalias);
-  //Implementing  FunctionSideEffectInterface::get_modify()			 
-  virtual bool get_modify(AstInterface& fa, const AstNodePtr& fc,
-                               CollectObject<AstNodePtr>* collect = 0);
-  //Implementing  FunctionSideEffectInterface::get_read()			       
-  virtual bool get_read(AstInterface& fa, const AstNodePtr& fc,
-                               CollectObject<AstNodePtr>* collect = 0);
-  ArrayAnnotation() {}
- public:
-  static ArrayAnnotation* get_inst();
-
-  void register_annot(); 
-  void Dump() const;
-
-  bool known_array( CPPAstInterface& fa, const AstNodePtr& array, ArrayDefineDescriptor* d = 0);
-  bool known_array_type(CPPAstInterface& fa,  const AstNodeType& array, ArrayDefineDescriptor* d = 0);
-  bool has_array_opt( CPPAstInterface& fa, const AstNodePtr array, ArrayOptDescriptor* d = 0);
-
-  bool is_array_mod_op( CPPAstInterface& fa, const AstNodePtr& arrayExp,
-                        AstNodePtr* modArray = 0, ArrayDescriptor* desc = 0, 
-                        bool* reshapeArray = 0, ReplaceParams* repl = 0);
-  bool is_array_construct_op( CPPAstInterface& fa, const AstNodePtr& arrayExp,
-                              CPPAstInterface::AstNodeList* alias = 0,
-                              ArrayDescriptor* desc = 0, ReplaceParams* repl = 0);
-  //! Check if a node 'orig' is a reference to an array element
-  // If true, return the array node 'array', and the list of subscripts 'args'
-  bool is_access_array_elem( CPPAstInterface& fa, const AstNodePtr& orig,
-                          AstNodePtr* array=0, CPPAstInterface::AstNodeList* args=0);
-  bool is_access_array_length( CPPAstInterface& fa, const AstNodePtr& orig,
-                            AstNodePtr* array=0, AstNodePtr* dimast = 0, int* dim =0);
-  bool is_access_array_elem( CPPAstInterface& fa, const SymbolicVal& orig,
-                    AstNodePtr* array=0, SymbolicFunction::Arguments* args=0);
-  bool is_access_array_length( CPPAstInterface& fa, const SymbolicVal& orig, AstNodePtr* array=0, SymbolicVal *dim = 0);
-
-  SymbolicVal create_access_array_elem( const AstNodePtr& array, 
-                           const SymbolicFunction::Arguments& args);
-  SymbolicVal create_access_array_length( const AstNodePtr& array, const SymbolicVal& dim);
-  AstNodePtr create_access_array_elem( CPPAstInterface& fa, 
-                                        const AstNodePtr& array,
-				  const CPPAstInterface::AstNodeList& args);
-  AstNodePtr create_access_array_length( CPPAstInterface& fa, const AstNodePtr& array, 
-					 int dim);
-
-  bool is_reshape_array( CPPAstInterface& fa, const AstNodePtr& orig,
-			AstNodePtr* array=0, CPPAstInterface::AstNodeList* args=0);
-  AstNodePtr create_reshape_array( CPPAstInterface& fa, const AstNodePtr& array,
-				  const CPPAstInterface::AstNodeList& args);
-};
-
-#endif
-

Copied: branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayAnnot.h (from rev 128, trunk/src/midend/loopProcessing/outsideInterface/ArrayAnnot.h)
===================================================================
--- branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayAnnot.h	                        (rev 0)
+++ branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayAnnot.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,292 @@
+#ifndef ARRAY_ANNOT_H
+#define ARRAY_ANNOT_H
+
+#include <AnnotExpr.h>
+#include <AnnotCollect.h>
+#include <OperatorDescriptors.h>
+#include <CPPAnnotation.h>
+#include <ValuePropagate.h>
+#include <list>
+
+//! Descriptor (string format) of array shape: 
+//    maximum number of dimensions: integer constant or symbol 
+//    size(length) of each dimension: a symbolic function of the dimension number
+class ArrayShapeDescriptor {
+  SymbolicValDescriptor dimension;
+  SymbolicFunctionDeclarationGroup length;
+ public:
+  void push_back( const ReadSymbolicFunctionDeclaration& cur);
+  void write(std::ostream& out) const;
+  void Dump() const;
+  bool read( std::istream& in);
+
+  const SymbolicValDescriptor& get_dimension() const { return dimension; }
+  SymbolicValDescriptor& get_dimension() { return dimension; }
+  bool get_dimension( int& val) const ;
+
+  void set_length( const SymbolicFunctionDeclarationGroup v) { length = v; }
+  SymbolicFunctionDeclarationGroup get_length() const { return length; }
+  bool get_length( int dim, SymbolicVal& result) const 
+    {
+       std::vector<SymbolicVal> args;
+       args.push_back( SymbolicConst(dim));
+       return length.get_val(args, result);
+    }
+
+  void replace_var(  const std::string& varname, const SymbolicVal& repl)
+   { 
+     dimension.replace_var( varname, repl);
+     length.replace_var(varname, repl);
+   }
+  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
+   { 
+     dimension.replace_val(repl);
+     length.replace_val(repl);
+   }
+};
+
+class ArrayElemDescriptor 
+{
+  SymbolicFunctionDeclarationGroup elem;
+ public:
+  void push_back( const ReadSymbolicFunctionDeclaration& cur);
+  void Dump() const;
+  void write(std::ostream& out) const;
+  bool read(std::istream& in);
+  void replace_var(  const std::string& varname, const SymbolicVal& repl)
+   { 
+     elem.replace_var( varname, repl);
+   }
+  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
+   { 
+     elem.replace_val(repl);
+   }
+
+  const SymbolicFunctionDeclarationGroup& get_elem()  const { return elem; }
+};
+
+class ArrayDescriptor 
+: public ArrayShapeDescriptor, public ArrayElemDescriptor
+{
+ public:
+  void push_back( const ReadSymbolicFunctionDeclaration& cur);
+  bool read( std::istream& in) ;
+  void write(std::ostream& out) const;
+  void Dump() const;
+  void replace_var(  const std::string& varname, const SymbolicVal& repl)
+   { 
+     ArrayShapeDescriptor::replace_var( varname, repl);
+     ArrayElemDescriptor::replace_var( varname, repl);
+   }
+  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
+   { 
+     ArrayShapeDescriptor :: replace_val(repl);
+     ArrayElemDescriptor :: replace_val(repl);
+   }
+};
+
+class ArrayDefineDescriptor : public ArrayDescriptor
+{
+  SymbolicFunctionDeclarationGroup reshape;
+ public:
+  void push_back( const ReadSymbolicFunctionDeclaration& cur);
+  bool read( std::istream& in) ;
+  void write(std::ostream& out) const;
+  void Dump() const;
+  void replace_var(  const std::string& varname, const SymbolicVal& repl);
+  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl);
+
+  SymbolicFunctionDeclarationGroup get_reshape() const 
+    {
+      return reshape;
+    }
+  
+};
+
+class ArrayOptDescriptor : public ArrayDescriptor
+{
+  typedef ContainerDescriptor <std::list<DefineVariableDescriptor>, 
+                               DefineVariableDescriptor, ';', '{', '}'> DefContainer;
+  DefContainer defs;
+ public:
+  typedef std::list<DefineVariableDescriptor>::iterator InitVarIterator;
+  
+  InitVarIterator init_var_begin() 
+    {
+      return defs.begin();
+    }
+  InitVarIterator init_var_end()
+    {
+      return defs.end();
+    }
+  
+      
+
+  bool read( std::istream& in) ;
+  void write(std::ostream& out) const;
+  void Dump() const;
+  void replace_var(  const std::string& varname, const SymbolicVal& repl);
+  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl);
+};
+
+class ArrayConstructDescriptor 
+: public OPDescriptorTemp
+          < CollectPair< ContainerDescriptor<std::list<SymbolicValDescriptor>,
+                                             SymbolicValDescriptor, ',', '(', ')'>,
+                         ArrayDescriptor, 0 > >
+{
+  typedef OPDescriptorTemp
+          < CollectPair< ContainerDescriptor<std::list<SymbolicValDescriptor>, 
+                                             SymbolicValDescriptor, ',', '(', ')'>,
+                         ArrayDescriptor, 0 > 
+          > BaseClass;
+ public:
+  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
+   {
+     for (std::list<SymbolicValDescriptor>::iterator p = first.begin(); p != first.end(); ++p) { 
+         (*p).replace_val(repl);
+     }
+     second.replace_val(repl);
+   }
+};
+//! Modify Array[symbolic_value]
+class ArrayModifyDescriptor : 
+public OPDescriptorTemp < CollectPair< CloseDescriptor<SymbolicValDescriptor, '(', ')'>, 
+                         ArrayDescriptor,0> > 
+{
+  typedef OPDescriptorTemp
+    < CollectPair< CloseDescriptor<NameDescriptor, '(', ')'>, 
+                         ArrayDescriptor,0> >  BaseClass;
+ public:
+  void replace_val(MapObject<SymbolicVal, SymbolicVal>& repl)
+   {
+     first.replace_val(repl);
+     second.replace_val(repl);
+   }
+};
+
+class ArrayCollection 
+  : public TypeAnnotCollection< ArrayDefineDescriptor>,
+    public CPPTypeCollection< ArrayDefineDescriptor>
+{
+   typedef TypeAnnotCollection< ArrayDefineDescriptor > BaseClass;
+  virtual bool read_annot_name( const std::string& annotName) const 
+    { return annotName == "array"; }
+ public:
+  ArrayCollection() : CPPTypeCollection<ArrayDefineDescriptor>(this) {}
+  void Dump() const 
+    { std::cerr << "arrays: \n"; BaseClass::Dump(); }
+};
+
+class ArrayOptCollection : public TypeAnnotCollection< ArrayOptDescriptor>
+{
+  typedef TypeAnnotCollection< ArrayOptDescriptor > BaseClass;
+  virtual bool read_annot_name( const std::string& annotName) const 
+    { return annotName == "array_optimize"; }
+ public:
+  void Dump() const 
+    { std::cerr << "array optimizations: \n"; BaseClass::Dump(); }
+};
+
+class ArrayConstructOpCollection
+: public OperatorAnnotCollection<ArrayConstructDescriptor>
+{
+  virtual bool read_annot_name( const std::string& annotName) const
+    { return annotName == "construct_array"; }
+ public:
+  void Dump() const
+    {
+      std::cerr << "construct_array: \n";
+      OperatorAnnotCollection<ArrayConstructDescriptor>::Dump();
+    }
+};
+
+class ArrayModifyOpCollection : public OperatorAnnotCollection<ArrayModifyDescriptor>
+{
+  virtual bool read_annot_name( const std::string& annotName) const
+    { return annotName == "modify_array"; }
+ public:
+  void Dump() const
+    { 
+      std::cerr << "modify_array: \n"; 
+      OperatorAnnotCollection<ArrayModifyDescriptor>::Dump(); 
+    }
+};
+//! Array annotations contains semantics for 
+// * types/classes:    array attributes: dimension, length, 
+// * operators/functions: side effects such as mod/read; and alias information
+// It has its own annotation collectors and associated independent annotation collectors
+// * own: array, array optimization , modify_array, construct_array
+// * independent: operator side effect (OperatorSideEffectAnnotation), inline, alias, value 
+// Please refer to the following paper for details
+// Yi, Qing, and Dan Quinlan, Applying Loop Optimizations to Object-oriented Abstractions
+// Through General Classification of Array Semantics\u201d, the 17th International Workshop on
+// Languages and Compilers for Parallel Computing, West Lafayette, Indiana, USA. Sep. 2004.
+class ArrayAnnotation 
+    : public FunctionSideEffectInterface,
+      public FunctionAliasInterface
+{
+  //map <std::string, OperatorDeclaration> decl;
+  ArrayCollection arrays;
+  ArrayOptCollection arrayopt;
+  ArrayModifyOpCollection arrayModify;
+  ArrayConstructOpCollection arrayConstruct;
+  
+  static ArrayAnnotation* inst;// singleton instance
+  //Implementing FunctionAliasInterface::may_alias()
+  virtual bool may_alias(AstInterface& fa, const AstNodePtr& fc, 
+                         const AstNodePtr& result,
+                         CollectObject< std::pair<AstNodePtr, int> >& collectalias);
+  //Implementing FunctionAliasInterface::allow_alias()
+  virtual bool allow_alias(AstInterface& fa, const AstNodePtr& fc, 
+                         CollectObject< std::pair<AstNodePtr, int> >& collectalias);
+  //Implementing  FunctionSideEffectInterface::get_modify()			 
+  virtual bool get_modify(AstInterface& fa, const AstNodePtr& fc,
+                               CollectObject<AstNodePtr>* collect = 0);
+  //Implementing  FunctionSideEffectInterface::get_read()			       
+  virtual bool get_read(AstInterface& fa, const AstNodePtr& fc,
+                               CollectObject<AstNodePtr>* collect = 0);
+  ArrayAnnotation() {}
+ public:
+  static ArrayAnnotation* get_inst();
+
+  void register_annot(); 
+  void Dump() const;
+
+  bool known_array( CPPAstInterface& fa, const AstNodePtr& array, ArrayDefineDescriptor* d = 0);
+  bool known_array_type(CPPAstInterface& fa,  const AstNodeType& array, ArrayDefineDescriptor* d = 0);
+  bool has_array_opt( CPPAstInterface& fa, const AstNodePtr array, ArrayOptDescriptor* d = 0);
+
+  bool is_array_mod_op( CPPAstInterface& fa, const AstNodePtr& arrayExp,
+                        AstNodePtr* modArray = 0, ArrayDescriptor* desc = 0, 
+                        bool* reshapeArray = 0, ReplaceParams* repl = 0);
+  bool is_array_construct_op( CPPAstInterface& fa, const AstNodePtr& arrayExp,
+                              CPPAstInterface::AstNodeList* alias = 0,
+                              ArrayDescriptor* desc = 0, ReplaceParams* repl = 0);
+  //! Check if a node 'orig' is a reference to an array element
+  // If true, return the array node 'array', and the list of subscripts 'args'
+  bool is_access_array_elem( CPPAstInterface& fa, const AstNodePtr& orig,
+                          AstNodePtr* array=0, CPPAstInterface::AstNodeList* args=0);
+  bool is_access_array_length( CPPAstInterface& fa, const AstNodePtr& orig,
+                            AstNodePtr* array=0, AstNodePtr* dimast = 0, int* dim =0);
+  bool is_access_array_elem( CPPAstInterface& fa, const SymbolicVal& orig,
+                    AstNodePtr* array=0, SymbolicFunction::Arguments* args=0);
+  bool is_access_array_length( CPPAstInterface& fa, const SymbolicVal& orig, AstNodePtr* array=0, SymbolicVal *dim = 0);
+
+  SymbolicVal create_access_array_elem( const AstNodePtr& array, 
+                           const SymbolicFunction::Arguments& args);
+  SymbolicVal create_access_array_length( const AstNodePtr& array, const SymbolicVal& dim);
+  AstNodePtr create_access_array_elem( CPPAstInterface& fa, 
+                                        const AstNodePtr& array,
+				  const CPPAstInterface::AstNodeList& args);
+  AstNodePtr create_access_array_length( CPPAstInterface& fa, const AstNodePtr& array, 
+					 int dim);
+
+  bool is_reshape_array( CPPAstInterface& fa, const AstNodePtr& orig,
+			AstNodePtr* array=0, CPPAstInterface::AstNodeList* args=0);
+  AstNodePtr create_reshape_array( CPPAstInterface& fa, const AstNodePtr& array,
+				  const CPPAstInterface::AstNodeList& args);
+};
+
+#endif
+

Deleted: branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayInterface.C
===================================================================
--- trunk/src/midend/loopProcessing/outsideInterface/ArrayInterface.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayInterface.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,484 +0,0 @@
-#include <ArrayInterface.h>
-#include <CPPAstInterface.h>
-
-extern bool DebugAliasAnal();
-//! Collect alias information with the help from annotations and propagate some values
-void ArrayInterface::
-initialize( AstInterface& fa, const AstNodePtr& h)
-{
-   aliasCollect(fa, h);
-   valueCollect.build( fa, h, *this, ArrayAnnotation::get_inst());
-}
-//! call valueCollect
-void ArrayInterface::observe( AstInterface& fa) 
-{
-  fa.AttachObserver( &valueCollect.get_value_map());
-  fa.AttachObserver(this);
-}
-
-void ArrayInterface::
-ObserveCopyAst( AstInterfaceImpl& fa, const AstNodePtr& orig, const AstNodePtr& copy)
-{
-  std::map <AstNodePtr, int>::const_iterator p1 = dimmap.find(orig);
-  if (p1 != dimmap.end())
-    dimmap[copy] = (*p1).second;
-  std::map <AstNodePtr, SymbolicFunctionDeclarationGroup>::const_iterator p2 = lenmap.find(orig);
-  if (p2 != lenmap.end())
-    lenmap[copy] = (*p2).second;
-}
-
-void ArrayInterface :: 
-stop_observe( AstInterface& fa) 
-{
-  fa.DetachObserver( &valueCollect.get_value_map());
-  fa.DetachObserver(this);
-}
-//! Using ArrayAnnotation to tell if two references may be aliased.
-bool ArrayInterface ::
-may_alias(AstInterface& _fa, const AstNodePtr& r1, const AstNodePtr& r2)
-{
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-  AstNodePtr array1, array2;
-  ArrayAnnotation* annot = ArrayAnnotation::get_inst();
-  bool elem1 = annot->is_access_array_elem( fa, r1, &array1) ;
-  bool len1 = annot->is_access_array_length( fa, r1, &array1);
-  bool elem2 = annot->is_access_array_elem( fa, r2, &array2);
-  bool len2 = annot->is_access_array_length( fa, r2, &array2);
-
-  if ( (elem1 && len2) || (len1 && elem2))  {
-     return false;
-  } 
-  else if ( (elem1 && elem2)  || (len1 && len2)) {
-     if (may_alias(fa, array1, array2)) {
-        if (DebugAliasAnal())
-            std::cerr << "has alias between " << AstToString(r1) << " and " << AstToString(r2) << std::endl;
-        return true;
-     }
-  }
-  else if (elem1 || len1) {
-     if (may_alias(fa, array1, r2)) {
-        if (DebugAliasAnal())
-            std::cerr << "has alias between " << AstToString(r1) << " and " << AstToString(r2) << std::endl;
-        return true;
-     }
-  }
-  else if (elem2 || len2) {
-     if (may_alias(fa, r1, array2)) {
-        if (DebugAliasAnal())
-            std::cerr << "has alias between " << AstToString(r1) << " and " << AstToString(r2) << std::endl;
-        return true;
-     }
-  }
-  else {
-     AstInterface::AstNodeList args;
-     if (annot->is_array_construct_op( fa, r1, &args)) {
-        for (AstInterface::AstNodeList::iterator p = args.begin();
-             p != args.end(); ++p) {
-          AstNodePtr cur = *p;
-          if (may_alias( fa, cur, r2)) {
-            if (DebugAliasAnal())
-               std::cerr << "has alias between " << AstToString(r1) << " and " << AstToString(r2) << std::endl;
-             return true;
-          }
-        }
-        return false;    
-     }
-     else if (annot->is_array_construct_op( fa, r2, &args)) {
-        for (AstInterface::AstNodeList::iterator p = args.begin();
-             p != args.end(); ++p) {
-          AstNodePtr cur = *p;
-          if (may_alias( fa, cur, r1)) {
-            if (DebugAliasAnal())
-               std::cerr << "has alias between " << AstToString(r1) << " and " << AstToString(r2) << std::endl;
-             return true;
-          }
-        }
-        return false;
-     }
-     return aliasCollect.may_alias( fa, r1, r2);
-  }
-  return false;
-}
-
-bool ArrayInterface::
-get_array_opt(CPPAstInterface& fa, const AstNodePtr& array, ArrayOptDescriptor& r)
-{
-  std::string name;
-  if (!fa.IsVarRef(array, 0, &name))
-    return false;
-  
-  std::map <std::string, ArrayOptDescriptor>::const_iterator p = optmap.find(name);
-  if (p != optmap.end()) 
-  {
-    r = (*p).second;
-    return true;
-  }
-  ArrayOptDescriptor desc;
-  if (!ArrayAnnotation::get_inst()->has_array_opt( fa, array, &desc))
-    return false;
-  
-  for (ArrayOptDescriptor::InitVarIterator p = desc.init_var_begin();
-       p != desc.init_var_end(); ++p) {
-    DefineVariableDescriptor& cur = *p;
-    ExtendibleParamDescriptor &par = cur.get_var();
-    std::string parname = par.get_param_name();
-    par.get_param() = SymbolicVar( name + parname, AST_NULL);
-    SymbolicVal newpar = new SymbolicVar(name + parname, AST_NULL);
-    desc.replace_var(parname, newpar);
-  }
-  optmap[name] = desc;
-  r = desc;
-  return true;
-}
-  
-void ArrayInterface ::
-set_array_dimension( const AstNodePtr& arrayexp, int dim)
-{
-  std::map <AstNodePtr, int>::const_iterator p = dimmap.find(arrayexp);
-  if (p != dimmap.end()) {
-     int olddim = (*p).second;
-     assert(olddim == dim);
-  }
-  else
-     dimmap[arrayexp] = dim;
-}
-
-bool ArrayInterface :: 
-is_array_exp( CPPAstInterface& fa, const AstNodePtr& array, 
-	      int *dimp, SymbolicFunctionDeclarationGroup *lenp, bool *changep)
-{
-  ArrayDefineDescriptor desc;
-  if (!ArrayAnnotation::get_inst()->known_array( fa, array, &desc))
-    return false;
-  if (lenp != 0) 
-  {
-    std::map <AstNodePtr, SymbolicFunctionDeclarationGroup>::const_iterator p = lenmap.find(array);
-    if (p != lenmap.end()) 
-    {
-      *lenp = (*p).second;
-      lenp = 0;
-    }
-  }
-  int dim=0;
-  if (dimp != 0 || lenp != 0) 
-  {
-    std::map <AstNodePtr, int>::const_iterator p = dimmap.find(array);
-    if (p != dimmap.end()) 
-    {
-      dim = (*p).second;
-      if (dimp != 0) {
-         *dimp = dim;
-         dimp = 0;
-      }
-    }
-  }
-  if (dimp == 0 && lenp == 0) 
-  {
-    assert( changep == 0);
-    return true;
-  }
-    
-  if (changep != 0)
-    *changep = true;
-  HasValueDescriptor valdesc;
-  bool hasval =  valueCollect.known_value( array, &valdesc, changep);
-  if (changep != 0 && !fa.IsVarRef(array))
-    *changep = false; 
-    
-  if (dim == 0) 
-  {
-    SymbolicValDescriptor dimval;
-    if (!hasval || !valdesc.has_value("dimension", &dimval)  
-        || dimval.get_val().GetValType() != VAL_CONST 
-	|| dimval.get_val().GetTypeName() != "int")  {
-      dimval = desc.get_dimension();
-    }
-    if (!dimval.get_val().isConstInt(dim))
-        assert(false);
-    if (dimp != 0)
-      *dimp = dim;
-    dimmap[array] = dim;
-  }
-  if (lenp != 0) 
-  {
-    SymbolicFunctionDeclarationGroup len;
-    char buf[20];
-    for (int i = 0; i < dim; ++i) {
-      sprintf(buf, "length_%d", i);
-      SymbolicValDescriptor parval(i);
-      ExtendibleParamDescriptor par_i(parval);
-      SymbolicValDescriptor tmp;
-      if (hasval && valdesc.has_value( std::string(buf), &tmp)
-	  && !tmp.is_bottom() && !tmp.is_top()) 
-	len.push_back( SymbolicFunctionDeclaration( par_i, tmp));
-    }
-    len.insert(len.end(), lenp->begin(), lenp->end());
-    *lenp = len;
-    lenmap[array] = len;
-  }
-  return true;
-}
-
-bool ArrayInterface::
-is_array_mod_op( CPPAstInterface& fa, const AstNodePtr& arrayExp, AstNodePtr* arrayp, int *dimp, 
-		 SymbolicFunctionDeclarationGroup *len, SymbolicFunctionDeclarationGroup* elem, 
-		 bool *reshape)
-{
-  AstNodePtr array;
-  ArrayDescriptor desc;
-  if (!ArrayAnnotation::get_inst()->is_array_mod_op( fa, arrayExp, &array, &desc, reshape)) 
-    return false;
-  HasValueMapReplace repl( fa, valueCollect.get_value_map(), true);
-  desc.replace_val(repl);
-
-  if (arrayp != 0)
-    *arrayp = array;
-
-  int dim = 0, dim1 = 0;
-  if (elem != 0 && dimp == 0)
-     dimp = &dim;
-  if ( dimp != 0 && desc.get_dimension(*dimp)) {
-      dim1 = *dimp;
-  }
-  if (len != 0)
-    *len = desc.get_length();
-  if (dimp != 0 || len != 0) 
-  {
-    if (!is_array_exp( fa, array, dimp, len, reshape))
-      assert(false);
-    if (dimp != 0 && dim1 != 0 && *dimp > dim1)
-       *dimp = dim1;
-  }
-  else
-    assert( reshape == 0);
-  if (elem != 0) {
-    assert( dimp != 0);
-    *elem = desc.get_elem();
-    elem->replace_var("dimension", *dimp);
-  }
-  return true;
-}
-
-bool ArrayInterface::
-is_array_construct_op( CPPAstInterface& fa, const AstNodePtr& arrayExp, 
-                       AstInterface::AstNodeList* alias,int *dimp, 
- 			      SymbolicFunctionDeclarationGroup *len, SymbolicFunctionDeclarationGroup* elem)
-{
-  ArrayDescriptor desc;
-  if (ArrayAnnotation::get_inst()->is_array_construct_op( fa, arrayExp, alias, &desc) ) {
-    HasValueMapReplace repl( fa, valueCollect.get_value_map(), true);
-    desc.replace_val(repl);
-
-    int dim = 0, dim1 = 0;
-    if (elem != 0 && dimp == 0)
-       dimp = &dim;
-    if ( dimp != 0 && desc.get_dimension(*dimp)) {
-      dim1 = *dimp;
-    }
-
-    if (len != 0)
-      *len = desc.get_length();
-    if (dimp != 0 || len != 0)
-    {
-      if (!is_array_exp( fa, arrayExp, dimp, len))
-	assert(false);
-      if (dimp != 0 && dim1 != 0 && *dimp > dim1)
-        *dimp = dim1;
-    }
-    if (elem != 0)  {
-      assert( dimp != 0);
-      *elem = desc.get_elem();
-      elem->replace_var("dimension", *dimp);
-    }
-    return true;
-  } 
-  return false;
-}
-
-
-AstNodePtr ArrayInterface::
-impl_array_opt_init( CPPAstInterface& fa, const AstNodePtr& array, bool insertInit)
-{
-  ArrayOptDescriptor desc;
-
-  if (!get_array_opt( fa, array, desc))
-    return AST_NULL;  
-
-  int dim;
-  if (!is_array_exp( fa, array, &dim))
-    assert(false);
-  AstNodePtr result = insertInit? AST_NULL : fa.CreateBlock();
-  for (ArrayOptDescriptor::InitVarIterator p = desc.init_var_begin();
-       p != desc.init_var_end(); ++p) {
-    DefineVariableDescriptor& cur = *p;
-    cur.replace_var( "this", SymbolicAstWrap(array));
-    cur.replace_var( "dimension", dim);
-
-    const ExtendibleParamDescriptor& par = cur.get_var();
-    std::string extname = par.get_extend_var();
-    std::string parname = par.get_param_name();
-    int lb = -1, ub = -1;
-    par.get_extension( lb, ub);
-    std::string vartype = cur.get_var_type();
-    for (int i = lb; i <= ub; ++i) {
-      std::string varname = parname;
-      SymbolicValDescriptor initval = cur.get_var_init();
-      if (i >= 0) {
-	varname = SymbolicExtendVar::get_varname( varname, i);
-	initval.replace_var(extname, i); 
-      }
-      AstNodePtr init = initval.get_val().CodeGen(fa);
-      if (insertInit) {
-	std::string varname1 = fa.NewVar( fa.GetType(vartype), varname, false, AST_NULL, init);
-	assert( varname1 == varname);
-      }
-      else {
-	std::string varname1 = fa.NewVar( fa.GetType(vartype), varname);
-	assert( varname1 == varname);
-	AstNodePtr var = fa.CreateVarRef( varname);
-	AstNodePtr assign = fa.CreateAssignment( var, init);
-	fa.BlockAppendStmt(result, assign);
-      }
-    }
-  }
-  return result;
-}
-
-AstNodePtr ArrayInterface::
-impl_reshape_array( CPPAstInterface& fa, 
-		    const AstNodePtr& array,
-		    AstInterface::AstNodeList& ivarAst)
-{
-  ArrayDefineDescriptor desc;
-  if (!ArrayAnnotation::get_inst()->known_array( fa, array, &desc))
-    return AST_NULL;
-
-  SymbolicFunctionDeclarationGroup reshape = desc.get_reshape();
-  reshape.replace_var( "this", SymbolicAstWrap(array));
-  reshape.replace_var( "dimension", ivarAst.size());
-
-  AstNodePtr r;
-  if (!reshape.get_val( fa, ivarAst, r)) {
-     std::cerr << "Error: cannot extract value from reshape spec: \n";
-     reshape.write(std::cerr);
-     std::cerr << std::endl;
-     assert(false);
-  }
-  return r;
-}
-
-
-AstNodePtr ArrayInterface::
-impl_access_array_elem (CPPAstInterface& fa, const AstNodePtr& array,
-			   AstInterface::AstNodeList& ivarAst)
-{
-  SymbolicFunctionDeclarationGroup elem;
-
-  ArrayOptDescriptor desc;
-  if (get_array_opt(fa, array, desc)) 
-  {
-    elem = desc.get_elem();
-  }
-  else 
-  {
-    ArrayDefineDescriptor desc1;
-    if (!ArrayAnnotation::get_inst()->known_array( fa, array, &desc1))
-      assert(false);
-    elem = desc1.get_elem();
-  }
-  elem.replace_var("this", SymbolicAstWrap(array));
-  elem.replace_var( "dimension", ivarAst.size());
-  AstNodePtr r;
-  if (! elem.get_val(fa, ivarAst, r))
-     assert(false);
-  return r;
-}
-
-
-AstNodePtr ArrayInterface::
-impl_access_array_length( CPPAstInterface& fa, const AstNodePtr& array,
-			 int dim, int plus)
-{
-  SymbolicVal rval;
-  ArrayOptDescriptor desc;
-  if (get_array_opt(fa, array, desc)) 
-  {
-    if (!desc.get_length(dim, rval))
-      assert(false);
-    
-  }
-  else 
-  {
-    ArrayDefineDescriptor desc1;
-    if (!ArrayAnnotation::get_inst()->known_array( fa, array, &desc1))
-      return AST_NULL;
-    if (! desc1.get_length(dim, rval))
-      assert(false);
-  }
-  ReplaceVal(rval, SymbolicVar("this",AST_NULL), SymbolicAstWrap(array));
-  if (plus != 0)
-     rval = rval + plus;
-  return rval.CodeGen(fa);
-}
-
-bool ArrayInterface ::
-IsArray( CPPAstInterface& fa, const AstNodePtr& s)
-{ 
-  if ( ArrayAnnotation::get_inst()->known_array( fa, s))
-     return true;
-  return false;
-}
-
-bool ArrayInterface ::
-IsArrayRef( CPPAstInterface& fa, const AstNodePtr& t)
-{
-  if ( ArrayAnnotation::get_inst()->known_array_type(fa, fa.GetExpressionType(t)))
-     return true;
-  return false;
-}
-//! Using ArrayAnnotation to tell if a node is an array element access
-bool ArrayInterface :: 
-IsArrayAccess( AstInterface& _fa, const AstNodePtr& s, AstNodePtr* arrayp,
-                                 AstInterface::AstNodeList* index)
-{  
-   CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-   AstNodePtr array;
-   if ( ArrayAnnotation::get_inst()->is_access_array_elem( fa, s, &array, index)) {
-     if (arrayp != 0)
-        *arrayp = array; 
-     return true;
-   }
-   return false;
-}
-
-AstNodePtr ArrayInterface::
-CreateArrayAccess(AstInterface& _fa, const AstNodePtr& arr, 
-                          AstInterface::AstNodeList& index)
-{
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-  return impl_access_array_elem(  fa, arr, index); 
-}
-
-bool ArrayInterface ::
-GetArrayBound( AstInterface& _fa, const AstNodePtr& array,
-                                 int dim, int &lb, int &ub) 
-{ 
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-  SymbolicFunctionDeclarationGroup len;
-  if (!is_array_exp( fa, array, 0, &len))
-    assert(false);
-
-  std::vector<SymbolicVal> pars;
-  pars.push_back( SymbolicConst(dim));
-
-  SymbolicVal rval;
-  if (!len.get_val( pars, rval)) 
-     return false;
-  if (!rval.isConstInt(ub))
-     return false;
-  //lower bound is fixed to 0 ???   
-  lb = 0;
-  return true;
-}
-
-

Copied: branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayInterface.C (from rev 128, trunk/src/midend/loopProcessing/outsideInterface/ArrayInterface.C)
===================================================================
--- branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayInterface.C	                        (rev 0)
+++ branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayInterface.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,484 @@
+#include <ArrayInterface.h>
+#include <CPPAstInterface.h>
+
+extern bool DebugAliasAnal();
+//! Collect alias information with the help from annotations and propagate some values
+void ArrayInterface::
+initialize( AstInterface& fa, const AstNodePtr& h)
+{
+   aliasCollect(fa, h);
+   valueCollect.build( fa, h, *this, ArrayAnnotation::get_inst());
+}
+//! call valueCollect
+void ArrayInterface::observe( AstInterface& fa) 
+{
+  fa.AttachObserver( &valueCollect.get_value_map());
+  fa.AttachObserver(this);
+}
+
+void ArrayInterface::
+ObserveCopyAst( AstInterfaceImpl& fa, const AstNodePtr& orig, const AstNodePtr& copy)
+{
+  std::map <AstNodePtr, int>::const_iterator p1 = dimmap.find(orig);
+  if (p1 != dimmap.end())
+    dimmap[copy] = (*p1).second;
+  std::map <AstNodePtr, SymbolicFunctionDeclarationGroup>::const_iterator p2 = lenmap.find(orig);
+  if (p2 != lenmap.end())
+    lenmap[copy] = (*p2).second;
+}
+
+void ArrayInterface :: 
+stop_observe( AstInterface& fa) 
+{
+  fa.DetachObserver( &valueCollect.get_value_map());
+  fa.DetachObserver(this);
+}
+//! Using ArrayAnnotation to tell if two references may be aliased.
+bool ArrayInterface ::
+may_alias(AstInterface& _fa, const AstNodePtr& r1, const AstNodePtr& r2)
+{
+  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
+  AstNodePtr array1, array2;
+  ArrayAnnotation* annot = ArrayAnnotation::get_inst();
+  bool elem1 = annot->is_access_array_elem( fa, r1, &array1) ;
+  bool len1 = annot->is_access_array_length( fa, r1, &array1);
+  bool elem2 = annot->is_access_array_elem( fa, r2, &array2);
+  bool len2 = annot->is_access_array_length( fa, r2, &array2);
+
+  if ( (elem1 && len2) || (len1 && elem2))  {
+     return false;
+  } 
+  else if ( (elem1 && elem2)  || (len1 && len2)) {
+     if (may_alias(fa, array1, array2)) {
+        if (DebugAliasAnal())
+            std::cerr << "has alias between " << AstToString(r1) << " and " << AstToString(r2) << std::endl;
+        return true;
+     }
+  }
+  else if (elem1 || len1) {
+     if (may_alias(fa, array1, r2)) {
+        if (DebugAliasAnal())
+            std::cerr << "has alias between " << AstToString(r1) << " and " << AstToString(r2) << std::endl;
+        return true;
+     }
+  }
+  else if (elem2 || len2) {
+     if (may_alias(fa, r1, array2)) {
+        if (DebugAliasAnal())
+            std::cerr << "has alias between " << AstToString(r1) << " and " << AstToString(r2) << std::endl;
+        return true;
+     }
+  }
+  else {
+     AstInterface::AstNodeList args;
+     if (annot->is_array_construct_op( fa, r1, &args)) {
+        for (AstInterface::AstNodeList::iterator p = args.begin();
+             p != args.end(); ++p) {
+          AstNodePtr cur = *p;
+          if (may_alias( fa, cur, r2)) {
+            if (DebugAliasAnal())
+               std::cerr << "has alias between " << AstToString(r1) << " and " << AstToString(r2) << std::endl;
+             return true;
+          }
+        }
+        return false;    
+     }
+     else if (annot->is_array_construct_op( fa, r2, &args)) {
+        for (AstInterface::AstNodeList::iterator p = args.begin();
+             p != args.end(); ++p) {
+          AstNodePtr cur = *p;
+          if (may_alias( fa, cur, r1)) {
+            if (DebugAliasAnal())
+               std::cerr << "has alias between " << AstToString(r1) << " and " << AstToString(r2) << std::endl;
+             return true;
+          }
+        }
+        return false;
+     }
+     return aliasCollect.may_alias( fa, r1, r2);
+  }
+  return false;
+}
+
+bool ArrayInterface::
+get_array_opt(CPPAstInterface& fa, const AstNodePtr& array, ArrayOptDescriptor& r)
+{
+  std::string name;
+  if (!fa.IsVarRef(array, 0, &name))
+    return false;
+  
+  std::map <std::string, ArrayOptDescriptor>::const_iterator p = optmap.find(name);
+  if (p != optmap.end()) 
+  {
+    r = (*p).second;
+    return true;
+  }
+  ArrayOptDescriptor desc;
+  if (!ArrayAnnotation::get_inst()->has_array_opt( fa, array, &desc))
+    return false;
+  
+  for (ArrayOptDescriptor::InitVarIterator p = desc.init_var_begin();
+       p != desc.init_var_end(); ++p) {
+    DefineVariableDescriptor& cur = *p;
+    ExtendibleParamDescriptor &par = cur.get_var();
+    std::string parname = par.get_param_name();
+    par.get_param() = SymbolicVar( name + parname, AST_NULL);
+    SymbolicVal newpar = new SymbolicVar(name + parname, AST_NULL);
+    desc.replace_var(parname, newpar);
+  }
+  optmap[name] = desc;
+  r = desc;
+  return true;
+}
+  
+void ArrayInterface ::
+set_array_dimension( const AstNodePtr& arrayexp, int dim)
+{
+  std::map <AstNodePtr, int>::const_iterator p = dimmap.find(arrayexp);
+  if (p != dimmap.end()) {
+     int olddim = (*p).second;
+     assert(olddim == dim);
+  }
+  else
+     dimmap[arrayexp] = dim;
+}
+
+bool ArrayInterface :: 
+is_array_exp( CPPAstInterface& fa, const AstNodePtr& array, 
+	      int *dimp, SymbolicFunctionDeclarationGroup *lenp, bool *changep)
+{
+  ArrayDefineDescriptor desc;
+  if (!ArrayAnnotation::get_inst()->known_array( fa, array, &desc))
+    return false;
+  if (lenp != 0) 
+  {
+    std::map <AstNodePtr, SymbolicFunctionDeclarationGroup>::const_iterator p = lenmap.find(array);
+    if (p != lenmap.end()) 
+    {
+      *lenp = (*p).second;
+      lenp = 0;
+    }
+  }
+  int dim=0;
+  if (dimp != 0 || lenp != 0) 
+  {
+    std::map <AstNodePtr, int>::const_iterator p = dimmap.find(array);
+    if (p != dimmap.end()) 
+    {
+      dim = (*p).second;
+      if (dimp != 0) {
+         *dimp = dim;
+         dimp = 0;
+      }
+    }
+  }
+  if (dimp == 0 && lenp == 0) 
+  {
+    assert( changep == 0);
+    return true;
+  }
+    
+  if (changep != 0)
+    *changep = true;
+  HasValueDescriptor valdesc;
+  bool hasval =  valueCollect.known_value( array, &valdesc, changep);
+  if (changep != 0 && !fa.IsVarRef(array))
+    *changep = false; 
+    
+  if (dim == 0) 
+  {
+    SymbolicValDescriptor dimval;
+    if (!hasval || !valdesc.has_value("dimension", &dimval)  
+        || dimval.get_val().GetValType() != VAL_CONST 
+	|| dimval.get_val().GetTypeName() != "int")  {
+      dimval = desc.get_dimension();
+    }
+    if (!dimval.get_val().isConstInt(dim))
+        assert(false);
+    if (dimp != 0)
+      *dimp = dim;
+    dimmap[array] = dim;
+  }
+  if (lenp != 0) 
+  {
+    SymbolicFunctionDeclarationGroup len;
+    char buf[20];
+    for (int i = 0; i < dim; ++i) {
+      sprintf(buf, "length_%d", i);
+      SymbolicValDescriptor parval(i);
+      ExtendibleParamDescriptor par_i(parval);
+      SymbolicValDescriptor tmp;
+      if (hasval && valdesc.has_value( std::string(buf), &tmp)
+	  && !tmp.is_bottom() && !tmp.is_top()) 
+	len.push_back( SymbolicFunctionDeclaration( par_i, tmp));
+    }
+    len.insert(len.end(), lenp->begin(), lenp->end());
+    *lenp = len;
+    lenmap[array] = len;
+  }
+  return true;
+}
+
+bool ArrayInterface::
+is_array_mod_op( CPPAstInterface& fa, const AstNodePtr& arrayExp, AstNodePtr* arrayp, int *dimp, 
+		 SymbolicFunctionDeclarationGroup *len, SymbolicFunctionDeclarationGroup* elem, 
+		 bool *reshape)
+{
+  AstNodePtr array;
+  ArrayDescriptor desc;
+  if (!ArrayAnnotation::get_inst()->is_array_mod_op( fa, arrayExp, &array, &desc, reshape)) 
+    return false;
+  HasValueMapReplace repl( fa, valueCollect.get_value_map(), true);
+  desc.replace_val(repl);
+
+  if (arrayp != 0)
+    *arrayp = array;
+
+  int dim = 0, dim1 = 0;
+  if (elem != 0 && dimp == 0)
+     dimp = &dim;
+  if ( dimp != 0 && desc.get_dimension(*dimp)) {
+      dim1 = *dimp;
+  }
+  if (len != 0)
+    *len = desc.get_length();
+  if (dimp != 0 || len != 0) 
+  {
+    if (!is_array_exp( fa, array, dimp, len, reshape))
+      assert(false);
+    if (dimp != 0 && dim1 != 0 && *dimp > dim1)
+       *dimp = dim1;
+  }
+  else
+    assert( reshape == 0);
+  if (elem != 0) {
+    assert( dimp != 0);
+    *elem = desc.get_elem();
+    elem->replace_var("dimension", *dimp);
+  }
+  return true;
+}
+
+bool ArrayInterface::
+is_array_construct_op( CPPAstInterface& fa, const AstNodePtr& arrayExp, 
+                       AstInterface::AstNodeList* alias,int *dimp, 
+ 			      SymbolicFunctionDeclarationGroup *len, SymbolicFunctionDeclarationGroup* elem)
+{
+  ArrayDescriptor desc;
+  if (ArrayAnnotation::get_inst()->is_array_construct_op( fa, arrayExp, alias, &desc) ) {
+    HasValueMapReplace repl( fa, valueCollect.get_value_map(), true);
+    desc.replace_val(repl);
+
+    int dim = 0, dim1 = 0;
+    if (elem != 0 && dimp == 0)
+       dimp = &dim;
+    if ( dimp != 0 && desc.get_dimension(*dimp)) {
+      dim1 = *dimp;
+    }
+
+    if (len != 0)
+      *len = desc.get_length();
+    if (dimp != 0 || len != 0)
+    {
+      if (!is_array_exp( fa, arrayExp, dimp, len))
+	assert(false);
+      if (dimp != 0 && dim1 != 0 && *dimp > dim1)
+        *dimp = dim1;
+    }
+    if (elem != 0)  {
+      assert( dimp != 0);
+      *elem = desc.get_elem();
+      elem->replace_var("dimension", *dimp);
+    }
+    return true;
+  } 
+  return false;
+}
+
+
+AstNodePtr ArrayInterface::
+impl_array_opt_init( CPPAstInterface& fa, const AstNodePtr& array, bool insertInit)
+{
+  ArrayOptDescriptor desc;
+
+  if (!get_array_opt( fa, array, desc))
+    return AST_NULL;  
+
+  int dim;
+  if (!is_array_exp( fa, array, &dim))
+    assert(false);
+  AstNodePtr result = insertInit? AST_NULL : fa.CreateBlock();
+  for (ArrayOptDescriptor::InitVarIterator p = desc.init_var_begin();
+       p != desc.init_var_end(); ++p) {
+    DefineVariableDescriptor& cur = *p;
+    cur.replace_var( "this", SymbolicAstWrap(array));
+    cur.replace_var( "dimension", dim);
+
+    const ExtendibleParamDescriptor& par = cur.get_var();
+    std::string extname = par.get_extend_var();
+    std::string parname = par.get_param_name();
+    int lb = -1, ub = -1;
+    par.get_extension( lb, ub);
+    std::string vartype = cur.get_var_type();
+    for (int i = lb; i <= ub; ++i) {
+      std::string varname = parname;
+      SymbolicValDescriptor initval = cur.get_var_init();
+      if (i >= 0) {
+	varname = SymbolicExtendVar::get_varname( varname, i);
+	initval.replace_var(extname, i); 
+      }
+      AstNodePtr init = initval.get_val().CodeGen(fa);
+      if (insertInit) {
+	std::string varname1 = fa.NewVar( fa.GetType(vartype), varname, false, AST_NULL, init);
+	assert( varname1 == varname);
+      }
+      else {
+	std::string varname1 = fa.NewVar( fa.GetType(vartype), varname);
+	assert( varname1 == varname);
+	AstNodePtr var = fa.CreateVarRef( varname);
+	AstNodePtr assign = fa.CreateAssignment( var, init);
+	fa.BlockAppendStmt(result, assign);
+      }
+    }
+  }
+  return result;
+}
+
+AstNodePtr ArrayInterface::
+impl_reshape_array( CPPAstInterface& fa, 
+		    const AstNodePtr& array,
+		    AstInterface::AstNodeList& ivarAst)
+{
+  ArrayDefineDescriptor desc;
+  if (!ArrayAnnotation::get_inst()->known_array( fa, array, &desc))
+    return AST_NULL;
+
+  SymbolicFunctionDeclarationGroup reshape = desc.get_reshape();
+  reshape.replace_var( "this", SymbolicAstWrap(array));
+  reshape.replace_var( "dimension", ivarAst.size());
+
+  AstNodePtr r;
+  if (!reshape.get_val( fa, ivarAst, r)) {
+     std::cerr << "Error: cannot extract value from reshape spec: \n";
+     reshape.write(std::cerr);
+     std::cerr << std::endl;
+     assert(false);
+  }
+  return r;
+}
+
+
+AstNodePtr ArrayInterface::
+impl_access_array_elem (CPPAstInterface& fa, const AstNodePtr& array,
+			   AstInterface::AstNodeList& ivarAst)
+{
+  SymbolicFunctionDeclarationGroup elem;
+
+  ArrayOptDescriptor desc;
+  if (get_array_opt(fa, array, desc)) 
+  {
+    elem = desc.get_elem();
+  }
+  else 
+  {
+    ArrayDefineDescriptor desc1;
+    if (!ArrayAnnotation::get_inst()->known_array( fa, array, &desc1))
+      assert(false);
+    elem = desc1.get_elem();
+  }
+  elem.replace_var("this", SymbolicAstWrap(array));
+  elem.replace_var( "dimension", ivarAst.size());
+  AstNodePtr r;
+  if (! elem.get_val(fa, ivarAst, r))
+     assert(false);
+  return r;
+}
+
+
+AstNodePtr ArrayInterface::
+impl_access_array_length( CPPAstInterface& fa, const AstNodePtr& array,
+			 int dim, int plus)
+{
+  SymbolicVal rval;
+  ArrayOptDescriptor desc;
+  if (get_array_opt(fa, array, desc)) 
+  {
+    if (!desc.get_length(dim, rval))
+      assert(false);
+    
+  }
+  else 
+  {
+    ArrayDefineDescriptor desc1;
+    if (!ArrayAnnotation::get_inst()->known_array( fa, array, &desc1))
+      return AST_NULL;
+    if (! desc1.get_length(dim, rval))
+      assert(false);
+  }
+  ReplaceVal(rval, SymbolicVar("this",AST_NULL), SymbolicAstWrap(array));
+  if (plus != 0)
+     rval = rval + plus;
+  return rval.CodeGen(fa);
+}
+
+bool ArrayInterface ::
+IsArray( CPPAstInterface& fa, const AstNodePtr& s)
+{ 
+  if ( ArrayAnnotation::get_inst()->known_array( fa, s))
+     return true;
+  return false;
+}
+
+bool ArrayInterface ::
+IsArrayRef( CPPAstInterface& fa, const AstNodePtr& t)
+{
+  if ( ArrayAnnotation::get_inst()->known_array_type(fa, fa.GetExpressionType(t)))
+     return true;
+  return false;
+}
+//! Using ArrayAnnotation to tell if a node is an array element access
+bool ArrayInterface :: 
+IsArrayAccess( AstInterface& _fa, const AstNodePtr& s, AstNodePtr* arrayp,
+                                 AstInterface::AstNodeList* index)
+{  
+   CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
+   AstNodePtr array;
+   if ( ArrayAnnotation::get_inst()->is_access_array_elem( fa, s, &array, index)) {
+     if (arrayp != 0)
+        *arrayp = array; 
+     return true;
+   }
+   return false;
+}
+
+AstNodePtr ArrayInterface::
+CreateArrayAccess(AstInterface& _fa, const AstNodePtr& arr, 
+                          AstInterface::AstNodeList& index)
+{
+  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
+  return impl_access_array_elem(  fa, arr, index); 
+}
+
+bool ArrayInterface ::
+GetArrayBound( AstInterface& _fa, const AstNodePtr& array,
+                                 int dim, int &lb, int &ub) 
+{ 
+  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
+  SymbolicFunctionDeclarationGroup len;
+  if (!is_array_exp( fa, array, 0, &len))
+    assert(false);
+
+  std::vector<SymbolicVal> pars;
+  pars.push_back( SymbolicConst(dim));
+
+  SymbolicVal rval;
+  if (!len.get_val( pars, rval)) 
+     return false;
+  if (!rval.isConstInt(ub))
+     return false;
+  //lower bound is fixed to 0 ???   
+  lb = 0;
+  return true;
+}
+
+

Deleted: branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayInterface.h
===================================================================
--- trunk/src/midend/loopProcessing/outsideInterface/ArrayInterface.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayInterface.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,68 +0,0 @@
-#ifndef ARRAY_INTERFACE_H
-#define ARRAY_INTERFACE_H
-
-#include <ArrayAnnot.h>
-#include <AstInterface.h>
-#include <StmtInfoCollect.h>
-#include <ValuePropagate.h>
-#include <LoopTransformInterface.h>
-
-class ArrayInterface 
-  : public AstObserver, public AliasAnalysisInterface, public ArrayAbstractionInterface
-{
-  StmtVarAliasCollect aliasCollect;
-  ValuePropagate valueCollect;
-  std::map <AstNodePtr, int> dimmap;
-  std::map <AstNodePtr, SymbolicFunctionDeclarationGroup> lenmap;
-  std::map <std::string, ArrayOptDescriptor> optmap;
-  void ObserveCopyAst( AstInterfaceImpl& fa, const AstNodePtr& orig, const AstNodePtr& copy);
-
-  virtual bool IsArrayRef( CPPAstInterface& fa, const AstNodePtr& t);
-  bool IsArray( CPPAstInterface& fa, const AstNodePtr& s) ;
-  // Inherited from ArrayAbstractionInterface
-  virtual bool IsArrayAccess( AstInterface& fa,
-                                 const AstNodePtr& s, AstNodePtr* array = 0,
-                                 AstInterface::AstNodeList* index = 0) ;
-  // Inherited from ArrayAbstractionInterface
-  virtual bool GetArrayBound( AstInterface& fa,
-                                 const AstNodePtr& array,
-                                 int dim, int &lb, int &ub) ;
-  // Inherited from ArrayAbstractionInterface
-  virtual AstNodePtr CreateArrayAccess(AstInterface& fa, 
-                                       const AstNodePtr& arr, 
-                                       AstInterface::AstNodeList& index);
-  bool get_array_opt(CPPAstInterface& fa, const AstNodePtr& array, ArrayOptDescriptor& d);
- public:
-  ArrayInterface( ArrayAnnotation& a) : aliasCollect(&a) {}
-  //! Collect alias variables and propagate values
-  void initialize( AstInterface& fa, const AstNodePtr& h);
-  void observe( AstInterface& fa) ;
-  void stop_observe( AstInterface& fa) ;
-  bool may_alias(AstInterface& fa, const AstNodePtr& r1, const AstNodePtr& r2);
-  //! Check if an expression is an array access expression, return its number of dimensions
-  // and symbolic functions for length of each dimension
-  bool is_array_exp( CPPAstInterface& fa, const AstNodePtr& array, 
-                     int *dimp = 0, SymbolicFunctionDeclarationGroup *len = 0, 
-		     bool *changeshape = 0);
-  //! Set the dimension of an array		     
-  void set_array_dimension( const AstNodePtr& arrayexp, int dim);
-  
-  bool is_array_mod_op( CPPAstInterface& fa, const AstNodePtr& arrayExp, 
-                        AstNodePtr* modArray = 0, int *dimp = 0, 
-			SymbolicFunctionDeclarationGroup *len = 0, SymbolicFunctionDeclarationGroup* elem = 0, 
-			bool *reshape = 0);
-  bool is_array_construct_op( CPPAstInterface& fa, const AstNodePtr& arrayExp, 
-                              AstInterface::AstNodeList* alias = 0,
-			      int *dimp = 0, SymbolicFunctionDeclarationGroup *len = 0, SymbolicFunctionDeclarationGroup* elem = 0);
- 
-  AstNodePtr impl_array_opt_init( CPPAstInterface& fa, const AstNodePtr& array, 
-				  bool insertinit = false);
-  AstNodePtr impl_access_array_length(  CPPAstInterface& fa, const AstNodePtr& array, int dim,
-					int plus = 0);
-  AstNodePtr impl_access_array_elem(  CPPAstInterface& fa, const AstNodePtr& array, 
-				      AstInterface::AstNodeList& args );
-  AstNodePtr impl_reshape_array(  CPPAstInterface& fa, const AstNodePtr& array, 
-				  AstInterface::AstNodeList& args );
-};
-
-#endif

Copied: branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayInterface.h (from rev 128, trunk/src/midend/loopProcessing/outsideInterface/ArrayInterface.h)
===================================================================
--- branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayInterface.h	                        (rev 0)
+++ branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayInterface.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,68 @@
+#ifndef ARRAY_INTERFACE_H
+#define ARRAY_INTERFACE_H
+
+#include <ArrayAnnot.h>
+#include <AstInterface.h>
+#include <StmtInfoCollect.h>
+#include <ValuePropagate.h>
+#include <LoopTransformInterface.h>
+
+class ArrayInterface 
+  : public AstObserver, public AliasAnalysisInterface, public ArrayAbstractionInterface
+{
+  StmtVarAliasCollect aliasCollect;
+  ValuePropagate valueCollect;
+  std::map <AstNodePtr, int> dimmap;
+  std::map <AstNodePtr, SymbolicFunctionDeclarationGroup> lenmap;
+  std::map <std::string, ArrayOptDescriptor> optmap;
+  void ObserveCopyAst( AstInterfaceImpl& fa, const AstNodePtr& orig, const AstNodePtr& copy);
+
+  virtual bool IsArrayRef( CPPAstInterface& fa, const AstNodePtr& t);
+  bool IsArray( CPPAstInterface& fa, const AstNodePtr& s) ;
+  // Inherited from ArrayAbstractionInterface
+  virtual bool IsArrayAccess( AstInterface& fa,
+                                 const AstNodePtr& s, AstNodePtr* array = 0,
+                                 AstInterface::AstNodeList* index = 0) ;
+  // Inherited from ArrayAbstractionInterface
+  virtual bool GetArrayBound( AstInterface& fa,
+                                 const AstNodePtr& array,
+                                 int dim, int &lb, int &ub) ;
+  // Inherited from ArrayAbstractionInterface
+  virtual AstNodePtr CreateArrayAccess(AstInterface& fa, 
+                                       const AstNodePtr& arr, 
+                                       AstInterface::AstNodeList& index);
+  bool get_array_opt(CPPAstInterface& fa, const AstNodePtr& array, ArrayOptDescriptor& d);
+ public:
+  ArrayInterface( ArrayAnnotation& a) : aliasCollect(&a) {}
+  //! Collect alias variables and propagate values
+  void initialize( AstInterface& fa, const AstNodePtr& h);
+  void observe( AstInterface& fa) ;
+  void stop_observe( AstInterface& fa) ;
+  bool may_alias(AstInterface& fa, const AstNodePtr& r1, const AstNodePtr& r2);
+  //! Check if an expression is an array access expression, return its number of dimensions
+  // and symbolic functions for length of each dimension
+  bool is_array_exp( CPPAstInterface& fa, const AstNodePtr& array, 
+                     int *dimp = 0, SymbolicFunctionDeclarationGroup *len = 0, 
+		     bool *changeshape = 0);
+  //! Set the dimension of an array		     
+  void set_array_dimension( const AstNodePtr& arrayexp, int dim);
+  
+  bool is_array_mod_op( CPPAstInterface& fa, const AstNodePtr& arrayExp, 
+                        AstNodePtr* modArray = 0, int *dimp = 0, 
+			SymbolicFunctionDeclarationGroup *len = 0, SymbolicFunctionDeclarationGroup* elem = 0, 
+			bool *reshape = 0);
+  bool is_array_construct_op( CPPAstInterface& fa, const AstNodePtr& arrayExp, 
+                              AstInterface::AstNodeList* alias = 0,
+			      int *dimp = 0, SymbolicFunctionDeclarationGroup *len = 0, SymbolicFunctionDeclarationGroup* elem = 0);
+ 
+  AstNodePtr impl_array_opt_init( CPPAstInterface& fa, const AstNodePtr& array, 
+				  bool insertinit = false);
+  AstNodePtr impl_access_array_length(  CPPAstInterface& fa, const AstNodePtr& array, int dim,
+					int plus = 0);
+  AstNodePtr impl_access_array_elem(  CPPAstInterface& fa, const AstNodePtr& array, 
+				      AstInterface::AstNodeList& args );
+  AstNodePtr impl_reshape_array(  CPPAstInterface& fa, const AstNodePtr& array, 
+				  AstInterface::AstNodeList& args );
+};
+
+#endif

Deleted: branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayRewrite.C
===================================================================
--- trunk/src/midend/loopProcessing/outsideInterface/ArrayRewrite.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayRewrite.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,335 +0,0 @@
-
-#include <ArrayRewrite.h>
-#include <AstInterface.h>
-#include <DepInfoAnal.h>
-#include <DomainInfo.h>
-
-bool RecognizeArrayOp( CPPAstInterface& fa, ArrayInterface& anal,
-                      const AstNodePtr& orig)
-{
-  if (!fa.IsFunctionCall(orig))  {
-      return false;
-  }
-  if (anal.is_array_mod_op( fa, orig)) {
-    std::cerr << "recognized array mod op: " << AstToString(orig) << "\n";
-    return true;
-  }
-  else if ( anal.is_array_construct_op( fa, orig)) {
-    std::cerr << "recognized array construct op: " << AstToString(orig) << "\n";
-    return true;
-  }
-  else  {
-    std::cerr << "not recognize array op: " << AstToString(orig) << "\n";
-  }
-  return false;
-}
-
-class HasDependence : public CollectObject<DepInfo>
-{
-  bool result;
- public:
-  HasDependence() : result(false) {}
-  virtual bool operator()( const DepInfo& info) 
-   { result = true; return true; }
-  bool& get_result() { return result; }
-};
-
-class RewriteModArrayAccess : public CreateTmpArray, public TransformAstTree
-{
-  // rewrite reads of modified array by creating explicit temperaries
-  AstNodePtr stmt, lhs, modarray;
-  size_t size;
-  LoopTransformInterface la;
-  DepInfoAnal depAnal;
-  ArrayInterface& anal;
-public:
-  RewriteModArrayAccess( CPPAstInterface& ai, ArrayInterface& a, 
-                         const AstNodePtr& _stmt, const AstNodePtr& _lhs,
-                         std::map<std::string, AstNodePtr>& _varmap,
-                         std::list<AstNodePtr>& _newstmts)
-    : CreateTmpArray(_varmap, _newstmts),
-      stmt(_stmt), lhs(_lhs),
-      la( ai, a, ArrayAnnotation::get_inst(), &a),
-      depAnal(la), anal(a)
-     { 
-        AstInterface::AstNodeList subs;
-        if (!ArrayAnnotation::get_inst()->is_access_array_elem( ai, lhs, &modarray, &subs))
-           assert(false);
-        size = subs.size();
-      }
-  bool operator() (AstInterface& _fa, const AstNodePtr& orig, AstNodePtr& result)
- {
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-  AstNodePtr array;
-  AstInterface::AstNodeList subs;
-  if (!ArrayAnnotation::get_inst()->is_access_array_elem(fa, orig, &array, &subs) || subs.size() == 0)
-     return false;
-  HasDependence test;
-  if (fa.IsSameVarRef( array, modarray)) {
-     assert(size == subs.size());
-     DomainCond domain(size);
-     DepInfoAnal::StmtRefDep ref = depAnal.GetStmtRefDep(la,stmt,orig, stmt,lhs);
-     depAnal.ComputeArrayDep( la, ref,DEPTYPE_NONE,test, test);
-  }
-  else 
-     test.get_result() = la.IsAliasedRef(array, modarray);
-  if (test.get_result()) {
-      std::string splitname = fa.GetVarName(array) + "_tmp";
-      result = create_tmp_array( fa, array, splitname);
-      AstInterface::AstNodeList subscopy;
-      for (AstInterface::AstNodeList::iterator p = subs.begin(); 
-           p != subs.end(); ++p) {
-         subscopy.push_back( fa.CopyAstTree(*p));
-      }   
-      result = ArrayAnnotation::get_inst()->create_access_array_elem( fa, result, subscopy);
-      return true;
-  }
-  return false;
- }
-};
-
-bool RewriteConstructArrayAccess:: 
-rewritable( const SymbolicVal& orig)
-{
-  AstNodePtr arrayExp;
-  if (ArrayAnnotation::get_inst()->is_access_array_elem( fa, orig, &arrayExp) ||
-      ArrayAnnotation::get_inst()->is_access_array_length( fa, orig, &arrayExp)) {
-      if (ArrayAnnotation::get_inst()->is_array_construct_op( fa, arrayExp) 
-          || fa.IsVarRef(arrayExp))
-          return true;
-  }
-  return false;
-}
-
-AstNodePtr CreateTmpArray::
-create_tmp_array( AstInterface& fa, const AstNodePtr& arrayExp, const std::string name)
-{
-  std::string expname;
-  if (!fa.IsVarRef(arrayExp,0,&expname))
-      assert(false);
-  AstNodePtr& split = varmap[expname];
-  if (split == 0) {
-     AstNodeType t =  fa.GetExpressionType(arrayExp);
-     std::string tname;
-     fa.GetTypeInfo( t, 0, &tname);
-     std::string splitname = fa.NewVar( fa.GetType(tname), name, true );
-     if (model == 0) {
-        split = fa.CreateVarRef(splitname);
-     }
-     else {
-        split = fa.CreateVarRef(splitname);
-     }
-     AstNodePtr splitStmt = fa.CreateAssignment( split, fa.CopyAstTree( arrayExp));
-     newStmts.push_back(splitStmt); 
-     return split;
-  }
-  else {
-     AstNodePtr r = fa.CopyAstTree(split);
-     return r;
-  }
-}
-
-SymbolicVal RewriteConstructArrayAccess :: 
-operator()( const SymbolicVal& orig)
-{
-  SymbolicVal result;
-  SymbolicVal dim;
-  std::vector<SymbolicVal> args;
-  AstNodePtr arrayExp;
-  if (ArrayAnnotation::get_inst()->is_access_array_elem( fa, orig, &arrayExp, &args)) {
-    anal.set_array_dimension( arrayExp, args.size());
-    SymbolicFunctionDeclarationGroup elem;
-    if (anal.is_array_construct_op( fa, arrayExp, 0, 0, 0, &elem)) {
-      if (! elem.get_val( args, result))
-	assert(false);
-      result = ReplaceVal( result, *this);
-    }
-    else if (!fa.IsVarRef(arrayExp)) {
-      AstNodePtr split = create_tmp_array( fa, arrayExp, "array");
-      result = ArrayAnnotation::get_inst()->create_access_array_elem( split, args);
-    }
-  }
-  else if (ArrayAnnotation::get_inst()->is_access_array_length( fa, orig, &arrayExp, &dim)) {
-    SymbolicFunctionDeclarationGroup len;
-    if (anal.is_array_construct_op(fa, arrayExp, 0, 0, &len)) {
-      args.clear();
-      args.push_back(dim);
-      if (! len.get_val( args, result))
-	assert(false);
-      result = ReplaceVal( result, *this);
-    }
-    else if (!fa.IsVarRef(arrayExp)) {
-      AstNodePtr split = create_tmp_array( fa, arrayExp, "array");
-      result = ArrayAnnotation::get_inst()->create_access_array_length( split, dim);
-    }
-  }
-  return result;
-}
-
-bool CollectArrayRef( CPPAstInterface& fa, ArrayInterface& anal, 
-                      const AstNodePtr& array, AstInterface::AstNodeList& col)
-{
-    if (fa.IsVarRef(array)) {
-       col.push_back(array);
-       return true;
-    }
-    AstInterface::AstNodeList cur;
-    if (!anal.is_array_construct_op( fa, array, &cur))
-       return false;
-    for (AstInterface::AstNodeList::iterator p = cur.begin();
-         p != cur.end(); ++p) {
-        if (!CollectArrayRef(fa, anal, *p, col))
-             return false;
-    }
-    return true;
-}
-
-bool RewriteArrayModOp::
-operator () ( AstInterface& _fa, const AstNodePtr& orig, AstNodePtr& result)
-{
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-  if (!fa.IsStatement(orig)) {
-    return false;
-  }
-  
-  AstNodePtr modArray;
-  int dimension = 0;
-  SymbolicFunctionDeclarationGroup len, elem;
-  bool reshape = false;
-  if (!anal.is_array_mod_op( fa, orig, &modArray, &dimension, &len, &elem, &reshape)) 
-    return false;
-
-  SymbolicFunction::Arguments ivarList;
-  for (int i = 0; i < dimension; ++i ) {
-      AstNodeType t= fa.GetType("int");
-      std:: string ivarname = fa.NewVar( t);
-      AstNodePtr ivar = fa.CreateVarRef( ivarname);
-      ivarList.push_back( SymbolicAstWrap(ivar));
-  }
-  SymbolicVal rhs;
-  if (!elem.get_val( ivarList, rhs))
-    assert(false);
-
-  std::map<std::string,AstNodePtr> varmap;
-  std::list<AstNodePtr> newStmts;
-  RewriteConstructArrayAccess constructArrayRewrite(fa, anal, varmap, newStmts);
-  if (!constructArrayRewrite.rewritable( rhs ))
-       return false;
-
-  SymbolicVal lhs = ArrayAnnotation::get_inst()->create_access_array_elem( modArray, ivarList);
-  if (!fa.IsVarRef(modArray)) 
-      lhs = ReplaceVal(lhs, constructArrayRewrite);
-  rhs = ReplaceVal( rhs, constructArrayRewrite);
-
-  AstNodePtr lhsast = lhs.CodeGen(fa);
-  AstNodePtr rhsast = rhs.CodeGen(fa);
-  AstNodePtr stmt = fa.CreateAssignment(lhsast, rhsast), body = stmt;
-  SymbolicFunction::Arguments lenlist;
-  for (int i = 0; i < dimension; ++i ) {
-    SymbolicFunction::Arguments args;
-    args.push_back( SymbolicConst(i));
-    SymbolicVal ubval;
-    if (!len.get_val(args, ubval))
-      assert(false);
-    ubval = ReplaceVal( ubval, constructArrayRewrite);
-    ubval = ubval -1;
-    lenlist.push_back(ubval);
-    AstNodePtr ub = ubval.CodeGen(fa);
-    AstNodePtr lb = fa.CreateConstInt(0), step = fa.CreateConstInt(1);
-    AstNodePtr ivarAst;
-    if (! ivarList[i].isAstWrap(ivarAst))
-        assert(false);
-    body = fa.CreateLoop( ivarAst, lb, ub, step, body, false);
-  }
-
-  RewriteModArrayAccess modArrayRewrite( fa, anal, stmt, lhsast, varmap, newStmts);
-  TransformAstTraverse( fa, rhsast, modArrayRewrite);
-
-  if (!reshape && newStmts.size() == 0) 
-      result = body;
-  else {
-      result = fa.CreateBlock();
-      for (std::list<AstNodePtr>::iterator p = newStmts.begin(); p != newStmts.end();
-           ++p) {
-         AstNodePtr cur = (*p);
-         AstNodePtr ncur = cur;
-         if (operator()(fa, cur, ncur))
-	     fa.BlockAppendStmt( result, ncur);
-         else
-	     fa.BlockAppendStmt( result, cur);
-      }
-      if (reshape) {
-         AstInterface::AstNodeList argList;
-         for (int i = 0; i < dimension; ++i) {
-	   AstNodePtr curlen = lenlist[i].CodeGen(fa);
-	   argList.push_back( curlen);
-         }
-         AstNodePtr reshapeStmt = ArrayAnnotation::get_inst()->create_reshape_array(fa,modArray, argList);
-         fa.BlockAppendStmt(result, reshapeStmt);
-      }
-      fa.BlockAppendStmt(result, body);
-  }
-std::cerr << "modarray rewrite: result = " << AstToString(result) << "\n";
-   return true;
-}
-
-bool RewriteToArrayAst::
-operator() ( AstInterface& fa, const AstNodePtr& orig, AstNodePtr& result)
-{
-  RewriteArrayModOp op1(anal);
-  if (op1(fa, orig, result))
-       return true;
- 
-  return false;  
-}
-
-bool RewriteFromArrayAst::
-operator() ( AstInterface& _fa, const AstNodePtr& orig, AstNodePtr& result)
-{
-  AstNodePtr array;
-  AstNodePtr decl, body;
-  int  dim;
-  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
-  AstInterface::AstNodeList args, vars;
-  if (fa.IsVariableDecl( orig, &vars)) {
-     for (AstInterface::AstNodeList::iterator pv = vars.begin();
-           pv!= vars.end(); ++pv) {
-        AstNodePtr cur = *pv;
-        if (! ArrayAnnotation::get_inst()->known_array( fa, cur))
-           break; 
-        AstNodePtr initdefs = anal.impl_array_opt_init(fa, cur);
-        fa.InsertStmt( orig, initdefs, false, true);
-     }
-   }
-   else  if (fa.IsFunctionDefinition( orig, 0, &vars,0, &body) && body !=0) {
-      for (AstInterface::AstNodeList::iterator pv = vars.begin();
-           pv!=vars.end(); ++pv) {
-        AstNodePtr cur = *pv;
-        if (! ArrayAnnotation::get_inst()->known_array( fa, cur))
-           break; 
-        anal.impl_array_opt_init(fa, cur, true);
-      }
-  }
-  else if (ArrayAnnotation::get_inst()->is_access_array_elem( fa, orig, &array, &args )) {
-     result = anal.impl_access_array_elem( fa, array, args);
-     return true;
-  }
-  else if (ArrayAnnotation::get_inst()->is_reshape_array( fa, orig, &array, &args) ) {
-    assert(fa.IsVarRef(array));
-    AstNodePtr reshape = anal.impl_reshape_array( fa, array, args);
-    reshape = TransformAstTraverse( fa, reshape, *this);
-    result = fa.CreateBlock();
-    fa.BlockAppendStmt( result, reshape);
-    AstNodePtr initdefs = anal.impl_array_opt_init(fa, array);
-    fa.BlockAppendStmt( result, initdefs);
-    return true;
-  }
-  else if (ArrayAnnotation::get_inst()->is_access_array_length( fa, orig, &array, 0, &dim)) {
-    assert(fa.IsVarRef(array));
-    result = anal.impl_access_array_length( fa, array, dim);
-    return true;
-  }
-  return false;
-}
-
-

Copied: branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayRewrite.C (from rev 128, trunk/src/midend/loopProcessing/outsideInterface/ArrayRewrite.C)
===================================================================
--- branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayRewrite.C	                        (rev 0)
+++ branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayRewrite.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,335 @@
+
+#include <ArrayRewrite.h>
+#include <AstInterface.h>
+#include <DepInfoAnal.h>
+#include <DomainInfo.h>
+
+bool RecognizeArrayOp( CPPAstInterface& fa, ArrayInterface& anal,
+                      const AstNodePtr& orig)
+{
+  if (!fa.IsFunctionCall(orig))  {
+      return false;
+  }
+  if (anal.is_array_mod_op( fa, orig)) {
+    std::cerr << "recognized array mod op: " << AstToString(orig) << "\n";
+    return true;
+  }
+  else if ( anal.is_array_construct_op( fa, orig)) {
+    std::cerr << "recognized array construct op: " << AstToString(orig) << "\n";
+    return true;
+  }
+  else  {
+    std::cerr << "not recognize array op: " << AstToString(orig) << "\n";
+  }
+  return false;
+}
+
+class HasDependence : public CollectObject<DepInfo>
+{
+  bool result;
+ public:
+  HasDependence() : result(false) {}
+  virtual bool operator()( const DepInfo& info) 
+   { result = true; return true; }
+  bool& get_result() { return result; }
+};
+
+class RewriteModArrayAccess : public CreateTmpArray, public TransformAstTree
+{
+  // rewrite reads of modified array by creating explicit temperaries
+  AstNodePtr stmt, lhs, modarray;
+  size_t size;
+  LoopTransformInterface la;
+  DepInfoAnal depAnal;
+  ArrayInterface& anal;
+public:
+  RewriteModArrayAccess( CPPAstInterface& ai, ArrayInterface& a, 
+                         const AstNodePtr& _stmt, const AstNodePtr& _lhs,
+                         std::map<std::string, AstNodePtr>& _varmap,
+                         std::list<AstNodePtr>& _newstmts)
+    : CreateTmpArray(_varmap, _newstmts),
+      stmt(_stmt), lhs(_lhs),
+      la( ai, a, ArrayAnnotation::get_inst(), &a),
+      depAnal(la), anal(a)
+     { 
+        AstInterface::AstNodeList subs;
+        if (!ArrayAnnotation::get_inst()->is_access_array_elem( ai, lhs, &modarray, &subs))
+           assert(false);
+        size = subs.size();
+      }
+  bool operator() (AstInterface& _fa, const AstNodePtr& orig, AstNodePtr& result)
+ {
+  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
+  AstNodePtr array;
+  AstInterface::AstNodeList subs;
+  if (!ArrayAnnotation::get_inst()->is_access_array_elem(fa, orig, &array, &subs) || subs.size() == 0)
+     return false;
+  HasDependence test;
+  if (fa.IsSameVarRef( array, modarray)) {
+     assert(size == subs.size());
+     DomainCond domain(size);
+     DepInfoAnal::StmtRefDep ref = depAnal.GetStmtRefDep(la,stmt,orig, stmt,lhs);
+     depAnal.ComputeArrayDep( la, ref,DEPTYPE_NONE,test, test);
+  }
+  else 
+     test.get_result() = la.IsAliasedRef(array, modarray);
+  if (test.get_result()) {
+      std::string splitname = fa.GetVarName(array) + "_tmp";
+      result = create_tmp_array( fa, array, splitname);
+      AstInterface::AstNodeList subscopy;
+      for (AstInterface::AstNodeList::iterator p = subs.begin(); 
+           p != subs.end(); ++p) {
+         subscopy.push_back( fa.CopyAstTree(*p));
+      }   
+      result = ArrayAnnotation::get_inst()->create_access_array_elem( fa, result, subscopy);
+      return true;
+  }
+  return false;
+ }
+};
+
+bool RewriteConstructArrayAccess:: 
+rewritable( const SymbolicVal& orig)
+{
+  AstNodePtr arrayExp;
+  if (ArrayAnnotation::get_inst()->is_access_array_elem( fa, orig, &arrayExp) ||
+      ArrayAnnotation::get_inst()->is_access_array_length( fa, orig, &arrayExp)) {
+      if (ArrayAnnotation::get_inst()->is_array_construct_op( fa, arrayExp) 
+          || fa.IsVarRef(arrayExp))
+          return true;
+  }
+  return false;
+}
+
+AstNodePtr CreateTmpArray::
+create_tmp_array( AstInterface& fa, const AstNodePtr& arrayExp, const std::string name)
+{
+  std::string expname;
+  if (!fa.IsVarRef(arrayExp,0,&expname))
+      assert(false);
+  AstNodePtr& split = varmap[expname];
+  if (split == 0) {
+     AstNodeType t =  fa.GetExpressionType(arrayExp);
+     std::string tname;
+     fa.GetTypeInfo( t, 0, &tname);
+     std::string splitname = fa.NewVar( fa.GetType(tname), name, true );
+     if (model == 0) {
+        split = fa.CreateVarRef(splitname);
+     }
+     else {
+        split = fa.CreateVarRef(splitname);
+     }
+     AstNodePtr splitStmt = fa.CreateAssignment( split, fa.CopyAstTree( arrayExp));
+     newStmts.push_back(splitStmt); 
+     return split;
+  }
+  else {
+     AstNodePtr r = fa.CopyAstTree(split);
+     return r;
+  }
+}
+
+SymbolicVal RewriteConstructArrayAccess :: 
+operator()( const SymbolicVal& orig)
+{
+  SymbolicVal result;
+  SymbolicVal dim;
+  std::vector<SymbolicVal> args;
+  AstNodePtr arrayExp;
+  if (ArrayAnnotation::get_inst()->is_access_array_elem( fa, orig, &arrayExp, &args)) {
+    anal.set_array_dimension( arrayExp, args.size());
+    SymbolicFunctionDeclarationGroup elem;
+    if (anal.is_array_construct_op( fa, arrayExp, 0, 0, 0, &elem)) {
+      if (! elem.get_val( args, result))
+	assert(false);
+      result = ReplaceVal( result, *this);
+    }
+    else if (!fa.IsVarRef(arrayExp)) {
+      AstNodePtr split = create_tmp_array( fa, arrayExp, "array");
+      result = ArrayAnnotation::get_inst()->create_access_array_elem( split, args);
+    }
+  }
+  else if (ArrayAnnotation::get_inst()->is_access_array_length( fa, orig, &arrayExp, &dim)) {
+    SymbolicFunctionDeclarationGroup len;
+    if (anal.is_array_construct_op(fa, arrayExp, 0, 0, &len)) {
+      args.clear();
+      args.push_back(dim);
+      if (! len.get_val( args, result))
+	assert(false);
+      result = ReplaceVal( result, *this);
+    }
+    else if (!fa.IsVarRef(arrayExp)) {
+      AstNodePtr split = create_tmp_array( fa, arrayExp, "array");
+      result = ArrayAnnotation::get_inst()->create_access_array_length( split, dim);
+    }
+  }
+  return result;
+}
+
+bool CollectArrayRef( CPPAstInterface& fa, ArrayInterface& anal, 
+                      const AstNodePtr& array, AstInterface::AstNodeList& col)
+{
+    if (fa.IsVarRef(array)) {
+       col.push_back(array);
+       return true;
+    }
+    AstInterface::AstNodeList cur;
+    if (!anal.is_array_construct_op( fa, array, &cur))
+       return false;
+    for (AstInterface::AstNodeList::iterator p = cur.begin();
+         p != cur.end(); ++p) {
+        if (!CollectArrayRef(fa, anal, *p, col))
+             return false;
+    }
+    return true;
+}
+
+bool RewriteArrayModOp::
+operator () ( AstInterface& _fa, const AstNodePtr& orig, AstNodePtr& result)
+{
+  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
+  if (!fa.IsStatement(orig)) {
+    return false;
+  }
+  
+  AstNodePtr modArray;
+  int dimension = 0;
+  SymbolicFunctionDeclarationGroup len, elem;
+  bool reshape = false;
+  if (!anal.is_array_mod_op( fa, orig, &modArray, &dimension, &len, &elem, &reshape)) 
+    return false;
+
+  SymbolicFunction::Arguments ivarList;
+  for (int i = 0; i < dimension; ++i ) {
+      AstNodeType t= fa.GetType("int");
+      std:: string ivarname = fa.NewVar( t);
+      AstNodePtr ivar = fa.CreateVarRef( ivarname);
+      ivarList.push_back( SymbolicAstWrap(ivar));
+  }
+  SymbolicVal rhs;
+  if (!elem.get_val( ivarList, rhs))
+    assert(false);
+
+  std::map<std::string,AstNodePtr> varmap;
+  std::list<AstNodePtr> newStmts;
+  RewriteConstructArrayAccess constructArrayRewrite(fa, anal, varmap, newStmts);
+  if (!constructArrayRewrite.rewritable( rhs ))
+       return false;
+
+  SymbolicVal lhs = ArrayAnnotation::get_inst()->create_access_array_elem( modArray, ivarList);
+  if (!fa.IsVarRef(modArray)) 
+      lhs = ReplaceVal(lhs, constructArrayRewrite);
+  rhs = ReplaceVal( rhs, constructArrayRewrite);
+
+  AstNodePtr lhsast = lhs.CodeGen(fa);
+  AstNodePtr rhsast = rhs.CodeGen(fa);
+  AstNodePtr stmt = fa.CreateAssignment(lhsast, rhsast), body = stmt;
+  SymbolicFunction::Arguments lenlist;
+  for (int i = 0; i < dimension; ++i ) {
+    SymbolicFunction::Arguments args;
+    args.push_back( SymbolicConst(i));
+    SymbolicVal ubval;
+    if (!len.get_val(args, ubval))
+      assert(false);
+    ubval = ReplaceVal( ubval, constructArrayRewrite);
+    ubval = ubval -1;
+    lenlist.push_back(ubval);
+    AstNodePtr ub = ubval.CodeGen(fa);
+    AstNodePtr lb = fa.CreateConstInt(0), step = fa.CreateConstInt(1);
+    AstNodePtr ivarAst;
+    if (! ivarList[i].isAstWrap(ivarAst))
+        assert(false);
+    body = fa.CreateLoop( ivarAst, lb, ub, step, body, false);
+  }
+
+  RewriteModArrayAccess modArrayRewrite( fa, anal, stmt, lhsast, varmap, newStmts);
+  TransformAstTraverse( fa, rhsast, modArrayRewrite);
+
+  if (!reshape && newStmts.size() == 0) 
+      result = body;
+  else {
+      result = fa.CreateBlock();
+      for (std::list<AstNodePtr>::iterator p = newStmts.begin(); p != newStmts.end();
+           ++p) {
+         AstNodePtr cur = (*p);
+         AstNodePtr ncur = cur;
+         if (operator()(fa, cur, ncur))
+	     fa.BlockAppendStmt( result, ncur);
+         else
+	     fa.BlockAppendStmt( result, cur);
+      }
+      if (reshape) {
+         AstInterface::AstNodeList argList;
+         for (int i = 0; i < dimension; ++i) {
+	   AstNodePtr curlen = lenlist[i].CodeGen(fa);
+	   argList.push_back( curlen);
+         }
+         AstNodePtr reshapeStmt = ArrayAnnotation::get_inst()->create_reshape_array(fa,modArray, argList);
+         fa.BlockAppendStmt(result, reshapeStmt);
+      }
+      fa.BlockAppendStmt(result, body);
+  }
+std::cerr << "modarray rewrite: result = " << AstToString(result) << "\n";
+   return true;
+}
+
+bool RewriteToArrayAst::
+operator() ( AstInterface& fa, const AstNodePtr& orig, AstNodePtr& result)
+{
+  RewriteArrayModOp op1(anal);
+  if (op1(fa, orig, result))
+       return true;
+ 
+  return false;  
+}
+
+bool RewriteFromArrayAst::
+operator() ( AstInterface& _fa, const AstNodePtr& orig, AstNodePtr& result)
+{
+  AstNodePtr array;
+  AstNodePtr decl, body;
+  int  dim;
+  CPPAstInterface& fa = static_cast<CPPAstInterface&>(_fa);
+  AstInterface::AstNodeList args, vars;
+  if (fa.IsVariableDecl( orig, &vars)) {
+     for (AstInterface::AstNodeList::iterator pv = vars.begin();
+           pv!= vars.end(); ++pv) {
+        AstNodePtr cur = *pv;
+        if (! ArrayAnnotation::get_inst()->known_array( fa, cur))
+           break; 
+        AstNodePtr initdefs = anal.impl_array_opt_init(fa, cur);
+        fa.InsertStmt( orig, initdefs, false, true);
+     }
+   }
+   else  if (fa.IsFunctionDefinition( orig, 0, &vars,0, &body) && body !=0) {
+      for (AstInterface::AstNodeList::iterator pv = vars.begin();
+           pv!=vars.end(); ++pv) {
+        AstNodePtr cur = *pv;
+        if (! ArrayAnnotation::get_inst()->known_array( fa, cur))
+           break; 
+        anal.impl_array_opt_init(fa, cur, true);
+      }
+  }
+  else if (ArrayAnnotation::get_inst()->is_access_array_elem( fa, orig, &array, &args )) {
+     result = anal.impl_access_array_elem( fa, array, args);
+     return true;
+  }
+  else if (ArrayAnnotation::get_inst()->is_reshape_array( fa, orig, &array, &args) ) {
+    assert(fa.IsVarRef(array));
+    AstNodePtr reshape = anal.impl_reshape_array( fa, array, args);
+    reshape = TransformAstTraverse( fa, reshape, *this);
+    result = fa.CreateBlock();
+    fa.BlockAppendStmt( result, reshape);
+    AstNodePtr initdefs = anal.impl_array_opt_init(fa, array);
+    fa.BlockAppendStmt( result, initdefs);
+    return true;
+  }
+  else if (ArrayAnnotation::get_inst()->is_access_array_length( fa, orig, &array, 0, &dim)) {
+    assert(fa.IsVarRef(array));
+    result = anal.impl_access_array_length( fa, array, dim);
+    return true;
+  }
+  return false;
+}
+
+

Deleted: branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayRewrite.h
===================================================================
--- trunk/src/midend/loopProcessing/outsideInterface/ArrayRewrite.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayRewrite.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,64 +0,0 @@
-#ifndef ARRAY_REWRITE_H
-#define ARRAY_REWRITE_H
-
-#include <ArrayInterface.h>
-#include <AstInterface.h>
-
-class CreateTmpArray
-{
-  std::map<std::string, AstNodePtr>& varmap;
-  std::list<AstNodePtr>& newStmts;
-  AstNodePtr model;
- public:
-  CreateTmpArray( std::map<std::string, AstNodePtr>& _varmap, std::list<AstNodePtr>& _newstmts) 
-     :  varmap(_varmap), newStmts(_newstmts), model() {} 
-  AstNodePtr create_tmp_array( AstInterface& fa, const AstNodePtr& arrayExp, const std::string name);
-  void set_model_array( const AstNodePtr& mod) { model = mod; }
-};
-
-class RewriteConstructArrayAccess 
-   : public CreateTmpArray, public MapObject<SymbolicVal, SymbolicVal>
-{
-  // rewrite reads of construct_array ops to remove implicit array temporaries 
-  // rewrite reads of unknown array ops by creating explicit temporaries
-  ArrayInterface& anal;
-  CPPAstInterface& fa;
-public:
-  RewriteConstructArrayAccess( CPPAstInterface& _fa, ArrayInterface& a,
-                               std::map<std::string, AstNodePtr>& _varmap,
-                               std::list<AstNodePtr>& _newstmts)
-      : CreateTmpArray(_varmap, _newstmts), anal(a), fa(_fa) {}
-  bool rewritable( const SymbolicVal& head);
-  SymbolicVal operator()( const SymbolicVal& orig);
-};
-
-class RewriteArrayModOp : public TransformAstTree
-{
-  ArrayInterface& anal;
-
- public:
-  RewriteArrayModOp( ArrayInterface &_op) : anal(_op) {}
-  bool operator()(AstInterface& fa, const AstNodePtr& head, AstNodePtr& result);
-};
-
-class RewriteToArrayAst : public TransformAstTree
-{
-  ArrayInterface& anal;
-
- public:
-  RewriteToArrayAst( ArrayInterface &_op) : anal(_op) {}
-  bool operator()(AstInterface& fa, const AstNodePtr& head, AstNodePtr& result);
-};
-
-class RewriteFromArrayAst : public TransformAstTree
-{
-  ArrayInterface& anal;
- public:
-  RewriteFromArrayAst( ArrayInterface &_op) : anal(_op) {}
-  bool operator()(AstInterface& fa, const AstNodePtr& head, AstNodePtr& result);
-};
-
-#endif
-
-
-

Copied: branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayRewrite.h (from rev 128, trunk/src/midend/loopProcessing/outsideInterface/ArrayRewrite.h)
===================================================================
--- branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayRewrite.h	                        (rev 0)
+++ branches/testonly/src/midend/loopProcessing/outsideInterface/ArrayRewrite.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,64 @@
+#ifndef ARRAY_REWRITE_H
+#define ARRAY_REWRITE_H
+
+#include <ArrayInterface.h>
+#include <AstInterface.h>
+
+class CreateTmpArray
+{
+  std::map<std::string, AstNodePtr>& varmap;
+  std::list<AstNodePtr>& newStmts;
+  AstNodePtr model;
+ public:
+  CreateTmpArray( std::map<std::string, AstNodePtr>& _varmap, std::list<AstNodePtr>& _newstmts) 
+     :  varmap(_varmap), newStmts(_newstmts), model() {} 
+  AstNodePtr create_tmp_array( AstInterface& fa, const AstNodePtr& arrayExp, const std::string name);
+  void set_model_array( const AstNodePtr& mod) { model = mod; }
+};
+
+class RewriteConstructArrayAccess 
+   : public CreateTmpArray, public MapObject<SymbolicVal, SymbolicVal>
+{
+  // rewrite reads of construct_array ops to remove implicit array temporaries 
+  // rewrite reads of unknown array ops by creating explicit temporaries
+  ArrayInterface& anal;
+  CPPAstInterface& fa;
+public:
+  RewriteConstructArrayAccess( CPPAstInterface& _fa, ArrayInterface& a,
+                               std::map<std::string, AstNodePtr>& _varmap,
+                               std::list<AstNodePtr>& _newstmts)
+      : CreateTmpArray(_varmap, _newstmts), anal(a), fa(_fa) {}
+  bool rewritable( const SymbolicVal& head);
+  SymbolicVal operator()( const SymbolicVal& orig);
+};
+
+class RewriteArrayModOp : public TransformAstTree
+{
+  ArrayInterface& anal;
+
+ public:
+  RewriteArrayModOp( ArrayInterface &_op) : anal(_op) {}
+  bool operator()(AstInterface& fa, const AstNodePtr& head, AstNodePtr& result);
+};
+
+class RewriteToArrayAst : public TransformAstTree
+{
+  ArrayInterface& anal;
+
+ public:
+  RewriteToArrayAst( ArrayInterface &_op) : anal(_op) {}
+  bool operator()(AstInterface& fa, const AstNodePtr& head, AstNodePtr& result);
+};
+
+class RewriteFromArrayAst : public TransformAstTree
+{
+  ArrayInterface& anal;
+ public:
+  RewriteFromArrayAst( ArrayInterface &_op) : anal(_op) {}
+  bool operator()(AstInterface& fa, const AstNodePtr& head, AstNodePtr& result);
+};
+
+#endif
+
+
+

Deleted: branches/testonly/src/midend/loopProcessing/outsideInterface/Makefile.am
===================================================================
--- trunk/src/midend/loopProcessing/outsideInterface/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/loopProcessing/outsideInterface/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,20 +0,0 @@
-# Liao, 11/14/2008, Moved from project/arrayOptimization
-include $(top_srcdir)/config/Makefile.for.ROSE.includes.and.libs
-
-INCLUDES = $(ROSE_INCLUDES)
-
-noinst_LTLIBRARIES=libarrayOptimization.la
-
-libarrayOptimization_la_SOURCES = \
-  ArrayAnnot.C ArrayInterface.C ArrayRewrite.C 
-
-include_HEADERS = \
-   ArrayAnnot.h ArrayInterface.h ArrayRewrite.h 
-
-clean-local:
-	rm -rf Templates.DB ii_files ti_files core
-
-EXTRA_DIST = 
-   
-
-

Copied: branches/testonly/src/midend/loopProcessing/outsideInterface/Makefile.am (from rev 128, trunk/src/midend/loopProcessing/outsideInterface/Makefile.am)
===================================================================
--- branches/testonly/src/midend/loopProcessing/outsideInterface/Makefile.am	                        (rev 0)
+++ branches/testonly/src/midend/loopProcessing/outsideInterface/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,20 @@
+# Liao, 11/14/2008, Moved from project/arrayOptimization
+include $(top_srcdir)/config/Makefile.for.ROSE.includes.and.libs
+
+INCLUDES = $(ROSE_INCLUDES)
+
+noinst_LTLIBRARIES=libarrayOptimization.la
+
+libarrayOptimization_la_SOURCES = \
+  ArrayAnnot.C ArrayInterface.C ArrayRewrite.C 
+
+include_HEADERS = \
+   ArrayAnnot.h ArrayInterface.h ArrayRewrite.h 
+
+clean-local:
+	rm -rf Templates.DB ii_files ti_files core
+
+EXTRA_DIST = 
+   
+
+

Modified: branches/testonly/src/midend/programAnalysis/CFG/CFG.h
===================================================================
--- branches/testonly/src/midend/programAnalysis/CFG/CFG.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/CFG/CFG.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -6,27 +6,33 @@
 #include <ProcessAstTree.h>
 #include <CommandOptions.h>
 
+// A path in the class hierarchy: 
+// CFGConfig->BuildCFGConfig->CFGImplTemplate->DataFlowAnalysis->ReachingDefinitionAnalysis
 class CFGConfig {
  public:
+  // Edge types for control flow graphs: executed when condition is true, false, or always executed
   typedef enum {COND_TRUE, COND_FALSE, ALWAYS} EdgeType;
   static std::string EdgeType2String( EdgeType e);
 };
 
+//Abstract interface of building a CFG using Node type
 template <class Node>
 class BuildCFGConfig  : public CFGConfig
 {
  public:
   virtual Node* CreateNode() = 0;
   virtual void CreateEdge( Node *n1, Node *n2, EdgeType condval) = 0;
+  //Associating a CFG node to its corresponding AST node
   virtual void AddNodeStmt(Node* n, const AstNodePtr& s) = 0;
   virtual ~BuildCFGConfig() {}
 };
 
 namespace ROSE_Analysis {
-template <class Node>
-void BuildCFG ( AstInterface& fa, const AstNodePtr& head, BuildCFGConfig<Node>& g);
-template <class Node>
-void BuildCFG ( AstInterface& fa, const AstInterface::AstNodeList& head, BuildCFGConfig<Node>& g);
+  template <class Node>
+  void BuildCFG ( AstInterface& fa, const AstNodePtr& head, BuildCFGConfig<Node>& g);
+
+  template <class Node>
+  void BuildCFG ( AstInterface& fa, const AstInterface::AstNodeList& head, BuildCFGConfig<Node>& g);
 };
 
 

Modified: branches/testonly/src/midend/programAnalysis/CFG/CFGImpl.h
===================================================================
--- branches/testonly/src/midend/programAnalysis/CFG/CFGImpl.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/CFG/CFGImpl.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -6,6 +6,7 @@
 #include <sstream>
 #include <list>
 
+// A CFG template for arbitrary node and edge types
 template <class Node, class Edge>
 class CFGImplTemplate 
   : public VirtualGraphCreateTemplate<Node, Edge>, public BuildCFGConfig<Node>
@@ -38,12 +39,12 @@
        { return new GraphNodeSuccessorIterator<CFGImplTemplate<Node,Edge> >
                    (this, n); }
 };
-
+// A CFG node may representing several actual source statements
 class CFGNodeImpl : public MultiGraphElem
 {
  public:
   CFGNodeImpl(MultiGraphCreate *c) : MultiGraphElem(c) {}
-  std:: list<AstNodePtr>& GetStmts() { return stmtList; } 
+  std::list<AstNodePtr>& GetStmts() { return stmtList; } 
   
   void AddNodeStmt( const AstNodePtr& s) { stmtList.push_back(s); }
 
@@ -75,7 +76,7 @@
  private:
   std:: list<AstNodePtr> stmtList;
 };
-
+// A CFG edge stores edge type information: exectuted on true condition, false condition, or always executed
 class CFGEdgeImpl : public MultiGraphElem
 {
  public:

Modified: branches/testonly/src/midend/programAnalysis/dataflowAnalysis/DataFlowAnalysis.C
===================================================================
--- branches/testonly/src/midend/programAnalysis/dataflowAnalysis/DataFlowAnalysis.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/dataflowAnalysis/DataFlowAnalysis.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -6,7 +6,7 @@
   : CFGImplTemplate<Node, CFGEdgeImpl>( new DAGBaseGraphImpl())
 {
 }
-
+// Forward propagation only? Predecessors to successors
 template<class Node, class Data>
 void DataFlowAnalysis<Node, Data>::
 operator()( AstInterface& fa, const AstNodePtr& head)
@@ -23,11 +23,13 @@
       Node* cur = *np;
       Data inOrig = cur->get_entry_data();
       Data in = inOrig;
+      //In[s] = Union of Out[p], where p is a predecessor of s.
       for (NodeIterator pp = GetPredecessors(cur); !pp.ReachEnd(); ++pp) {
 	Node* pred = *pp;
 	Data predout = pred->get_exit_data();
 	in = meet_data(in, predout);
       }
+      //Out[s]=Gen[s] Union (In[s]-Kill[s]), s is current node
       if (in != inOrig) {
 	cur->set_entry_data(in);
 	Data outOrig = cur->get_exit_data();

Modified: branches/testonly/src/midend/programAnalysis/dataflowAnalysis/DataFlowAnalysis.h
===================================================================
--- branches/testonly/src/midend/programAnalysis/dataflowAnalysis/DataFlowAnalysis.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/dataflowAnalysis/DataFlowAnalysis.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -3,6 +3,8 @@
 
 #include "CFGImpl.h"
 
+// Data flow information (in, and out) is associated with a control flow graph's node
+// Class inheritance path: MultiGraphElem-> CFGNodeImpl->DataFlowNode->ReachingDefNode
 template <class Data>
 class DataFlowNode : public CFGNodeImpl
 {
@@ -13,9 +15,12 @@
   virtual Data get_entry_data() const = 0;
   virtual void set_entry_data( const Data& d) = 0;
   virtual Data get_exit_data() const = 0;
+  // equals to set_exist_data(),aftering the CFG node transfers the data-flow information
   virtual void apply_transfer_function() = 0;
 };
 
+//A generic data flow analysis interface for various CFG node types and any data flow information 'Data' 
+// Used by ReachingDefinitionAnalysis
 template<class Node,class Data>
 class DataFlowAnalysis  : public CFGImplTemplate<Node, CFGEdgeImpl>
 {
@@ -25,7 +30,7 @@
  public:
   typedef typename CFGImplTemplate<Node, CFGEdgeImpl>::NodeIterator NodeIterator;
   typedef typename CFGImplTemplate<Node, CFGEdgeImpl>::EdgeIterator EdgeIterator;
-
+  // Creating an empty DAG
   DataFlowAnalysis();
   void operator()( AstInterface& fa, const AstNodePtr& head);
   CFGImplTemplate<Node, CFGEdgeImpl>::GetNodeIterator;

Modified: branches/testonly/src/midend/programAnalysis/dataflowAnalysis/DefUseChain.h
===================================================================
--- branches/testonly/src/midend/programAnalysis/dataflowAnalysis/DefUseChain.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/dataflowAnalysis/DefUseChain.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -3,7 +3,7 @@
 
 #include "ReachingDefinition.h"
 #include "StmtInfoCollect.h"
-
+// A node in def-use chain: indicating if a reference in a statement is a definition or use.
 class DefUseChainNode : public MultiGraphElem
 {
   bool isdef;
@@ -51,6 +51,7 @@
 	      ReachingDefinitionAnalysis& r, 
               AliasAnalysisInterface& alias,
 	      FunctionSideEffectInterface* f = 0);
+  //Build ReachingDefinition internally	      
   void build(AstInterface& fa, AstNodePtr root,  
              AliasAnalysisInterface* alias = 0, 
              FunctionSideEffectInterface* f = 0);

Modified: branches/testonly/src/midend/programAnalysis/dataflowAnalysis/ReachingDefinition.C
===================================================================
--- branches/testonly/src/midend/programAnalysis/dataflowAnalysis/ReachingDefinition.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/dataflowAnalysis/ReachingDefinition.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -15,9 +15,7 @@
   }  
   return r == 1;
 }
-
-
-
+// An object collecing class: appending definition information into 'base'
 class ConstructReachingDefinitionBase
   : public  CollectObject< std::pair<AstNodePtr, AstNodePtr> >
 {
@@ -60,7 +58,8 @@
 { 
 
   for (AstInterface::AstNodeList::iterator p = in->begin();
-       p != in->end(); ++p) {
+       p != in->end(); ++p) 
+  {
      AstNodePtr cur = *p;
      std::string varname;
      AstNodePtr scope;
@@ -69,6 +68,7 @@
   }
   ConstructReachingDefinitionBase collect(fa, *this);
   StmtSideEffectCollect op(a);
+  // Collect modifying information only, saving them into 'collect'
   op(fa, h, &collect);
 }
 

Modified: branches/testonly/src/midend/programAnalysis/dataflowAnalysis/ReachingDefinition.h
===================================================================
--- branches/testonly/src/midend/programAnalysis/dataflowAnalysis/ReachingDefinition.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/dataflowAnalysis/ReachingDefinition.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -8,18 +8,23 @@
 #include "AnalysisInterface.h"
 #include "StmtInfoCollect.h"
 #include "AstInterface.h"
-
+// A bit vector representation for reaching definition information
+// Each definition has a position in the vector: a name variable may have multiple definition positions
 typedef BitVectorRepr ReachingDefinitions;
 
+// A list of <name,data> with indices corresponding offsets in a bit vector
 class ReachingDefinitionBase 
  : private BitVectorReprBase<std::string, std::pair<AstNodePtr, AstNodePtr> >
 {
   Ast2StringMap scopemap;
  public:
   typedef BitVectorReprBase<std::string, std::pair<AstNodePtr, AstNodePtr> >::iterator iterator;
+  // Collecting definition references within 'h', 
+  // after considering additional references from an optional node list 'in'
   void collect_refs ( AstInterface& fa, const AstNodePtr& h,
                       FunctionSideEffectInterface* a=0,
                       AstInterface::AstNodeList* in = 0);
+  // Insert an entry into the list, the entry is <scope_name+name, variable_definition_info>		      
   void add_ref( const std::string& name, const AstNodePtr& scope, const std::pair<AstNodePtr,AstNodePtr>& def);
   void add_unknown_def ( const std::pair<AstNodePtr,AstNodePtr>& def)
       { add_data( "unknown", def); }
@@ -42,6 +47,7 @@
  public:
   ReachingDefinitionGenerator( const ReachingDefinitionBase& b)
     : BitVectorReprGenerator<std::string, std::pair<AstNodePtr,AstNodePtr> >(b), scopemap(b.scopemap) {}
+    
   void add_unknown_def( ReachingDefinitions& gen, 
                         const std::pair<AstNodePtr,AstNodePtr>& def) const
       { add_member( gen, "unknown", def); }
@@ -53,6 +59,8 @@
      { return get_data_set( "unknown" ); }
   ReachingDefinitions get_empty_set() const 
    { return BitVectorReprGenerator<std::string, std::pair<AstNodePtr,AstNodePtr> >::get_empty_set(); }
+
+  // Return a definition bit vector for a specified variable only, zero out all other bits(definition positions).
   ReachingDefinitions get_def_set( const std::string& varname, const AstNodePtr& scope) const;
 
   void collect_member( const ReachingDefinitions& repr,
@@ -64,7 +72,8 @@
          (BitVectorReprGenerator<std::string, std::pair<AstNodePtr,AstNodePtr> >::get_base()); }
 
 };
-
+//A reaching definition node is kind of data flow nodes with
+// bit vectors for definitions
 class ReachingDefNode 
 : public DataFlowNode<ReachingDefinitions>
 {
@@ -74,7 +83,7 @@
                 FunctionSideEffectInterface* a = 0, const ReachingDefinitions* in=0);
  public:
   virtual ReachingDefinitions get_entry_data() const 
-    { return in; }
+    { return in; } 
   virtual void set_entry_data(const ReachingDefinitions& _in)  
     { in = _in; }
   virtual ReachingDefinitions get_exit_data() const 
@@ -120,6 +129,7 @@
     }
   void operator() ( AstInterface& fa, const AstNodePtr& h, 
 		 FunctionSideEffectInterface* anal = 0);
+  //Collecting all definition data represented by a bit vector 'repr', saving the data into 'collect'
   void collect_ast( const ReachingDefinitions& repr, 
 		    CollectObject< std::pair<AstNodePtr, AstNodePtr> >& collect);
 

Modified: branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysis.cpp
===================================================================
--- branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysis.cpp	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysis.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -462,9 +462,10 @@
   // Traverse through each FunctionDefinition and check for DefUse
   Rose_STL_Container<SgNode*> functions = NodeQuery::querySubTree(project, V_SgFunctionDefinition); 
   DefUseAnalysisPF* defuse_perfunc = new DefUseAnalysisPF(DEBUG_MODE, this);
+  bool abortme=false;
   for (Rose_STL_Container<SgNode*>::const_iterator i = functions.begin(); i != functions.end(); ++i) {
     SgFunctionDefinition* proc = isSgFunctionDefinition(*i);
-    FilteredCFGNode <IsDFAFilter> rem_source = defuse_perfunc->run(proc);
+    FilteredCFGNode <IsDFAFilter> rem_source = defuse_perfunc->run(proc,abortme);
     nrOfNodesVisited += defuse_perfunc->getNumberOfNodesVisited();
     //cout << nrOfNodesVisited << " ......... function " << proc->get_declaration()->get_name().str() << endl; 
     if (rem_source.getNode()!=NULL)
@@ -487,9 +488,9 @@
 DefUseAnalysis::start_traversal_of_one_function(SgFunctionDefinition* proc) {
 
   nrOfNodesVisited = 0;
-
+  bool abortme=false;
   DefUseAnalysisPF*  defuse_perfunc = new DefUseAnalysisPF(false, this);
-  FilteredCFGNode <IsDFAFilter> rem_source = defuse_perfunc->run(proc);
+  FilteredCFGNode <IsDFAFilter> rem_source = defuse_perfunc->run(proc,abortme);
   nrOfNodesVisited = defuse_perfunc->getNumberOfNodesVisited();
   //cout << " nodes visited: " << nrOfNodesVisited << " ......... function " << proc->get_declaration()->get_name().str() << endl; 
   

Copied: branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysisAbstract.cpp (from rev 128, trunk/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysisAbstract.cpp)
===================================================================
--- branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysisAbstract.cpp	                        (rev 0)
+++ branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysisAbstract.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,149 @@
+/******************************************                                           
+  * Category: DFA                                                                      
+  * DefUse Analysis Declaration (per Function)                                         
+  * created by tps in Feb 2007                                                         
+  *****************************************/   
+
+#include "DefUseAnalysisAbstract.h"
+
+using namespace std;
+
+
+/**********************************************************
+ *  find element in vector
+ *********************************************************/
+bool DefUseAnalysisAbstract::searchVector(vector <filteredCFGNodeType> done, 
+				    filteredCFGNodeType cfgNode) {
+  bool found = false;
+  for (vector<filteredCFGNodeType >::const_iterator i = done.begin(); i != done.end(); ++i) {
+    filteredCFGNodeType node = *i;
+    if (node==cfgNode)
+      found=true;
+  }
+  return found;
+}
+
+
+
+
+/**********************************************************
+ *  Search for the value and key in the multimap
+ *********************************************************/
+bool DefUseAnalysisAbstract::isDoubleExactEntry(const multitype* multi, 
+					  SgInitializedName* name, SgNode* sgNode) {
+  bool isCurrentValueContained=false;
+  multitype::const_iterator i = multi->begin();    
+  //SgNode* sgNodeMM = NULL;
+  for (; i != multi->end(); ++i) {
+    SgInitializedName* initNameMM = (*i).first;
+    SgNode* sgnodeMM = (*i).second;
+    if (initNameMM==name && sgnodeMM==sgNode)
+      isCurrentValueContained=true;
+    // cout << " comparing -  map: " << initNameMM << " vs. search: " << initName <<
+    //  "   result euqal? " << resBool(isCurrentValueContained) << endl;
+  } 
+  return isCurrentValueContained;
+}
+
+/**********************************************************
+ *  Search for the value for a certain key in the multimap
+ *********************************************************/
+bool DefUseAnalysisAbstract::searchMulti(const multitype* multi, SgInitializedName* initName) {
+  bool isCurrentValueContained=false;
+  multitype::const_iterator i = multi->begin();    
+  //SgNode* sgNodeMM = NULL;
+  for (; i != multi->end(); ++i) {
+    SgInitializedName* initNameMM = (*i).first;
+    if (initNameMM==initName)
+      isCurrentValueContained=true;
+    // cout << " comparing -  map: " << initNameMM << " vs. search: " << initName <<
+    //  "   result euqal? " << resBool(isCurrentValueContained) << endl;
+  } 
+  return isCurrentValueContained;
+}
+
+
+/**********************************************************
+ *  check if two multimaps are equal
+ *********************************************************/
+bool DefUseAnalysisAbstract::checkElementsForEquality(const multitype* t1, const multitype* t2) {
+  // if every element of t2 is contained in t1, then no change
+  // occured in the map
+  
+  typedef set<pair<SgInitializedName*, SgNode*> > st;
+  st s1(t1->begin(), t1->end());
+  st s2(t2->begin(), t2->end());
+  assert (s1.size() == t1->size());
+
+  //  if (s2.size() != t2->size())
+  //    printMultiMap(t2);
+  assert (s2.size() == t2->size());
+  return s1 != s2;
+  /*
+
+
+  if (t1->size()!=t2->size())
+    return true;
+  bool changed=false;
+  for (multitype::const_iterator it = t1->begin(); it != t1->end(); ++it) {
+    SgInitializedName* init1 = (*it).first;
+    SgNode* node1 = (*it).second;
+    bool identical=false;
+    for (multitype::const_iterator it2 = t2->begin(); it2 != t2->end(); ++it2) {
+      SgInitializedName* init2 = (*it2).first;
+      SgNode* node2 = (*it2).second;
+      if (init1==init2 && node1==node2)
+	identical=true;
+    }
+    if (identical==false)
+      changed = true;
+  }  
+  return changed;
+  */
+}
+
+
+
+/**********************************************************
+ * return the initializedName
+ * we need this if we have a VarRefExp on the left hand
+ * side of an assignment. We want to know which variable it is.
+ * The variable may be hiding down the hirarchy in e.g. an array
+ *********************************************************/
+SgInitializedName* DefUseAnalysisAbstract::getInitName(SgNode* l_expr) {
+  SgInitializedName* retName = NULL;
+  if (isSgPntrArrRefExp(l_expr)) {
+    SgPntrArrRefExp* varArrRefExp = isSgPntrArrRefExp(l_expr);
+    if (DEBUG_MODE)
+      cout << " **********  BINARY OP : " << l_expr->class_name() << endl;
+    ROSE_ASSERT(varArrRefExp);
+    SgExpression* l_expr = varArrRefExp->get_lhs_operand();
+    ROSE_ASSERT(l_expr);
+    if (isSgVarRefExp(l_expr)) {
+      retName = isSgVarRefExp(l_expr)->get_symbol()->get_declaration();
+    } 
+  } else if (isSgPointerDerefExp(l_expr)) {
+    SgPointerDerefExp* ptr = isSgPointerDerefExp(l_expr);
+    if (DEBUG_MODE)
+      cout << " **********  BINARY OP : " << l_expr->class_name() << endl;
+    ROSE_ASSERT(ptr);
+    SgExpression* l_expr = ptr->get_operand();
+    ROSE_ASSERT(l_expr);
+    if (isSgVarRefExp(l_expr)) {
+      retName = isSgVarRefExp(l_expr)->get_symbol()->get_declaration();
+    } 
+  } else {
+    cout << " GETINITNAME:: could not resolve initName " << l_expr->class_name() << endl;
+  }
+  return retName;
+}
+
+/**********************************************************
+ * Resolve a CAST
+ *********************************************************/
+SgExpression* DefUseAnalysisAbstract::resolveCast(SgExpression* expr) {
+  SgCastExp* cast = isSgCastExp(expr);
+  SgExpression* retExpr = cast->get_operand();
+  ROSE_ASSERT(retExpr);
+  return retExpr;
+}

Copied: branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysisAbstract.h (from rev 128, trunk/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysisAbstract.h)
===================================================================
--- branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysisAbstract.h	                        (rev 0)
+++ branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysisAbstract.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,121 @@
+/******************************************
+ * Category: DFA
+ * DefUse Analysis Declaration (per Function)
+ * created by tps in Feb 2007
+ *****************************************/
+
+#ifndef __DefUseAnalysisAbstractPF_HXX_LOADED__
+#define __DefUseAnalysisAbstractPF_HXX_LOADED__
+#include <string>
+
+#include "rose.h"
+#include "support.h"
+#include <virtualCFG.h>
+#include <cfgToDot.h>
+#include <list>
+#include "filteredCFG.h"
+#include "DFAFilter.h"
+#include "DefUseAnalysis.h"
+#include "dfaToDot.h"
+
+class DefUseAnalysisAbstract : public Support {
+ protected:
+  // debugging -------------------------
+  bool DEBUG_MODE;
+  bool DEBUG_MODE_EXTRA;
+
+  // reference to DFA ------------------
+  DefUseAnalysis* dfa;
+
+
+  //  typedef std::multimap < SgInitializedName* , SgNode* > multitype;
+  typedef std::vector < std::pair < SgInitializedName* , SgNode* > > multitype;
+  typedef std::map< SgNode* , multitype > tabletype;
+  typedef FilteredCFGEdge < IsDFAFilter > filteredCFGEdgeType;
+  typedef FilteredCFGNode < IsDFAFilter > filteredCFGNodeType;
+
+  std::set <SgNode*> doNotVisitMap;
+  std::map <SgNode*, bool> nodeChangedMap;
+
+
+
+  // searching -------------------------
+  bool searchMulti(const multitype* multi, SgInitializedName* initName);
+  //  bool searchMulti(const multitype* multi, SgInitializedName* initName, SgNode* node);
+  bool searchVector(std::vector <filteredCFGNodeType> done, 
+		    filteredCFGNodeType cfgNode);
+  SgInitializedName* getInitName(SgNode* l_expr);  
+
+  SgExpression* resolveCast(SgExpression* expr);
+  bool isDoubleExactEntry(const multitype* multi, 
+			  SgInitializedName* name, SgNode* sgNode);
+
+  bool checkElementsForEquality(const multitype* t1, const multitype* t2);
+
+
+  /**********************************************************
+   *  For a CFG Node, follow the two incoming edges and get 
+   *  the other node (than theNodeBefore)
+   *********************************************************/
+  template <typename T>
+    SgNode* getOtherInNode(T cfgNode, SgNode* oneNode){
+    SgNode* otherNode = NULL;  
+    std::vector<filteredCFGEdgeType > in_edges = cfgNode.inEdges();
+    for (std::vector<filteredCFGEdgeType >::const_iterator i = in_edges.begin(); i != in_edges.end(); ++i) {
+      filteredCFGEdgeType filterEdge = *i;
+      T filterNode = filterEdge.source();
+      if (filterNode.getNode()!=oneNode)
+	otherNode = filterNode.getNode();
+    }  
+    if (DEBUG_MODE_EXTRA)
+      std::cout << "getOtherInNode:: other: " << otherNode << "  previous: " << 
+	oneNode << "  size of in: " << in_edges.size() << std::endl;
+    return otherNode;
+  }
+
+  /**********************************************************
+   *  get the incoming node of a cfg edge
+   *********************************************************/
+  template <typename T>
+    SgNode* getCFGPredNode(T cfgNode){
+    SgNode* node = NULL;
+    std::vector<filteredCFGEdgeType > in_edges = cfgNode.inEdges();
+    for (std::vector<filteredCFGEdgeType >::const_iterator i = in_edges.begin(); i != in_edges.end(); ++i) {
+      filteredCFGEdgeType filterEdge = *i;
+      node = filterEdge.source().getNode();
+    }  
+    return node;
+  }
+
+  /**********************************************************
+   *  print the values of a vector
+   *********************************************************/
+  template <typename T >
+    void printCFGVector(std::vector< T > worklist) {
+    int pos = 0;
+    std::cout << "\n!! Worklist : " ;
+    for (typename std::vector<T >::iterator i = worklist.begin(); i != worklist.end(); ++i, pos++) {  
+      T node = *i;
+      std::cout << " - " << node.toStringForDebugging();
+    }
+    std::cout << std::endl;
+  }
+
+  /*
+    template <typename T> void printCFGVector(std::vector<T > worklist);
+    template <typename T> SgNode* getCFGPredNode(T cfgNode);
+    template <typename T> SgNode* getOtherInNode(T source, SgNode* oneNode);
+  */
+  
+ public:
+  DefUseAnalysisAbstract(){
+    doNotVisitMap.clear();
+    nodeChangedMap.clear();
+  };
+  virtual ~DefUseAnalysisAbstract(){};
+  virtual FilteredCFGNode < IsDFAFilter > run(SgFunctionDefinition* function, bool& abortme)=0;
+
+};
+
+#endif
+

Modified: branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysis_perFunction.cpp
===================================================================
--- branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysis_perFunction.cpp	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysis_perFunction.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -9,191 +9,10 @@
 using namespace std;
 
 
-/**********************************************************
- *  find element in vector
- *********************************************************/
-bool DefUseAnalysisPF::searchVector(vector <filteredCFGNodeType> done, 
-				    filteredCFGNodeType cfgNode) {
-  bool found = false;
-  for (vector<filteredCFGNodeType >::const_iterator i = done.begin(); i != done.end(); ++i) {
-    filteredCFGNodeType node = *i;
-    if (node==cfgNode)
-      found=true;
-  }
-  return found;
-}
 
 
-/**********************************************************
- *  For a CFG Node, follow the two incoming edges and get 
- *  the other node (than theNodeBefore)
- *********************************************************/
-template <typename T>
-SgNode* DefUseAnalysisPF::getOtherInNode(T cfgNode, SgNode* oneNode){
-  SgNode* otherNode = NULL;  
-  vector<filteredCFGEdgeType > in_edges = cfgNode.inEdges();
-  for (vector<filteredCFGEdgeType >::const_iterator i = in_edges.begin(); i != in_edges.end(); ++i) {
-    filteredCFGEdgeType filterEdge = *i;
-    T filterNode = filterEdge.source();
-    if (filterNode.getNode()!=oneNode)
-      otherNode = filterNode.getNode();
-  }  
-  if (DEBUG_MODE_EXTRA)
-    cout << "getOtherInNode:: other: " << otherNode << "  previous: " << 
-      oneNode << "  size of in: " << in_edges.size() << endl;
-  return otherNode;
-}
 
 /**********************************************************
- *  get the incoming node of a cfg edge
- *********************************************************/
-template <typename T>
-SgNode* DefUseAnalysisPF::getCFGPredNode(T cfgNode){
-  SgNode* node = NULL;
-  vector<filteredCFGEdgeType > in_edges = cfgNode.inEdges();
-  for (vector<filteredCFGEdgeType >::const_iterator i = in_edges.begin(); i != in_edges.end(); ++i) {
-    filteredCFGEdgeType filterEdge = *i;
-    node = filterEdge.source().getNode();
-  }  
-  return node;
-}
-
-/**********************************************************
- *  Search for the value and key in the multimap
- *********************************************************/
-bool DefUseAnalysisPF::isDoubleExactEntry(const multitype* multi, 
-					  SgInitializedName* name, SgNode* sgNode) {
-  bool isCurrentValueContained=false;
-  multitype::const_iterator i = multi->begin();    
-  //SgNode* sgNodeMM = NULL;
-  for (; i != multi->end(); ++i) {
-    SgInitializedName* initNameMM = (*i).first;
-    SgNode* sgnodeMM = (*i).second;
-    if (initNameMM==name && sgnodeMM==sgNode)
-      isCurrentValueContained=true;
-    // cout << " comparing -  map: " << initNameMM << " vs. search: " << initName <<
-    //  "   result euqal? " << resBool(isCurrentValueContained) << endl;
-  } 
-  return isCurrentValueContained;
-}
-
-/**********************************************************
- *  Search for the value for a certain key in the multimap
- *********************************************************/
-bool DefUseAnalysisPF::searchMulti(const multitype* multi, SgInitializedName* initName) {
-  bool isCurrentValueContained=false;
-  multitype::const_iterator i = multi->begin();    
-  //SgNode* sgNodeMM = NULL;
-  for (; i != multi->end(); ++i) {
-    SgInitializedName* initNameMM = (*i).first;
-    if (initNameMM==initName)
-      isCurrentValueContained=true;
-    // cout << " comparing -  map: " << initNameMM << " vs. search: " << initName <<
-    //  "   result euqal? " << resBool(isCurrentValueContained) << endl;
-  } 
-  return isCurrentValueContained;
-}
-
-
-/**********************************************************
- *  check if two multimaps are equal
- *********************************************************/
-bool DefUseAnalysisPF::checkElementsForEquality(const multitype* t1, const multitype* t2) {
-  // if every element of t2 is contained in t1, then no change
-  // occured in the map
-  
-  typedef set<pair<SgInitializedName*, SgNode*> > st;
-  st s1(t1->begin(), t1->end());
-  st s2(t2->begin(), t2->end());
-  assert (s1.size() == t1->size());
-
-  //  if (s2.size() != t2->size())
-  //    printMultiMap(t2);
-  assert (s2.size() == t2->size());
-  return s1 != s2;
-  /*
-
-
-  if (t1->size()!=t2->size())
-    return true;
-  bool changed=false;
-  for (multitype::const_iterator it = t1->begin(); it != t1->end(); ++it) {
-    SgInitializedName* init1 = (*it).first;
-    SgNode* node1 = (*it).second;
-    bool identical=false;
-    for (multitype::const_iterator it2 = t2->begin(); it2 != t2->end(); ++it2) {
-      SgInitializedName* init2 = (*it2).first;
-      SgNode* node2 = (*it2).second;
-      if (init1==init2 && node1==node2)
-	identical=true;
-    }
-    if (identical==false)
-      changed = true;
-  }  
-  return changed;
-  */
-}
-
-
-/**********************************************************
- *  print the values of a vector
- *********************************************************/
-template <typename T >
-void DefUseAnalysisPF::printCFGVector(vector< T > worklist) {
-  int pos = 0;
-  cout << "\n!! Worklist : " ;
-  for (typename vector<T >::iterator i = worklist.begin(); i != worklist.end(); ++i, pos++) {  
-    T node = *i;
-    cout << " - " << node.toStringForDebugging();
-  }
-  cout << endl;
-}
-
-/**********************************************************
- * return the initializedName
- * we need this if we have a VarRefExp on the left hand
- * side of an assignment. We want to know which variable it is.
- * The variable may be hiding down the hirarchy in e.g. an array
- *********************************************************/
-SgInitializedName* DefUseAnalysisPF::getInitName(SgNode* l_expr) {
-  SgInitializedName* retName = NULL;
-  if (isSgPntrArrRefExp(l_expr)) {
-    SgPntrArrRefExp* varArrRefExp = isSgPntrArrRefExp(l_expr);
-    if (DEBUG_MODE)
-      cout << " **********  BINARY OP : " << l_expr->class_name() << endl;
-    ROSE_ASSERT(varArrRefExp);
-    SgExpression* l_expr = varArrRefExp->get_lhs_operand();
-    ROSE_ASSERT(l_expr);
-    if (isSgVarRefExp(l_expr)) {
-      retName = isSgVarRefExp(l_expr)->get_symbol()->get_declaration();
-    } 
-  } else if (isSgPointerDerefExp(l_expr)) {
-    SgPointerDerefExp* ptr = isSgPointerDerefExp(l_expr);
-    if (DEBUG_MODE)
-      cout << " **********  BINARY OP : " << l_expr->class_name() << endl;
-    ROSE_ASSERT(ptr);
-    SgExpression* l_expr = ptr->get_operand();
-    ROSE_ASSERT(l_expr);
-    if (isSgVarRefExp(l_expr)) {
-      retName = isSgVarRefExp(l_expr)->get_symbol()->get_declaration();
-    } 
-  } else {
-    cout << " GETINITNAME:: could not resolve initName " << l_expr->class_name() << endl;
-  }
-  return retName;
-}
-
-/**********************************************************
- * Resolve a CAST
- *********************************************************/
-SgExpression* DefUseAnalysisPF::resolveCast(SgExpression* expr) {
-  SgCastExp* cast = isSgCastExp(expr);
-  SgExpression* retExpr = cast->get_operand();
-  ROSE_ASSERT(retExpr);
-  return retExpr;
-}
-
-/**********************************************************
  * Make sure all nodes (even arguments if &argument) are in table
  * so they can be found for analysis
  *********************************************************/
@@ -936,7 +755,8 @@
 /**********************************************************
  *  Build CFG for each function and do DefUse analysis
  *********************************************************/
-FilteredCFGNode < IsDFAFilter > DefUseAnalysisPF::run(SgFunctionDefinition* funcDecl) {
+FilteredCFGNode < IsDFAFilter > 
+DefUseAnalysisPF::run(SgFunctionDefinition* funcDecl, bool& abortme) {
   // filter functions -- to only functions in analyzed file  
   nrOfNodesVisitedPF= 0;
   breakPointForWhileNode=NULL;
@@ -951,7 +771,7 @@
   DEBUG_MODE_EXTRA=false;
 
   if (funcName=="") {
-    FilteredCFGNode < IsDFAFilter > empty;
+    FilteredCFGNode < IsDFAFilter > empty(CFGNode(NULL, 0));
     return empty;
   }
   ROSE_ASSERT(funcDecl);

Modified: branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysis_perFunction.h
===================================================================
--- branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysis_perFunction.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/defUseAnalysis/DefUseAnalysis_perFunction.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -8,40 +8,12 @@
 #define __DefUseAnalysisPF_HXX_LOADED__
 #include <string>
 
-#include "rose.h"
-#include "support.h"
-#include <virtualCFG.h>
-#include <cfgToDot.h>
-#include <list>
-#include "filteredCFG.h"
-#include "DFAFilter.h"
-#include "DefUseAnalysis.h"
-#include "dfaToDot.h"
+#include "DefUseAnalysisAbstract.h"
 
-class DefUseAnalysisPF : public Support {
+class DefUseAnalysisPF : public DefUseAnalysisAbstract {
  private:
-  // debugging -------------------------
-  bool DEBUG_MODE;
-  bool DEBUG_MODE_EXTRA;
 
-  // reference to DFA ------------------
-  DefUseAnalysis* dfa;
 
-  //  typedef std::multimap < SgInitializedName* , SgNode* > multitype;
-  typedef std::vector < std::pair < SgInitializedName* , SgNode* > > multitype;
-  typedef std::map< SgNode* , multitype > tabletype;
-  typedef FilteredCFGEdge < IsDFAFilter > filteredCFGEdgeType;
-  typedef FilteredCFGNode < IsDFAFilter > filteredCFGNodeType;
-
-  std::set <SgNode*> doNotVisitMap;
-  std::map <SgNode*, bool> nodeChangedMap;
-
-  // printing --------------------------
-  template <typename T> void printCFGVector(std::vector<T > worklist);
-
-  bool isDoubleExactEntry(const multitype* multi, 
-			  SgInitializedName* name, SgNode* sgNode);
-  SgExpression* resolveCast(SgExpression* expr);
   bool makeSureThatTheUseIsInTable(SgInitializedName* initName);
   bool makeSureThatTheDefIsInTable(SgInitializedName* initName);
 
@@ -54,37 +26,30 @@
 			       SgNode* sgNodeBefore, bool dont_replace,
 			       T cfgNode);
 
-  // searching -------------------------
-  bool searchMulti(const multitype* multi, SgInitializedName* initName);
-  //  bool searchMulti(const multitype* multi, SgInitializedName* initName, SgNode* node);
-  bool searchVector(std::vector <filteredCFGNodeType> done, 
-		    filteredCFGNodeType cfgNode);
-  SgInitializedName* getInitName(SgNode* l_expr);  
 
   // def-use-sepcific ------------------
   void handleDefCopy(SgNode* sgNode, int nrOfInEdges, SgNode* sgNodeBefore, 
 		  filteredCFGNodeType cfgNode);
   void handleUseCopy(SgNode* sgNode, int nrOfInEdges, SgNode* sgNodeBefore, 
 		  filteredCFGNodeType cfgNode);
-  bool checkElementsForEquality(const multitype* t1, const multitype* t2);
   template <typename T> bool defuse(T cfgNode, bool *unhandled);
-  template <typename T> SgNode* getCFGPredNode(T cfgNode);
-  template <typename T> SgNode* getOtherInNode(T source, SgNode* oneNode);
 
   int nrOfNodesVisitedPF;
   int breakPointForWhile;
   SgNode* breakPointForWhileNode;
   
  public:
-  DefUseAnalysisPF(bool debug, DefUseAnalysis* dfa_p):DEBUG_MODE(debug),
-    DEBUG_MODE_EXTRA(false),dfa(dfa_p){
+  DefUseAnalysisPF(bool debug, DefUseAnalysis* dfa_p){
+    DEBUG_MODE=debug;
+    DEBUG_MODE_EXTRA=false;
+    dfa=dfa_p;
     breakPointForWhile=0;
     breakPointForWhileNode=NULL;
-    doNotVisitMap.clear();
-    nodeChangedMap.clear();
   };
-  FilteredCFGNode < IsDFAFilter > run(SgFunctionDefinition* function);
+  virtual ~DefUseAnalysisPF(){};
+  FilteredCFGNode < IsDFAFilter > run(SgFunctionDefinition* function, bool& abortme);
   int getNumberOfNodesVisited();
+
 };
 
 #endif

Copied: branches/testonly/src/midend/programAnalysis/defUseAnalysis/LivenessAnalysis.cpp (from rev 128, trunk/src/midend/programAnalysis/defUseAnalysis/LivenessAnalysis.cpp)
===================================================================
--- branches/testonly/src/midend/programAnalysis/defUseAnalysis/LivenessAnalysis.cpp	                        (rev 0)
+++ branches/testonly/src/midend/programAnalysis/defUseAnalysis/LivenessAnalysis.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,460 @@
+/******************************************
+ * Category: DFA
+ * DefUse Analysis Definition
+ * created by tps in Feb 2007
+ *****************************************/
+
+#include "LivenessAnalysis.h"
+#include "DefUseAnalysis_perFunction.h"
+#include "GlobalVarAnalysis.h"
+#include <boost/config.hpp>
+#include <boost/bind.hpp>
+
+
+using namespace std;
+
+template <class T>
+T LivenessAnalysis::merge_no_dups( T& v1,  T& v2) {
+  T ret(v1);
+  for (typename T::const_iterator i = v2.begin(); i != v2.end(); ++i) {
+    bool notfound = true;
+    for (typename T::const_iterator z = ret.begin(); z != ret.end(); ++z) {
+      if (*z == *i) {
+	notfound = false;
+	break;
+      }
+    }
+    if (notfound) {
+      ret.push_back(*i);
+    }
+  }
+  return ret;
+}
+
+SgFunctionDefinition* 
+LivenessAnalysis::getFunction(SgNode* node) {
+  ROSE_ASSERT(node);
+  // make sure that this node is within a function
+  SgNode* parent = node->get_parent();
+  ROSE_ASSERT(parent);
+  while (!isSgFunctionDeclaration(parent)) {
+    parent=parent->get_parent();
+    ROSE_ASSERT(parent);
+    if (isSgProject(parent)) {
+      cerr << " This node is not within a function. Cant run Variable Liveness Analysis." << endl;
+      return NULL;
+    }
+  }
+  SgFunctionDeclaration* func = isSgFunctionDeclaration(parent);
+  ROSE_ASSERT(func);
+  SgFunctionDefinition* funcDef = func->get_definition();
+  ROSE_ASSERT(funcDef);
+  return funcDef;
+}
+
+
+void 
+LivenessAnalysis::printInAndOut(SgNode* sgNode) {
+  if (DEBUG_MODE)
+    cout << ">>> in and out for : " << sgNode << "  " << sgNode->class_name() << endl;
+  std::vector<SgInitializedName*> currIn = in[sgNode];
+  std::vector<SgInitializedName*>::const_iterator it2 = currIn.begin();
+  if (DEBUG_MODE)
+    cout << "   in : " ;
+  for (;it2!=currIn.end();++it2) {
+    SgInitializedName* init = isSgInitializedName(*it2);
+    ROSE_ASSERT(init);
+    std::string name =".";
+    name= init->get_name().str();
+    if (DEBUG_MODE)
+      cout << name << ", " ;
+  }
+  if (DEBUG_MODE)
+    cout << endl;
+
+  std::vector<SgInitializedName*> currOut = out[sgNode];
+  std::vector<SgInitializedName*>::const_iterator it3 = currOut.begin();
+  if (DEBUG_MODE)
+    cout << "   out : " ;
+  for (;it3!=currOut.end();++it3) {
+    SgInitializedName* init = isSgInitializedName(*it3);
+    ROSE_ASSERT(init);
+    std::string name =".";
+    name= init->get_name().str();
+    if (DEBUG_MODE)
+      cout << name << ", " ;
+  }
+  if (DEBUG_MODE)
+    cout << endl;
+}
+
+static bool sort_using_greater_than(SgNode* u, SgNode* v){
+  return u > v;
+}
+
+/**********************************************************
+ * Traverse the CFG backwards from a given node to 
+ * determine whether a change has occured at that path
+ * until the first split (2 inedges) or root.
+ *********************************************************/
+template <typename T>
+bool LivenessAnalysis::hasANodeAboveCurrentChanged(T source) {
+  bool changed = false;
+  // go cfg back until split or root
+  // check nodeChangeMap if a all nodes have changed.
+  // if any has changed return true.
+  vector<FilteredCFGEdge < IsDFAFilter > > in_edges = source.outEdges();
+  if (in_edges.size()==1) {
+    FilteredCFGEdge<IsDFAFilter> filterEdge = in_edges[0];
+    FilteredCFGNode<IsDFAFilter> filterNode = filterEdge.target();
+    SgNode* sgNode = filterNode.getNode();
+    ROSE_ASSERT(sgNode);
+    bool changedInTable = nodeChangedMap[sgNode];
+    if (DEBUG_MODE)
+      cout << " >>> backward CFG : visiting node : " << sgNode << " " << sgNode->class_name() <<
+	"  changed : " << changedInTable << endl;
+    if (changedInTable) {
+      return true;
+    } else {
+      changed = hasANodeAboveCurrentChanged(filterNode);
+    }
+  }
+  return changed;
+
+}
+
+
+template <typename T>
+bool LivenessAnalysis::defuse(T cfgNode, bool *unhandled) {
+  SgNode* sgNode = cfgNode.getNode();
+  if (visited.find(sgNode)==visited.end())
+    visited[sgNode]=1;
+  else
+    visited[sgNode]++;
+  SgNode* sgNodeBefore = getCFGPredNode(cfgNode);  
+  ROSE_ASSERT(sgNode);
+
+  vector<FilteredCFGEdge < IsDFAFilter > > out_edges2 = cfgNode.inEdges();
+  for (vector<FilteredCFGEdge <IsDFAFilter> >::const_iterator i = out_edges2.begin(); i != out_edges2.end(); ++i) {
+    FilteredCFGEdge<IsDFAFilter> filterEdge = *i;
+    FilteredCFGNode<IsDFAFilter> filterNode = filterEdge.source();
+    SgNode* sgNode2 = filterNode.getNode();
+    if (visited.find(sgNode2)==visited.end())
+      *unhandled=true;
+  }
+
+
+  bool has_changed=false;
+  if (DEBUG_MODE) {
+    cout << "\n\n------------------------------------------------------------------\ncurrent Node: " << 
+      sgNode << "  previous Node : " << sgNodeBefore << endl;
+    printInAndOut(sgNode);
+  }
+
+  // get def and use for this node 
+  SgInitializedName* initName = isSgInitializedName(sgNode);
+  SgVarRefExp* varRef = isSgVarRefExp(sgNode);
+  bool defNode = false;
+  bool useNode = false;
+  if (initName) {
+    std::vector <SgNode*> defs = dfa->getDefFor(sgNode, initName);
+    //get the def and use for the current node
+    std::vector<SgNode*>::const_iterator it = defs.begin();
+    for (;it!=defs.end();++it) {
+      SgNode* itNode = *it;
+      if (itNode==sgNode)
+	defNode=true;
+    }
+  }
+
+
+  if (varRef) {
+    initName = varRef->get_symbol()->get_declaration();
+    ROSE_ASSERT(initName);
+    std::vector <SgNode*> uses = dfa->getUseFor(sgNode, initName);
+    std::vector<SgNode*>::const_iterator it = uses.begin();
+    for (;it!=uses.end();++it) {
+      SgNode* itNode = *it;
+      if (itNode==sgNode)
+	useNode=true;
+    }
+  }
+
+  if (DEBUG_MODE) {
+    cout << "     At this point def : " << defNode << "  use : " << useNode << endl;
+    if (initName)
+      cout << "  initName : " << initName->get_name().str() << endl;
+    cout << " Doing out = " << endl;
+  }
+  // do the algo for variable liveness
+  out[sgNode].clear();
+  vector<FilteredCFGEdge < IsDFAFilter > > out_edges = cfgNode.outEdges();
+  for (vector<FilteredCFGEdge <IsDFAFilter> >::const_iterator i = out_edges.begin(); i != out_edges.end(); ++i) {
+    FilteredCFGEdge<IsDFAFilter> filterEdge = *i;
+    FilteredCFGNode<IsDFAFilter> filterNode = filterEdge.target();
+    SgNode* sgNodeNext = filterNode.getNode();
+    ROSE_ASSERT(sgNodeNext);
+    std::vector<SgInitializedName*> tmpIn = in[sgNodeNext];
+    if (DEBUG_MODE)
+      cout << "   out : previous node : " << sgNodeNext << " " << sgNodeNext->class_name() << "   in Size : " << 
+	tmpIn.size() << "   out[sgNode].size = " << out[sgNode].size() << endl;
+    //    out[sgNode].swap(tmpIn);
+    std::vector<SgInitializedName*> tmpOut = out[sgNode];
+    out[sgNode]=merge_no_dups(tmpOut,tmpIn);
+    std::sort(out[sgNode].begin(), out[sgNode].end(),sort_using_greater_than);
+  }
+
+  if (DEBUG_MODE)
+    printInAndOut(sgNode);
+  if (DEBUG_MODE)
+    cout << " Doing in = " << endl;
+
+  // what if it is an assignment
+  switch(sgNode->variant()) {
+  case V_SgPlusPlusOp:
+  case V_SgMinusMinusOp: 
+  case V_SgAssignOp: 
+  case V_SgModAssignOp:
+  case V_SgDivAssignOp:
+  case V_SgMultAssignOp:
+  case V_SgLshiftAssignOp:
+  case V_SgRshiftAssignOp:
+  case V_SgXorAssignOp:
+  case V_SgAndAssignOp:
+  case V_SgMinusAssignOp:
+  case V_SgPlusAssignOp: {
+    // go through all initialized names for out
+    // and cancel the InitializedName for in if it is 
+    // defined for this node
+    std::vector<SgInitializedName*> vec  = out[sgNode];
+    std::vector<SgInitializedName*>::iterator inIt = vec.begin();
+    for (;inIt!=vec.end();++inIt) {
+      SgInitializedName* initN = isSgInitializedName(*inIt);
+      std::vector <SgNode*> defs = dfa->getDefFor(sgNode, initN);      
+      std::vector<SgNode*>::const_iterator it = defs.begin();
+      for (;it!=defs.end();++it) {
+	SgNode* itNode = *it;
+	if (itNode==sgNode) {
+	  defNode=true;
+	  initName=initN;
+	  break;
+	}
+      }
+    }    
+    if (initName)
+      cout << " This is an assignment :  initName = " <<
+	initName->get_name().str() << "  def : " << defNode << endl;
+    else {
+      cout << " !!! This is an assignment but no initName matched. defnode = "
+	   << defNode << endl;
+    }
+    break;
+  }
+  default: {
+    // its none of the above
+    // none of the above breakPointForWhiles is hit 
+    *unhandled=true;
+    // take care of the case where we have none of the above within a loop (breakPointForWhile)
+    // i.e. no : VarRefExp, InitializedName, FunctionDefinition ...
+    // If this unhandled node has been added to the map before (visited)
+    // then we do want to mark it as handled.
+      if (isSgWhileStmt(sgNode) || isSgForStatement(sgNode)
+	  || isSgDoWhileStmt(sgNode)) {
+	if (breakPointForWhileNode==NULL) {
+	  breakPointForWhileNode=sgNode;
+	  breakPointForWhile++;
+	  if (DEBUG_MODE)
+	    cout << ">>> Setting Breakpoint : " << sgNode->class_name() << " " <<sgNode << " " << breakPointForWhile <<endl;
+	} else if (sgNode==breakPointForWhileNode) {
+	  // reaching the breakPoint for a second time
+	  // check if any node above this node up to the branch or root has changed
+	  breakPointForWhile++;
+	  bool hasAnyNodeAboveChanged = hasANodeAboveCurrentChanged(cfgNode);
+	  if (hasAnyNodeAboveChanged==false) {
+	    // need to break this loop
+	    // add current node to doNotVisitMap
+	    doNotVisitMap.insert(sgNode);
+	  }
+
+	  if (DEBUG_MODE)
+	    cout << ">>> Inc Breakpoint : " << sgNode->class_name() << " " <<sgNode << " " << breakPointForWhile <<endl;
+	  *unhandled = false;
+	  breakPointForWhileNode=NULL;
+	  breakPointForWhile=0;
+	  if (DEBUG_MODE)
+	    cout << ">>> Resetting Breakpoint : " << sgNode->class_name() << " " <<sgNode << " " << breakPointForWhile <<endl;
+	} else {
+	  if (DEBUG_MODE)
+	    cout << ">>> Skipping unhandled node ... " << endl;
+	}
+      }
+  
+    break;
+  }
+  }
+
+
+  
+  in[sgNode] = out[sgNode];
+  if (defNode) {
+    std::vector<SgInitializedName*> vec  = in[sgNode];
+    std::vector<SgInitializedName*>::iterator inIt = vec.begin();
+    for (;inIt!=vec.end();++inIt) {
+      if (*inIt==initName) {
+	vec.erase(inIt); // = initName
+	break;
+      }
+    }
+    in[sgNode]=vec;
+  }
+  if (useNode) {
+    std::vector<SgInitializedName*> vec  = in[sgNode];
+    std::vector<SgInitializedName*>::iterator inIt = vec.begin();
+    bool found=false;
+    for (;inIt!=vec.end();++inIt) {
+      if (*inIt==initName) {
+	found=true;
+	break;
+      }
+    }
+    if (!found) {
+      std::string name = initName->get_name().str();
+      if (DEBUG_MODE)
+	cout << " did not find initName : " << name << " in in[sgNode]    size: " << in[sgNode].size() <<endl;
+      in[sgNode].push_back(initName); // = varRef
+      std::sort(in[sgNode].begin(), in[sgNode].end(),sort_using_greater_than);
+      if (DEBUG_MODE)
+	cout << " added sgNode :   new size [sgNode] = " <<in[sgNode].size() <<endl;
+    }
+  }
+
+  if (defNode || useNode) {
+    if (DEBUG_MODE)
+      cout << " This was a def or use node " << endl;
+    // has_changed only applies here
+    bool equal = std::equal(in[sgNode].begin(),in[sgNode].end(),out[sgNode].begin());
+    if (!equal)
+      has_changed=true;
+    if (DEBUG_MODE) {
+      cout << " CHECKME : IN AND OUT ARE equal : " << equal << endl;
+      printInAndOut(sgNode);
+    }
+  } else {
+    // if it is a arbitraty node, we assume it has changed, so we can traverse further
+    has_changed=true;
+  }
+
+  if (DEBUG_MODE) {
+    cout << " value has changed ... : " << has_changed << endl;
+    printInAndOut(sgNode);
+  }
+
+
+  return has_changed;
+}
+
+
+FilteredCFGNode < IsDFAFilter > 
+LivenessAnalysis::run(SgFunctionDefinition* funcDecl, bool& abortme) {
+  // filter functions -- to only functions in analyzed file  
+  abort=false;
+  counter=0;
+  nrOfNodesVisitedPF= 0;
+  breakPointForWhileNode=NULL;
+  breakPointForWhile=0;;
+  // clear those maps for each function run
+  doNotVisitMap.clear();
+  nodeChangedMap.clear();
+
+  string funcName = getFullName(funcDecl);
+  //  DEBUG_MODE = false;
+  DEBUG_MODE_EXTRA=false;
+
+  if (funcName=="") {
+    FilteredCFGNode < IsDFAFilter > empty(CFGNode(NULL, 0));
+    return empty;
+  }
+  ROSE_ASSERT(funcDecl);
+
+  if (DEBUG_MODE) 
+    cout << " Found function " << funcName << endl;
+
+  // DFA on that function
+  vector<FilteredCFGNode<IsDFAFilter> > worklist;
+  
+  //waitAtMergeNode.clear();
+
+  // add this node to worklist and work through the outgoing edges
+  FilteredCFGNode < IsDFAFilter > source =
+    FilteredCFGNode < IsDFAFilter > (funcDecl->cfgForEnd());
+  CFGNode cmpSrc = CFGNode(funcDecl->cfgForEnd());
+  FilteredCFGNode < IsDFAFilter > rem_source = source;
+
+  if (DEBUG_MODE) {
+    std::ofstream f("cfg.dot");
+    cfgToDot(f, string("cfg"), source);
+    f.close();
+  }
+
+  
+  worklist.push_back(source);
+  vector<FilteredCFGNode<IsDFAFilter> > debug_path;
+  debug_path.push_back(source);
+
+  bool valueHasChanged = false;
+  bool unhandledNode=false;
+  while (!worklist.empty()) {
+    source = worklist.front();
+    worklist.erase(worklist.begin());
+    // do current node
+    unhandledNode = false;
+    SgNode* next = source.getNode();
+    if (doNotVisitMap.find(next)!=doNotVisitMap.end())
+      continue;
+    valueHasChanged = defuse(source, &unhandledNode);  
+    nodeChangedMap[source.getNode()] = valueHasChanged;
+    // do follow-up nodes
+    // get nodes of outgoing edges and pushback (if not already contained)
+    if (DEBUG_MODE) {
+      cout << " Current Node: " << source.getNode() << " " << source.getNode()->class_name() << " changed: " 
+	   << resBool(valueHasChanged) << endl;
+      cout << " Current Node: " << source.getNode() << " unhandled: " 
+	   << resBool(unhandledNode) << endl;
+    }
+    if (valueHasChanged || unhandledNode) {
+      vector<FilteredCFGEdge < IsDFAFilter > > out_edges = source.inEdges();
+      for (vector<FilteredCFGEdge <IsDFAFilter> >::const_iterator i = out_edges.begin(); i != out_edges.end(); ++i) {
+	FilteredCFGEdge<IsDFAFilter> filterEdge = *i;
+	FilteredCFGNode<IsDFAFilter> filterNode = filterEdge.source();
+	if (find(worklist.begin(), worklist.end(), filterNode)==worklist.end()) {
+	  worklist.push_back(filterNode);
+	  debug_path.push_back(filterNode);
+	}
+      }
+      if (DEBUG_MODE) 
+	printCFGVector(worklist);
+    }
+
+    counter++;
+    if (counter==4000)
+      abort=true;
+
+    if (abort) {
+      cerr << " \n\n\n>>>>>>>>>>>>>>>>>>>>>>>>>>> ABORTING !! INFINITE EXECUTION ... \n\n" << endl;
+      worklist.clear();
+      abortme=true;
+    }
+  }
+  nrOfNodesVisitedPF= debug_path.size();
+
+  if (DEBUG_MODE) {
+    cout << " Exiting function " << funcName << endl;
+    cout << "\nNr of nodes visited " << debug_path.size() << "  of nodes : "  << endl;
+    printCFGVector(debug_path);
+  }
+
+
+
+  return rem_source;
+
+}

Copied: branches/testonly/src/midend/programAnalysis/defUseAnalysis/LivenessAnalysis.h (from rev 128, trunk/src/midend/programAnalysis/defUseAnalysis/LivenessAnalysis.h)
===================================================================
--- branches/testonly/src/midend/programAnalysis/defUseAnalysis/LivenessAnalysis.h	                        (rev 0)
+++ branches/testonly/src/midend/programAnalysis/defUseAnalysis/LivenessAnalysis.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,60 @@
+/******************************************
+ * Category: DFA
+ * Liveness Analysis Declaration
+ * created by tps in Nov 2008
+ *****************************************/
+
+#ifndef __LivenessAnalysis_HXX_LOADED__
+#define __LivenessAnalysis_HXX_LOADED__
+#include <string>
+
+#include "filteredCFG.h"
+#include "DefUseAnalysis.h"
+#include "support.h"
+
+#include "DefUseAnalysisAbstract.h"
+
+class LivenessAnalysis : public DefUseAnalysisAbstract {
+ private:
+  SgProject* project;
+  bool DEBUG_MODE;
+
+  SgNode* searchNode;
+  void printInAndOut(SgNode* sgNode);
+  template <class T> T merge_no_dups( T& v1,  T& v2);
+  bool abort;
+  int counter;
+  std::map<SgNode*, std::vector<SgInitializedName*> > in;
+  std::map<SgNode*, std::vector<SgInitializedName*> > out;
+
+  int nrOfNodesVisitedPF;
+  //  std::map<SgNode*,int> breakPointForWhile;
+  //std::set<SgNode*> breakPointForWhileNode;
+  int breakPointForWhile;
+  SgNode* breakPointForWhileNode;
+
+  template <typename T> bool defuse(T cfgNode, bool *unhandled);
+  std::map<SgNode*,int> visited;
+  template <typename T> bool hasANodeAboveCurrentChanged(T source);
+
+ public:
+ LivenessAnalysis(bool debug, DefUseAnalysis* dfa_p){
+   dfa=dfa_p;
+   DEBUG_MODE=debug;
+   DEBUG_MODE_EXTRA=false;
+   breakPointForWhile=0;
+   breakPointForWhileNode=NULL;
+   
+  };
+  virtual ~LivenessAnalysis() {}
+
+  SgFunctionDefinition* getFunction(SgNode* node);
+  int getNumberOfNodesVisited();
+  FilteredCFGNode < IsDFAFilter > run(SgFunctionDefinition* function, bool& abortme);
+  
+  std::vector<SgInitializedName*> getIn(SgNode* sgNode) { return in[sgNode];}
+  std::vector<SgInitializedName*> getOut(SgNode* sgNode) { return out[sgNode];}
+  int getVisited(SgNode* n) {return visited[n];}
+};
+
+#endif

Modified: branches/testonly/src/midend/programAnalysis/defUseAnalysis/Makefile.am
===================================================================
--- branches/testonly/src/midend/programAnalysis/defUseAnalysis/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/defUseAnalysis/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -19,7 +19,7 @@
 
 # DQ (11/8/2007): The runTest.cpp file was moved to tests/roseTests/programAnalysisTests/defUseAnalysisTests/runTest.C by Thomas.
 # libDefUseAnalysis_la_SOURCES = $(srcdir)/GlobalVarAnalysis.cpp $(srcdir)/DefUseAnalysis.cpp $(srcdir)/DefUseAnalysis_perFunction.cpp $(srcdir)/dfaToDot.cpp $(srcdir)/runTest.cpp
-libDefUseAnalysis_la_SOURCES = $(srcdir)/GlobalVarAnalysis.cpp $(srcdir)/DefUseAnalysis.cpp $(srcdir)/DefUseAnalysis_perFunction.cpp $(srcdir)/dfaToDot.cpp
+libDefUseAnalysis_la_SOURCES = $(srcdir)/GlobalVarAnalysis.cpp $(srcdir)/DefUseAnalysis.cpp $(srcdir)/DefUseAnalysis_perFunction.cpp $(srcdir)/dfaToDot.cpp $(srcdir)/LivenessAnalysis.cpp $(srcdir)/DefUseAnalysisAbstract.cpp
 
 
 
@@ -29,4 +29,4 @@
 distclean-local:
 	rm -rf Templates.DB
 
-include_HEADERS =  DefUseAnalysis.h  DefUseAnalysis_perFunction.h  DFAFilter.h  DFAnalysis.h  dfaToDot.h  filteredCFG.h  filteredCFGImpl.h  GlobalVarAnalysis.h  support.h
+include_HEADERS =  DefUseAnalysis.h  DefUseAnalysis_perFunction.h  DFAFilter.h  DFAnalysis.h  dfaToDot.h  GlobalVarAnalysis.h  support.h LivenessAnalysis.h DefUseAnalysisAbstract.h

Modified: branches/testonly/src/midend/programAnalysis/defUseAnalysis/dfaToDot.cpp
===================================================================
--- branches/testonly/src/midend/programAnalysis/defUseAnalysis/dfaToDot.cpp	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/defUseAnalysis/dfaToDot.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,7 +1,9 @@
 
 #include "dfaToDot.h"
 #include "DFAFilter.h"
+#include "LivenessAnalysis.h"
 
+
 using namespace std;
 
 
@@ -48,37 +50,91 @@
   std::string getNodeString(const NodeT& cfg, DefUseAnalysis* dfa) {
     std::string retStr = "";
     SgNode* n = cfg.getNode();
-    retStr = " ( " + ToString(dfa->getIntForSgNode(n)) + " )  - ";
+    retStr = " ( " + ToString(dfa->getIntForSgNode(n)) + " )  - [";
+    retStr += RoseBin_support::ToString(n);
+    retStr +="] ";
     return retStr;
   }
 
   template <typename EdgeT>
-  std::string getEdgeString(const EdgeT& e, DefUseAnalysis* dfa) {
+  std::string getEdgeString(const EdgeT& e, DefUseAnalysis* dfa,
+			    LivenessAnalysis* live) {
     std::string retStr = "";
     SgNode* n = e.source().getNode();
-    typedef std::vector < std::pair < SgInitializedName* , SgNode*>  > multitype;
-    //typedef std::map< SgNode* , multitype > tabletype;
+    SgNode* t = e.target().getNode();
 
-    std::vector < std::pair <SgInitializedName*, SgNode*> > multi = dfa->getDefMultiMapFor(n);
-    for (multitype::const_iterator j = multi.begin(); j != multi.end(); ++j) {  
-      SgInitializedName* sgInitMM = (*j).first;
-      string name = sgInitMM->get_qualified_name().str() ;
-      SgNode* sgNodeMM = (*j).second;
-      string temp = "DEF: " +name + " ( " + ToString(dfa->getIntForSgNode(sgInitMM)) + 
-	" )  - " + ToString(dfa->getIntForSgNode(sgNodeMM)) + " \n";
-      retStr += temp;
-    }    
+    if (live==NULL) {
+      typedef std::vector < std::pair < SgInitializedName* , SgNode*>  > multitype;
+      std::vector < std::pair <SgInitializedName*, SgNode*> > multi = dfa->getDefMultiMapFor(n);
+      for (multitype::const_iterator j = multi.begin(); j != multi.end(); ++j) {  
+	SgInitializedName* sgInitMM = (*j).first;
+	string name = sgInitMM->get_qualified_name().str() ;
+	SgNode* sgNodeMM = (*j).second;
+	string temp = "DEF: " +name + " ( " + ToString(dfa->getIntForSgNode(sgInitMM)) + 
+	  " )  - " + ToString(dfa->getIntForSgNode(sgNodeMM)) + " \n";
+	retStr += temp;
+      }    
+      
+      multi = dfa->getUseMultiMapFor(n);
+      for (multitype::const_iterator j = multi.begin(); j != multi.end(); ++j) {  
+	SgInitializedName* sgInitMM = (*j).first;
+	string name = sgInitMM->get_qualified_name().str() ;
+	SgNode* sgNodeMM = (*j).second;
+	string temp = "USE: " +name + " ( " + ToString(dfa->getIntForSgNode(sgInitMM)) + 
+	  " )  - " + ToString(dfa->getIntForSgNode(sgNodeMM)) + " \n";
+	retStr += temp;
+      }    
+    } else {
+      ROSE_ASSERT(n);
+      ROSE_ASSERT(t);
+      std::vector<SgInitializedName*> in = live->getIn(t);
+      std::vector<SgInitializedName*> out = live->getOut(n);
 
-    multi = dfa->getUseMultiMapFor(n);
-    for (multitype::const_iterator j = multi.begin(); j != multi.end(); ++j) {  
-      SgInitializedName* sgInitMM = (*j).first;
-      string name = sgInitMM->get_qualified_name().str() ;
-      SgNode* sgNodeMM = (*j).second;
-      string temp = "USE: " +name + " ( " + ToString(dfa->getIntForSgNode(sgInitMM)) + 
-	" )  - " + ToString(dfa->getIntForSgNode(sgNodeMM)) + " \n";
-      retStr += temp;
-    }    
+      std::vector<SgInitializedName*>::iterator it = in.begin();
+      std::string inS = "in : ";
+      for (;it!=in.end();++it) {
+	SgInitializedName* init = isSgInitializedName(*it);
+	ROSE_ASSERT(init);
+	inS += init->get_name().str();
+	inS += ",";
+      }
 
+      it = out.begin();
+      std::string outS = "out : ";
+      for (;it!=out.end();++it) {
+	SgInitializedName* init = isSgInitializedName(*it);
+	ROSE_ASSERT(init);
+	outS += init->get_name().str();
+	outS += ",";
+      }
+      retStr = outS+"\n   visited : "+
+	RoseBin_support::ToString(live->getVisited(n))+"\n"+inS+"\n";
+
+      typedef std::vector < std::pair < SgInitializedName* , SgNode*>  > multitype;
+      std::vector < std::pair <SgInitializedName*, SgNode*> > multi = dfa->getDefMultiMapFor(n);
+      for (multitype::const_iterator j = multi.begin(); j != multi.end(); ++j) {  
+	SgInitializedName* sgInitMM = (*j).first;
+	string name = sgInitMM->get_qualified_name().str() ;
+	SgNode* sgNodeMM = (*j).second;
+	string temp = "DEF: " +name + " ( " + ToString(dfa->getIntForSgNode(sgInitMM)) + 
+	  " )  - " + ToString(dfa->getIntForSgNode(sgNodeMM)) + " \n";
+	if (sgNodeMM==n)
+	  retStr += temp;
+      }    
+      
+      multi = dfa->getUseMultiMapFor(n);
+      for (multitype::const_iterator j = multi.begin(); j != multi.end(); ++j) {  
+	SgInitializedName* sgInitMM = (*j).first;
+	string name = sgInitMM->get_qualified_name().str() ;
+	SgNode* sgNodeMM = (*j).second;
+	string temp = "USE: " +name + " ( " + ToString(dfa->getIntForSgNode(sgInitMM)) + 
+	  " )  - " + ToString(dfa->getIntForSgNode(sgNodeMM)) + " \n";
+	if (sgNodeMM==n)
+	  retStr += temp;
+      }    
+
+    }
+
     return retStr;
   }
 
@@ -98,7 +154,8 @@
   }
 
   template <typename EdgeT>
-  inline void printDFAEdge(ostream& o, const EdgeT& e, bool isInEdge, DefUseAnalysis* dfa) {
+  inline void printDFAEdge(ostream& o, const EdgeT& e, bool isInEdge, DefUseAnalysis* dfa,
+			   LivenessAnalysis* live) {
     //cout << " printDFAEdge: label: " << getEdgeString(e) << endl;
     string nodeColor = "black";
     SgNode* ns = e.source().getNode();    
@@ -110,25 +167,26 @@
 	nodeColor = "red";
     }
     o << e.source().id() << " -> " << e.target().id() << " [label=\"" << 
-      escapeString(getEdgeString(e, dfa) ) << 
+      escapeString(getEdgeString(e, dfa, live) ) << 
       "\", color=\"" << nodeColor << 
       "\", style=\"" << (isInEdge ? "dotted" : "solid") << "\"];\n";
   }
 
 
   template <typename NodeT, typename EdgeT>
-  void printDFANodePlusEdges(ostream& o, NodeT n, DefUseAnalysis* dfa) {
+  void printDFANodePlusEdges(ostream& o, NodeT n, DefUseAnalysis* dfa,
+			     LivenessAnalysis* live) {
     printDFANode<NodeT>(o, n, dfa);
     vector<EdgeT> outEdges = n.outEdges();
     for (unsigned int i = 0; i < outEdges.size(); ++i) {
-      printDFAEdge<EdgeT>(o, outEdges[i], false, dfa);
+      printDFAEdge<EdgeT>(o, outEdges[i], false, dfa, live);
     }
       if (/* Debug */ isSgFunctionCallExp(n.getNode()) && n.getIndex() == 3) {
 	vector<EdgeT> inEdges = n.inEdges();
 	for (unsigned int i = 0; i < inEdges.size(); ++i) {
-	  printDFAEdge<EdgeT>(o, inEdges[i], false, dfa);
+	  printDFAEdge<EdgeT>(o, inEdges[i], false, dfa, live);
 	}
-	printDFAEdge<EdgeT>(o, CFGPath(CFGEdge(CFGNode(n.getNode(), 2), n.toNode())), false, dfa);
+	printDFAEdge<EdgeT>(o, CFGPath(CFGEdge(CFGNode(n.getNode(), 2), n.toNode())), false, dfa, live);
       }
   }
 
@@ -138,10 +196,11 @@
     set<SgNode*> nodesPrinted;
     ostream& o;
     DefUseAnalysis* dfa;
+    LivenessAnalysis* live;
 
   public:
-    DfaToDotImpl(ostream& o, DefUseAnalysis* dfa_p): 
-      exploredNodes(), nodesPrinted(), o(o), dfa(dfa_p) {}
+    DfaToDotImpl(ostream& o, DefUseAnalysis* dfa_p, LivenessAnalysis* live_p): 
+      exploredNodes(), nodesPrinted(), o(o), dfa(dfa_p), live(live_p) {}
     void explore(NodeT n);
     void processNodes(SgNode* top);
   };
@@ -173,7 +232,7 @@
   void DfaToDotImpl<NodeT, EdgeT>::processNodes(SgNode*) {
     for (typename multimap<SgNode*, NodeT>::const_iterator it = exploredNodes.begin();
 	 it != exploredNodes.end(); ++it) {
-      printDFANodePlusEdges<NodeT, EdgeT>(o, it->second, dfa);
+      printDFANodePlusEdges<NodeT, EdgeT>(o, it->second, dfa, live);
     }
   }
 
@@ -185,7 +244,7 @@
 			  DefUseAnalysis* dfa) {
     o << "digraph " << graphName << " {\n";
     DfaToDotImpl < FilteredCFGNode < FilterFunction >,
-      FilteredCFGEdge < FilterFunction > > impl(o, dfa);
+      FilteredCFGEdge < FilterFunction > > impl(o, dfa, NULL);
     typename  std::vector < FilteredCFGNode < FilterFunction > >::const_iterator it;
     for (it=start.begin(); it!=start.end(); ++it) {
       o << "// Writing graph for " << (*it).toStringForDebugging() << std::endl;
@@ -197,7 +256,32 @@
     return o;
   }
 
+  template < typename FilterFunction > 
+  std::ostream & dfaToDot(std::ostream & o,
+			  std::string graphName,
+			  std::vector < FilteredCFGNode < FilterFunction > > start,
+			  DefUseAnalysis* dfa,
+			  LivenessAnalysis* live) {
+    o << "digraph " << graphName << " {\n";
+    DfaToDotImpl < FilteredCFGNode < FilterFunction >,
+      FilteredCFGEdge < FilterFunction > > impl(o, dfa, live);
+    typename  std::vector < FilteredCFGNode < FilterFunction > >::const_iterator it;
+    for (it=start.begin(); it!=start.end(); ++it) {
+      o << "// Writing graph for " << (*it).toStringForDebugging() << std::endl;
+      FilteredCFGNode < FilterFunction> cfgnode = *it;
+      impl.explore(cfgnode);
+    }
+    impl.processNodes(0);
+    o << "}\n";
+    return o;
+  }
+
+
   template std::ostream& dfaToDot(std::ostream&, std::string, 
   				  std::vector <FilteredCFGNode<IsDFAFilter> >,
   				  DefUseAnalysis* dfa);
+  template std::ostream& dfaToDot(std::ostream&, std::string, 
+  				  std::vector <FilteredCFGNode<IsDFAFilter> >,
+  				  DefUseAnalysis* dfa,
+				  LivenessAnalysis* live);
 }

Modified: branches/testonly/src/midend/programAnalysis/defUseAnalysis/dfaToDot.h
===================================================================
--- branches/testonly/src/midend/programAnalysis/defUseAnalysis/dfaToDot.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/defUseAnalysis/dfaToDot.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -14,6 +14,8 @@
 #include "filteredCFG.h"
 #include "DefUseAnalysis.h"
 
+class LivenessAnalysis;
+
 namespace VirtualCFG {
 
   template < typename FilterFunction > 
@@ -21,5 +23,11 @@
 			     std::string graphName,
 			     std::vector < FilteredCFGNode < FilterFunction > > start,
 			     DefUseAnalysis* dfa);
+  template < typename FilterFunction > 
+     std::ostream & dfaToDot(std::ostream & o,
+			     std::string graphName,
+			     std::vector < FilteredCFGNode < FilterFunction > > start,
+			     DefUseAnalysis* dfa,
+			     LivenessAnalysis* live);
 }
 #endif

Deleted: branches/testonly/src/midend/programAnalysis/defUseAnalysis/filteredCFG.h
===================================================================
--- branches/testonly/src/midend/programAnalysis/defUseAnalysis/filteredCFG.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/defUseAnalysis/filteredCFG.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,146 +0,0 @@
-#ifndef FILTEREDCFGVIEW_H
-#define FILTEREDCFGVIEW_H
-
-#include "rose.h"
-#include "virtualCFG.h"
-#include <string>
-#include <vector>
-
-namespace VirtualCFG
-{
-  // Function call node and edge filters
-
-  template < typename FilterFunction > class FilteredCFGEdge;
-
-  template < typename FilterFunction > class FilteredCFGNode
-    {
-      CFGNode n;
-      FilterFunction filter;
-
-    public:
-      FilteredCFGNode(CFGNode n):n(n)
-        {
-        }
-      FilteredCFGNode():n(NULL)
-        { 
-        }
-      CFGNode toNode() const
-        {
-	  return n;
-        }
-      std::string toString() const
-        {
-	  std::string nToString= n.toString();
-	  if (nToString.find('>',0)>0) {
-	    std::ostringstream os;
-	    os << nToString.substr(0, nToString.find('>', 0));
-	    os << "0x" << std::hex << (uintptr_t)(this->getNode()) << "\\n";
-	    os << nToString.substr(nToString.find('>', 0) + 1);
-	    return os.str();
-	    // nToString.insert(nToString.find('>',0)+1,"\n");
-	  }
-	  return nToString;
-        }
-      std::string toStringForDebugging() const
-        {
-	  return n.toStringForDebugging();
-        }
-      std::string id() const
-        {
-	  return n.id();
-        }
-      SgNode *getNode() const
-        {
-	  return n.getNode();
-        }
-      unsigned int getIndex() const
-        {
-	  return n.getIndex();
-        }
-      std::vector < FilteredCFGEdge < FilterFunction > >outEdges() const;
-      std::vector < FilteredCFGEdge < FilterFunction > >inEdges()const;
-      bool isInteresting() const
-        {
-	  return true;
-        }
-      bool operator==(const FilteredCFGNode & o)const
-        {
-	  return n == o.n;
-        }
-      bool operator!=(const FilteredCFGNode & o)const
-        {
-	  return !(*this == o);
-        }
-      bool operator<(const FilteredCFGNode & o)const
-        {
-	  return n < o.n;
-        }
-    };
-
-  template < typename FilterFunction > class FilteredCFGEdge
-    {
-      CFGPath p;
-      FilterFunction filter;
-
-    public:
-      FilteredCFGEdge(CFGPath p):p(p)
-        {
-        }
-      std::string toString()const
-        {
-	  return p.toString();
-        }
-      std::string toStringForDebugging() const
-        {
-	  return p.toStringForDebugging();
-        }
-      std::string id() const
-        {
-	  return p.id();
-        }
-      FilteredCFGNode < FilterFunction > source() const
-        {
-	  return FilteredCFGNode < FilterFunction > (p.source());
-        }
-      FilteredCFGNode < FilterFunction > target() const
-        {
-	  return FilteredCFGNode < FilterFunction > (p.target());
-        }
-      EdgeConditionKind condition() const
-        {
-	  return p.condition();
-        }
-      SgExpression *caseLabel() const
-        {
-	  return p.caseLabel();
-        }
-      std::vector < SgInitializedName * >scopesBeingExited() const
-        {
-	  return p.scopesBeingExited();
-        }
-      std::vector < SgInitializedName * >scopesBeingEntered() const
-        {
-	  return p.scopesBeingEntered();
-        }
-      bool operator==(const FilteredCFGNode < FilterFunction > &o)const
-        {
-	  return p == o.p;
-        }
-      bool operator!=(const FilteredCFGNode < FilterFunction > &o)const
-        {
-	  return p != o.p;
-        }
-      bool operator<(const FilteredCFGNode < FilterFunction > &o)const
-        {
-	  return p < o.p;
-        }
-    };
-
-  template < typename FilterFunction > std::ostream & cfgToDot(std::ostream & o,
-							       std::string graphName,
-							       FilteredCFGNode <
-							       FilterFunction > start);
-}
-
-#include "filteredCFGImpl.h"
-#endif // XCFGVIEW_H

Deleted: branches/testonly/src/midend/programAnalysis/defUseAnalysis/filteredCFGImpl.h
===================================================================
--- branches/testonly/src/midend/programAnalysis/defUseAnalysis/filteredCFGImpl.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/defUseAnalysis/filteredCFGImpl.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,230 +0,0 @@
-#include <rose.h>
-#include "filteredCFG.h"
-#include <sstream>
-#include <iomanip>
-#include <stdint.h>
-
-// using namespace std;
-
-#define SgNULL_FILE Sg_File_Info::generateDefaultFileInfoForTransformationNode()
-//#define DEBUG
-
-namespace VirtualCFG
-{
-
-    template < typename FindSuccessors, typename FindEnd, typename DontAddChildren,
-        typename Join, typename FilteredEdge > struct MakeClosure
-    {
-        std::set < CFGNode > visitedNodes;
-        std::set < CFGPath > visitedPaths;
-        const FindSuccessors & findSuccessors;
-        const FindEnd & findEnd;
-        const DontAddChildren & dontAddChildren;
-        const Join & join;
-
-          MakeClosure(const FindSuccessors & findSuccessors, const FindEnd & findEnd,
-                      const DontAddChildren & dontAddChildren,
-                      const Join & join):findSuccessors(findSuccessors), findEnd(findEnd),
-            dontAddChildren(dontAddChildren), join(join)
-        {
-        }
-
-
-        void go(const CFGPath & p)
-        {
-            CFGNode end = findEnd(p);
-
-            if (visitedNodes.find(end) != visitedNodes.end())
-                  return;
-#if ROSE_GCC_OMP
-#pragma omp critical (filteredCFGImplgo)
-#endif
-	    {
-              visitedNodes.insert(end);
-              visitedPaths.insert(p);
-	    }
-            if (dontAddChildren(end))
-                  return;
-              std::vector < CFGEdge > edges = findSuccessors(end);
-            for (unsigned int i = 0; i < edges.size(); ++i)
-            {
-                go(join(p, edges[i]));
-            }
-        }
-
-        std::vector < FilteredEdge > filter() const
-        {
-            std::vector < FilteredEdge > edges;
-            for (std::set < CFGPath >::const_iterator i = visitedPaths.begin();
-                 i != visitedPaths.end(); ++i)
-            {
-                const CFGPath & p = *i;
-                if (dontAddChildren(findEnd(p)))
-                      edges.push_back(FilteredEdge(*i));
-            }
-            return edges;
-        }
-    };
-
-    template < typename FilteredEdge, typename FindSuccessors, typename FindEnd,
-        typename AddChildren,
-        typename Join > std::vector < FilteredEdge > makeClosure(const std::vector < CFGPath > &p,
-                                                            const FindSuccessors &
-                                                            findSuccessors,
-                                                            const FindEnd & findEnd,
-                                                            const AddChildren & addChildren,
-                                                            const Join & join)
-    {
-        MakeClosure < FindSuccessors, FindEnd, AddChildren, Join,
-            FilteredEdge > mc(findSuccessors, findEnd, addChildren, join);
-        for (unsigned int i = 0; i < p.size(); ++i)
-            mc.go(p[i]);
-        return mc.filter();
-    }
-
-    template < typename FilteredEdge, typename Filter >
-        std::vector < FilteredEdge > makeClosure(const std::vector < CFGEdge > &orig,
-                                            std::vector < CFGEdge > (CFGNode::*closure) ()const,
-                                            CFGNode(CFGPath::*otherSide) ()const,
-                                            CFGPath(*merge) (const CFGPath &, const CFGPath &),
-                                            const Filter & filter)
-    {
-        std::vector < CFGPath > paths(orig.begin(), orig.end());
-        return makeClosure < FilteredEdge > (paths, std::mem_fun_ref(closure),
-                                             std::mem_fun_ref(otherSide), filter, merge);
-    }
-
-
-    // Class Impl
-    template < typename FilterFunction > std::vector < FilteredCFGEdge < FilterFunction >
-        >FilteredCFGNode < FilterFunction >::outEdges()const
-    {
-        return makeClosure < FilteredCFGEdge < FilterFunction > >(n.outEdges(),
-                                                                  &CFGNode::outEdges,
-                                                                  &CFGPath::target, &mergePaths,
-                                                                  filter);
-    }
-    // Class Impl
-    template < typename FilterFunction > std::vector < FilteredCFGEdge < FilterFunction >
-        >FilteredCFGNode < FilterFunction >::inEdges() const
-    {
-        return makeClosure < FilteredCFGEdge < FilterFunction > >(n.inEdges(),
-                                                                  &CFGNode::inEdges,
-                                                                  &CFGPath::source,
-                                                                  &mergePathsReversed, filter);
-    }
-    // ---------------------------------------------
-    // DOT OUT IMPL
-    template < typename NodeT, typename EdgeT > class CfgToDotImpl
-    {
-        std::multimap < SgNode *, NodeT > exploredNodes;
-        std::set < SgNode * >nodesPrinted;
-        std::ostream & o;
-
-      public:
-      CfgToDotImpl(std::ostream & o):exploredNodes(), nodesPrinted(), o(o)
-        {
-        }
-        void explore(NodeT n);
-        void processNodes(SgNode * top);
-    };
-
-    template < typename NodeT > inline void printNode(std::ostream & o, const NodeT & n)
-    {
-        std::string id = n.id();
-        std::string nodeColor = "black";
-
-        if (isSgStatement(n.getNode()))
-            nodeColor = "blue";
-        else if (isSgExpression(n.getNode()))
-            nodeColor = "green";
-        else if (isSgInitializedName(n.getNode()))
-            nodeColor = "red";
-        o << id << " [label=\"" << escapeString(n.
-                                                toString()) << "\", color=\"" << nodeColor <<
-            "\", style=\"" << (n.isInteresting()? "solid" : "dotted") << "\"];\n";
-    }
-
-    template < typename EdgeT >
-        inline void printEdge(std::ostream & o, const EdgeT & e, bool isInEdge)
-    {
-        o << e.source().id() << " -> " << e.target().id() << " [label=\"" << escapeString(e.
-                                                                                          toString
-                                                                                          ()) <<
-            "\", style=\"" << (isInEdge ? "dotted" : "solid") << "\"];\n";
-    }
-
-    template < typename NodeT, typename EdgeT >
-        void CfgToDotImpl < NodeT, EdgeT >::explore(NodeT n)
-    {
-        ROSE_ASSERT(n.getNode());
-        std::pair < typename std::multimap < SgNode *, NodeT >::const_iterator,
-            typename std::multimap < SgNode *, NodeT >::const_iterator > ip =
-            exploredNodes.equal_range(n.getNode());
-        for (typename std::multimap < SgNode *, NodeT >::const_iterator i = ip.first;
-             i != ip.second; ++i)
-        {
-            if (i->second == n)
-                return;
-        }
-#if ROSE_GCC_OMP
-#pragma omp critical (filteredCFGImpltoDot)
-#endif
-        exploredNodes.insert(make_pair(n.getNode(), n));
-        std::vector < EdgeT > outEdges = n.outEdges();
-        for (unsigned int i = 0; i < outEdges.size(); ++i)
-        {
-            ROSE_ASSERT(outEdges[i].source() == n);
-            explore(outEdges[i].target());
-        }
-        std::vector < EdgeT > inEdges = n.inEdges();
-        for (unsigned int i = 0; i < inEdges.size(); ++i)
-        {
-            ROSE_ASSERT(inEdges[i].target() == n);
-            explore(inEdges[i].source());
-        }
-    }
-
-    template < typename NodeT, typename EdgeT > void printNodePlusEdges(std::ostream & o,
-                                                                        NodeT n)
-    {
-        printNode(o, n);
-        std::vector < EdgeT > outEdges = n.outEdges();
-        for (unsigned int i = 0; i < outEdges.size(); ++i)
-        {
-            printEdge(o, outEdges[i], false);
-        }
-				#ifdef DEBUG
-        std::vector < EdgeT > inEdges = n.inEdges();
-        for (unsigned int i = 0; i < inEdges.size(); ++i)
-        {
-            printEdge(o, inEdges[i], true);
-        }
-				#endif
-    }
-    template < typename NodeT, typename EdgeT >
-        void CfgToDotImpl < NodeT, EdgeT >::processNodes(SgNode *)
-    {
-        for (typename std::multimap < SgNode *, NodeT >::const_iterator it =
-             exploredNodes.begin(); it != exploredNodes.end(); ++it)
-        {
-            printNodePlusEdges < NodeT, EdgeT > (o, it->second);
-        }
-    }
-
-
-    template < typename FilterFunction > std::ostream & cfgToDot(std::ostream & o,
-                                                                 std::string graphName,
-                                                                 FilteredCFGNode <
-                                                                 FilterFunction > start)
-    {
-        o << "digraph " << graphName << " {\n";
-        CfgToDotImpl < FilteredCFGNode < FilterFunction >,
-            FilteredCFGEdge < FilterFunction > >impl(o);
-        impl.explore(start);
-        impl.processNodes(start.getNode());
-        o << "}\n";
-        return o;
-    }
-
-}

Modified: branches/testonly/src/midend/programAnalysis/dominanceAnalysis/Makefile.am
===================================================================
--- branches/testonly/src/midend/programAnalysis/dominanceAnalysis/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/dominanceAnalysis/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -6,5 +6,5 @@
 distclean-local:
 	rm -rf Templates.DB
 
-include_HEADERS =  DominatorTree.h filteredCFG.h DominanceFrontier.h DominatorTreeImpl.h ../defUseAnalysis/filteredCFGImpl.h
+include_HEADERS =  DominatorTree.h filteredCFG.h DominanceFrontier.h DominatorTreeImpl.h
 

Modified: branches/testonly/src/midend/programAnalysis/valuePropagation/ValueAnnot.C
===================================================================
--- branches/testonly/src/midend/programAnalysis/valuePropagation/ValueAnnot.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/valuePropagation/ValueAnnot.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -82,7 +82,9 @@
     *argsp = arg1;
  return arg2.back().toString();
 }
-
+//! Check if an expression 'exp' is a member function call to an object 'objp'
+// If yes, return the member function's name, store function arguments, and 
+// store the has_value descriptor of the object (desc)
 std::string HasValueCollection::
 is_known_member_function( CPPAstInterface& fa, const AstNodePtr& exp,
                           AstNodePtr* objp, AstInterface::AstNodeList* args,
@@ -90,11 +92,13 @@
 {
   AstNodePtr obj;
   std::string func;
+  // Return a null string if it is not data or function member access expressions to an object.
   if (!fa.IsMemberAccess( exp, &obj, &func) &&
      !fa.IsMemberFunctionCall(exp, &obj, &func, 0, args))
      return "";
   if (obj == AST_NULL)
     return "";
+  // Return member function name if the object has a known type  
   if (known_type( fa, obj, desc)) {
     if (objp != 0)
         *objp = obj;
@@ -124,10 +128,13 @@
    values.Dump();
    valueRestrict.Dump();
 }
-
+// Check if an expression representing an class object has a known class type
+// Store its has_value descriptor into "r" if the descriptor exists, also 
+// replace its corresonding has_value annotations' "this" pointer with the concrete object references 'exp'
 bool ValueAnnotation ::
 known_type( AstInterface& fa, const AstNodePtr& exp, HasValueDescriptor* r)
 {
+  // values is HasValueCollection, which derives from TypeCollection and has access to known_type() of the base class
   if (!values.known_type(fa, exp, r))
     return false;
   if (r != 0)

Modified: branches/testonly/src/midend/programAnalysis/valuePropagation/ValueAnnot.h
===================================================================
--- branches/testonly/src/midend/programAnalysis/valuePropagation/ValueAnnot.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/midend/programAnalysis/valuePropagation/ValueAnnot.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -5,7 +5,9 @@
 #include <OperatorAnnotation.h>
 #include <CPPAstInterface.h>
 #include <list>
-
+//! The semantic information (values) for data members of a type. 
+// Store the information into a map between the name of the data members and the expressions of their values
+// e.g. class Index {has_value { stride = this.stride; base = this.base; length = this.length; } }
 class HasValueDescriptor 
    : public MapDescriptor<StringDescriptor, SymbolicValDescriptor, ';', '{', '}'>
 {
@@ -23,10 +25,12 @@
   std::string toString() const;
   void replace_var( const std::string& name, const SymbolicVal& repl);
   void replace_val( MapObject<SymbolicVal, SymbolicVal>& repl); 
-
+  // Check if there is a value expression for a data member named as 'name'.
+  // If yes, store the symbolic value expression into 'r' when r!=0
   bool has_value( const std::string& name, SymbolicValDescriptor* r = 0) const;
 };
 
+//! Collecting annotations for "has_value", part of type/class annotations
 class HasValueCollection : public TypeAnnotCollection< HasValueDescriptor>
 {
    typedef TypeAnnotCollection< HasValueDescriptor > BaseClass;
@@ -69,7 +73,7 @@
       OperatorAnnotCollection<RestrictValueOpDescriptor>::Dump();
     }
 };
-
+//! Collector for both has_value and restrict_value annotations
 class ValueAnnotation 
 {
   HasValueCollection values;

Modified: branches/testonly/src/rose.h
===================================================================
--- branches/testonly/src/rose.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/rose.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -141,5 +141,10 @@
 
 #include "PHPFrontend.h"
 
+// DQ (11/7/2008): Added Dwarf support to ROSE AST (applies only to binary executables generated with dwarf debugging information).
+#if USE_ROSE_DWARF_SUPPORT
+#include "dwarfSupport.h"
+#endif
+
 // ifndef ROSE_H
 #endif

Modified: branches/testonly/src/roseIndependentSupport/dot2gml/Makefile.am
===================================================================
--- branches/testonly/src/roseIndependentSupport/dot2gml/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/roseIndependentSupport/dot2gml/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,46 +1,23 @@
 include $(top_srcdir)/config/Makefile.for.ROSE.includes.and.libs
 
+AM_YFLAGS = -d
+
 # "if" for DOT_TO_GML_TRANSLATOR (AutoMake conditional block)
 if DOT_TO_GML_TRANSLATOR
 
 bin_PROGRAMS = dot2gml
 
 dot2gml_SOURCES = \
-     main.C
+     main.C parseDot.ll parseDotGrammar.yy
 
-DEPENDENCIES = lex.o bison.o
+BUILT_SOURCES = parseDotGrammar.h
+DISTCLEANFILES = parseDotGrammar.h parseDotGrammar.cc parseDot.cc
 
 # Header files that need to be included in the distribution
 include_HEADERS = parse_header.h
 
-LDADD = lex.o bison.o
-
-main.o: lex.o bison.o
-
-lex.o: bison.o lex.c
-		$(CXX) $(CFLAGS) -I$(srcdir) -c lex.c -o lex.o
-
-lex.c: $(srcdir)/parseDot.lex 
-		flex $(srcdir)/parseDot.lex
-		cp lex.yy.c lex.c
-
-bison.o:	bison.c
-		$(CXX) $(CFLAGS) -I$(srcdir) -c bison.c -o bison.o
-
-y.tab.h: bison.o
-
-bison.c:	$(srcdir)/parseDot.y
-	bison -d -v $(srcdir)/parseDot.y
-	cp parseDot.tab.c bison.c
-	cp parseDot.tab.h y.tab.h
-
-lex.o yac.o main.o: parse_header.h
-lex.o main.o		: y.tab.h
-
-# parseDot.tab.h  y.tab.h
-
 clean-local:
-	rm -f *.o *~ lex.c lex.yy.c bison.c y.tab.h parseDot.tab.c parseDot.tab.h parseDot.output parseDot *.gml
+	rm -f *.o *~ *.gml
 
 # DQ (9/10/2005): This should be moved to the tests directory
 #check:
@@ -48,4 +25,4 @@
 
 endif
 
-EXTRA_DIST = parse_header.h parseDot.lex parseDot.y README main.C 
+EXTRA_DIST = parse_header.h parseDot.ll parseDotGrammar.yy README main.C 

Deleted: branches/testonly/src/roseIndependentSupport/dot2gml/parseDot.lex
===================================================================
--- branches/testonly/src/roseIndependentSupport/dot2gml/parseDot.lex	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/roseIndependentSupport/dot2gml/parseDot.lex	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,54 +0,0 @@
-%option noyywrap
-/* Note that yylineno is an undocumented feature that we shouldn't be using */
-%option yylineno
-%{
-#include "parse_header.h"
-#include "y.tab.h"
-int yyerror(const char *s);
-%}
-
-inquote          \\\"
-
-%%
-\[              {return LBRK;}
-\]              {return RBRK;}
-\;              {return COLUMN;}
-\=              {return ASSGN;}
-"label"         {return LABEL;}
-"digraph"       {return DIGRAPH;}
-"subgraph"      {return SUBGRAPH;}
-"color"         {return COLOR;}
-"shape"         {return SHAPE;}
-"diamond"       {return DIAMOND;}
-"dir"           {return DIR;}
-"none"          {return NONE;}
-"both"          {return BOTH;}
-"null"          {return VNULL;}
-"{"             {return LBRACE;}
-"}"             {return RBRACE;}
-"->"            {return LARROW;}
-[a-zA-Z0-9_]+   {
-                  // returning the (unquoted) string
-                  yylval.sVal = strdup(yytext);
-                  return NAME;
-                }
-
-((\"(0x|"")[0-9a-fA-F]+\")|(\"(0x|""x)[0-9a-fA-F]+__[a-zA-Z0-9]+__null\"))   {
-                      // eliminating quotes, returning ID or string
-                      yylval.sVal = strdup(yytext + 1);
-                      yylval.sVal[yyleng - 2] = 0;
-                      return ID;
-                    }
-
-[ \t]           ;
-\"([^"\n]|{inquote})*\"    {
-                  // returning a string (may have inside quotes)
-                  yylval.sVal = strdup(yytext + 1);
-                  yylval.sVal[yyleng - 2] = 0;
-                  return STRING;
-                }
-
-[\n]		{ yylineno++;}
-.               ;
-
-%%

Copied: branches/testonly/src/roseIndependentSupport/dot2gml/parseDot.ll (from rev 128, trunk/src/roseIndependentSupport/dot2gml/parseDot.ll)
===================================================================
--- branches/testonly/src/roseIndependentSupport/dot2gml/parseDot.ll	                        (rev 0)
+++ branches/testonly/src/roseIndependentSupport/dot2gml/parseDot.ll	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,54 @@
+%option noyywrap
+/* Note that yylineno is an undocumented feature that we shouldn't be using */
+%option yylineno
+%{
+#include "parse_header.h"
+#include "parseDotGrammar.h"
+int yyerror(const char *s);
+%}
+
+inquote          \\\"
+
+%%
+\[              {return LBRK;}
+\]              {return RBRK;}
+\;              {return COLUMN;}
+\=              {return ASSGN;}
+"label"         {return LABEL;}
+"digraph"       {return DIGRAPH;}
+"subgraph"      {return SUBGRAPH;}
+"color"         {return COLOR;}
+"shape"         {return SHAPE;}
+"diamond"       {return DIAMOND;}
+"dir"           {return DIR;}
+"none"          {return NONE;}
+"both"          {return BOTH;}
+"null"          {return VNULL;}
+"{"             {return LBRACE;}
+"}"             {return RBRACE;}
+"->"            {return LARROW;}
+[a-zA-Z0-9_]+   {
+                  // returning the (unquoted) string
+                  yylval.sVal = strdup(yytext);
+                  return NAME;
+                }
+
+((\"(0x|"")[0-9a-fA-F]+\")|(\"(0x|""x)[0-9a-fA-F]+__[a-zA-Z0-9]+__null\"))   {
+                      // eliminating quotes, returning ID or string
+                      yylval.sVal = strdup(yytext + 1);
+                      yylval.sVal[yyleng - 2] = 0;
+                      return ID;
+                    }
+
+[ \t]           ;
+\"([^"\n]|{inquote})*\"    {
+                  // returning a string (may have inside quotes)
+                  yylval.sVal = strdup(yytext + 1);
+                  yylval.sVal[yyleng - 2] = 0;
+                  return STRING;
+                }
+
+[\n]		{ yylineno++;}
+.               ;
+
+%%

Deleted: branches/testonly/src/roseIndependentSupport/dot2gml/parseDot.y
===================================================================
--- branches/testonly/src/roseIndependentSupport/dot2gml/parseDot.y	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/roseIndependentSupport/dot2gml/parseDot.y	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,187 +0,0 @@
-/*
- * DOT file format parser
- */
-
-%{
-#include "parse_header.h"
-#include <sstream>
-#include <queue>
-
-using namespace std;
-
-extern ofstream GML;
-std::string edge_str, crt_options;
-unsigned long buf_len = 0;
-int yyerror (char *s);
-int yylex (void);
-int crt_subgraph = 1, in_edge_stmt = 0;
-std::queue<std::string> edges;
-std::string graphics;
-char *buf;
-%}
-
-%union {
-  int iVal;
-  char cVal;
-  char *sVal;
-};
-
-%token <sVal> STRING UNDS VNULL NAME
-%token <sVal> ID
-%token <cVal> LBRACE RBRACE
-%type <sVal> graph stmt_list graph_name stmt node_stmt edge_stmt label_list option_stmt
-
-%token LBRK RBRK LBRACE RBRACE ASSGN LABEL LARROW STRING DIGRAPH COLUMN
-%token SHAPE SUBGRAPH COLOR NONE BOTH DIAMOND DIR
-
-%start input
-
-%%
-input:          {cout << "STARTED\n";} graph {cout << "ENDED\n";};
-
-graph:          DIGRAPH graph_name LBRACE
-                {
-                  GML << "graph [\n\tlabel \"" << $2 << "\"";
-                }
-                // write nodes, gather edges to the end of the file
-                stmt_list RBRACE
-                {
-		  buf = (char *)malloc(buf_len);
-                  if (!(buf > 0))
-                  {
-		    cerr << "ERROR: could not allocate memory for the edges!";
-		  }
-		  while (!edges.empty())
-		  {
-		    strcat(buf, edges.front().c_str());
-		    edges.pop();
-		  }
-                  GML << buf << "\n]\n";
-		}
-
-graph_name:     STRING
-
-stmt_list:      
-                | stmt stmt_list
-
-stmt:           subgraph_stmt 
-                | node_stmt COLUMN
-                | edge_stmt COLUMN
-                | option_stmt COLUMN
-
-subgraph_stmt:  subgraph
-                | subgraph subgraph_stmt
-
-subgraph:       SUBGRAPH NAME LBRACE
-                {
-                  crt_subgraph++;
-                }
-                stmt_list RBRACE
-
-node_stmt:      ID
-                {
-                  GML << "\n\tnode [\n\t\tid " << $1; // << "\"";
-	        }
-                label_list
-		{
-                  GML << "\n\t]";
-		}
-
-edge_stmt:      ID LARROW ID
-                {
-                  in_edge_stmt = 1;
-                  edge_str = "\n\tedge [\n\t\tsource " + (std::string)$1 + "\n\t\ttarget " + (std::string)$3;
-                }
-                label_list
-                {
-                  edge_str += "\n\t]";
-		  edges.push(edge_str);
-		  buf_len += edge_str.length();
-                  in_edge_stmt = 0;
-                }
-
-label_list:     LBRK LABEL ASSGN ID
-                {
-		  // write node labels and graphical options, save edge labels and options
-                  if (in_edge_stmt)
-                    edge_str += "\n\t\tlabel \"" + (std::string)$4 + "\"";
-		  else
-                    GML << "\n\t\tlabel \"" << $4 << "\"";
-                  crt_options = "\n\t\tgraphics [";
-		}
-                option_list
-                {
-		  // all nodes of the subgraph have the same color
-		  std::ostringstream cl;
-		  cl << crt_subgraph;
-		  crt_options += "\n\t\t\tfill " + cl.str() + "\n\t\t]";
-
-		  // save the options for edges, write the options for nodes
-		  if (in_edge_stmt)
-		    edge_str += crt_options;
-		  else
-		    GML << crt_options;
-                }
-                RBRK
-                | LBRK LABEL ASSGN STRING
-                {
-                  if (in_edge_stmt)
-		  {
-		    std::string tmp = $4;
-                    edge_str += "\n\t\tlabel \"" + tmp  + "\"";
-		  }
-		  else
-                    GML << "\n\t\tlabel \"" << $4 << "\"";
-                  crt_options = "\n\t\tgraphics [";
-		}
-                option_list
-                {
-		  std::ostringstream cl;
-		  cl << crt_subgraph;
-		  crt_options += "\n\t\t\tfill " + cl.str() + "\n\t\t]";
-
-		  if (in_edge_stmt)
-		    edge_str += crt_options;
-		  else
-		    GML << crt_options;
-                }
-                RBRK
-
-option_list:    
-                | option option_list
-
-option:         DIR ASSGN NONE
-                {
-                  crt_options += "\n\t\t\tarrow \"none\"";
-                }
-                | DIR ASSGN BOTH
-                {
-		  crt_options += "\n\t\t\tarrow \"both\"";
-                }
-                | SHAPE ASSGN DIAMOND
-                {
-		  crt_options += "\n\t\t\ttype \"oval\"";
-                }
-
-		// TODO: label and color are now only associated with the whole graph...
-		//... not with the nodes or inner graphs (which don't exist yet)
-option_stmt:    LABEL ASSGN STRING
-                {
-		  GML << "\n\tLabelGraphics [\n\t\ttype \"" << $3 << "\"\n\t]";
-                }
-                | COLOR ASSGN NAME
-                {
-		  GML << "\n\tgraphics [\n\t\toutline \"" << $3 << "\"\n\t]";
-                }
-%%
-
-int yyerror(char* s)
-{
-  extern int yylineno;
-  extern char *yytext;
-  
-  cerr << "ERROR: " << s << " at symbol \"" << yytext;
-  cerr << "\" on line " << yylineno << endl;
-
-  exit(1);
-}

Copied: branches/testonly/src/roseIndependentSupport/dot2gml/parseDotGrammar.h (from rev 128, trunk/src/roseIndependentSupport/dot2gml/parseDotGrammar.h)
===================================================================
--- branches/testonly/src/roseIndependentSupport/dot2gml/parseDotGrammar.h	                        (rev 0)
+++ branches/testonly/src/roseIndependentSupport/dot2gml/parseDotGrammar.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,97 @@
+/* A Bison parser, made by GNU Bison 1.875c.  */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+/* As a special exception, when this file is copied by Bison into a
+   Bison output file, you may use that output file without restriction.
+   This special exception was added by the Free Software Foundation
+   in version 1.24 of Bison.  */
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     STRING = 258,
+     UNDS = 259,
+     VNULL = 260,
+     NAME = 261,
+     ID = 262,
+     LBRACE = 263,
+     RBRACE = 264,
+     LBRK = 265,
+     RBRK = 266,
+     ASSGN = 267,
+     LABEL = 268,
+     LARROW = 269,
+     DIGRAPH = 270,
+     COLUMN = 271,
+     SHAPE = 272,
+     SUBGRAPH = 273,
+     COLOR = 274,
+     NONE = 275,
+     BOTH = 276,
+     DIAMOND = 277,
+     DIR = 278
+   };
+#endif
+#define STRING 258
+#define UNDS 259
+#define VNULL 260
+#define NAME 261
+#define ID 262
+#define LBRACE 263
+#define RBRACE 264
+#define LBRK 265
+#define RBRK 266
+#define ASSGN 267
+#define LABEL 268
+#define LARROW 269
+#define DIGRAPH 270
+#define COLUMN 271
+#define SHAPE 272
+#define SUBGRAPH 273
+#define COLOR 274
+#define NONE 275
+#define BOTH 276
+#define DIAMOND 277
+#define DIR 278
+
+
+
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#line 23 "../../../../sourcetree/src/roseIndependentSupport/dot2gml/parseDotGrammar.yy"
+typedef union YYSTYPE {
+  int iVal;
+  char cVal;
+  char *sVal;
+} YYSTYPE;
+/* Line 1275 of yacc.c.  */
+#line 89 "parseDotGrammar.h"
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+extern YYSTYPE yylval;
+
+
+

Copied: branches/testonly/src/roseIndependentSupport/dot2gml/parseDotGrammar.yy (from rev 128, trunk/src/roseIndependentSupport/dot2gml/parseDotGrammar.yy)
===================================================================
--- branches/testonly/src/roseIndependentSupport/dot2gml/parseDotGrammar.yy	                        (rev 0)
+++ branches/testonly/src/roseIndependentSupport/dot2gml/parseDotGrammar.yy	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,187 @@
+/*
+ * DOT file format parser
+ */
+
+%{
+#include "parse_header.h"
+#include <sstream>
+#include <queue>
+
+using namespace std;
+
+extern ofstream GML;
+std::string edge_str, crt_options;
+unsigned long buf_len = 0;
+int yyerror (char *s);
+int yylex (void);
+int crt_subgraph = 1, in_edge_stmt = 0;
+std::queue<std::string> edges;
+std::string graphics;
+char *buf;
+%}
+
+%union {
+  int iVal;
+  char cVal;
+  char *sVal;
+};
+
+%token <sVal> STRING UNDS VNULL NAME
+%token <sVal> ID
+%token <cVal> LBRACE RBRACE
+%type <sVal> graph stmt_list graph_name stmt node_stmt edge_stmt label_list option_stmt
+
+%token LBRK RBRK LBRACE RBRACE ASSGN LABEL LARROW STRING DIGRAPH COLUMN
+%token SHAPE SUBGRAPH COLOR NONE BOTH DIAMOND DIR
+
+%start input
+
+%%
+input:          {cout << "STARTED\n";} graph {cout << "ENDED\n";};
+
+graph:          DIGRAPH graph_name LBRACE
+                {
+                  GML << "graph [\n\tlabel \"" << $2 << "\"";
+                }
+                // write nodes, gather edges to the end of the file
+                stmt_list RBRACE
+                {
+		  buf = (char *)malloc(buf_len);
+                  if (!(buf > 0))
+                  {
+		    cerr << "ERROR: could not allocate memory for the edges!";
+		  }
+		  while (!edges.empty())
+		  {
+		    strcat(buf, edges.front().c_str());
+		    edges.pop();
+		  }
+                  GML << buf << "\n]\n";
+		}
+
+graph_name:     STRING
+
+stmt_list:      
+                | stmt stmt_list
+
+stmt:           subgraph_stmt 
+                | node_stmt COLUMN
+                | edge_stmt COLUMN
+                | option_stmt COLUMN
+
+subgraph_stmt:  subgraph
+                | subgraph subgraph_stmt
+
+subgraph:       SUBGRAPH NAME LBRACE
+                {
+                  crt_subgraph++;
+                }
+                stmt_list RBRACE
+
+node_stmt:      ID
+                {
+                  GML << "\n\tnode [\n\t\tid " << $1; // << "\"";
+	        }
+                label_list
+		{
+                  GML << "\n\t]";
+		}
+
+edge_stmt:      ID LARROW ID
+                {
+                  in_edge_stmt = 1;
+                  edge_str = "\n\tedge [\n\t\tsource " + (std::string)$1 + "\n\t\ttarget " + (std::string)$3;
+                }
+                label_list
+                {
+                  edge_str += "\n\t]";
+		  edges.push(edge_str);
+		  buf_len += edge_str.length();
+                  in_edge_stmt = 0;
+                }
+
+label_list:     LBRK LABEL ASSGN ID
+                {
+		  // write node labels and graphical options, save edge labels and options
+                  if (in_edge_stmt)
+                    edge_str += "\n\t\tlabel \"" + (std::string)$4 + "\"";
+		  else
+                    GML << "\n\t\tlabel \"" << $4 << "\"";
+                  crt_options = "\n\t\tgraphics [";
+		}
+                option_list
+                {
+		  // all nodes of the subgraph have the same color
+		  std::ostringstream cl;
+		  cl << crt_subgraph;
+		  crt_options += "\n\t\t\tfill " + cl.str() + "\n\t\t]";
+
+		  // save the options for edges, write the options for nodes
+		  if (in_edge_stmt)
+		    edge_str += crt_options;
+		  else
+		    GML << crt_options;
+                }
+                RBRK
+                | LBRK LABEL ASSGN STRING
+                {
+                  if (in_edge_stmt)
+		  {
+		    std::string tmp = $4;
+                    edge_str += "\n\t\tlabel \"" + tmp  + "\"";
+		  }
+		  else
+                    GML << "\n\t\tlabel \"" << $4 << "\"";
+                  crt_options = "\n\t\tgraphics [";
+		}
+                option_list
+                {
+		  std::ostringstream cl;
+		  cl << crt_subgraph;
+		  crt_options += "\n\t\t\tfill " + cl.str() + "\n\t\t]";
+
+		  if (in_edge_stmt)
+		    edge_str += crt_options;
+		  else
+		    GML << crt_options;
+                }
+                RBRK
+
+option_list:    
+                | option option_list
+
+option:         DIR ASSGN NONE
+                {
+                  crt_options += "\n\t\t\tarrow \"none\"";
+                }
+                | DIR ASSGN BOTH
+                {
+		  crt_options += "\n\t\t\tarrow \"both\"";
+                }
+                | SHAPE ASSGN DIAMOND
+                {
+		  crt_options += "\n\t\t\ttype \"oval\"";
+                }
+
+		// TODO: label and color are now only associated with the whole graph...
+		//... not with the nodes or inner graphs (which don't exist yet)
+option_stmt:    LABEL ASSGN STRING
+                {
+		  GML << "\n\tLabelGraphics [\n\t\ttype \"" << $3 << "\"\n\t]";
+                }
+                | COLOR ASSGN NAME
+                {
+		  GML << "\n\tgraphics [\n\t\toutline \"" << $3 << "\"\n\t]";
+                }
+%%
+
+int yyerror(char* s)
+{
+  extern int yylineno;
+  extern char *yytext;
+  
+  cerr << "ERROR: " << s << " at symbol \"" << yytext;
+  cerr << "\" on line " << yylineno << endl;
+
+  exit(1);
+}

Modified: branches/testonly/src/roseInternal.h
===================================================================
--- branches/testonly/src/roseInternal.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/roseInternal.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -12,12 +12,14 @@
 // #define FALSE false
 // #endif
 
+#include <cstdlib>
+
 // These are supported this way so that they can be redefined as required
 #ifndef ROSE_ASSERT
 #ifndef NDEBUG
 #define ROSE_ASSERT assert
 #else // We use assert(false) equivalents so often for "should not get here", but we don't want nontrivial side effects in asserts to be run when assert is disabled
-#define ROSE_ASSERT(x) do {if (__builtin_constant_p(x)) {if (x) {} else abort();}} while (0)
+#define ROSE_ASSERT(x) do {if (__builtin_constant_p(x)) {if (x) {} else (std::abort)();}} while (0)
 #endif
 #endif
 #ifndef ROSE_ABORT

Modified: branches/testonly/src/util/commandlineProcessing/commandline_processing.C
===================================================================
--- branches/testonly/src/util/commandlineProcessing/commandline_processing.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/util/commandlineProcessing/commandline_processing.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -693,6 +693,7 @@
          || suffix == "F95"
          || suffix == "F03"
          || suffix == "F08"
+         || suffix == "rmod" //FMZ 5/28/2008: for importing module declaration
              )
 #else//It is a case insensitive system
      if (   suffix == "f"
@@ -707,6 +708,7 @@
          || suffix == "F95"
          || suffix == "F03"
          || suffix == "F08"
+         || suffix == "rmod" //FMZ 5/28/2008: for importing module declaration
              )
 #endif
           returnValue = true;
@@ -731,6 +733,7 @@
          || suffix == "f95"
          || suffix == "f03"
          || suffix == "f08"
+         || suffix == "rmod" //FMZ (10/15/2008)
              )
           returnValue = false;
 #else
@@ -783,9 +786,9 @@
   // For now define CASE_SENSITIVE_SYSTEM to be true, as we are currently a UNIXish project.
 
 #if(CASE_SENSITIVE_SYSTEM == 1)
-     if ( suffix == "f90" || suffix == "F90" )
+     if ( suffix == "f90" || suffix == "F90" || suffix == "rmod")
 #else//It is a case insensitive system
-     if ( suffix == "f90" )
+     if ( suffix == "f90" || suffix == "rmod")
 #endif
         {
           returnValue = true;
@@ -943,6 +946,8 @@
           validSourceFileSuffixes.push_back(".F95");
           validSourceFileSuffixes.push_back(".F03");
           validSourceFileSuffixes.push_back(".F08");
+          validSourceFileSuffixes.push_back(".rmod"); //FMZ 5/28/2008
+
      // Liao (6/6/2008)  Support for UPC   
           validSourceFileSuffixes.push_back(".upc");
           validSourceFileSuffixes.push_back(".php");
@@ -972,6 +977,7 @@
           validSourceFileSuffixes.push_back(".F95");
           validSourceFileSuffixes.push_back(".F03");
           validSourceFileSuffixes.push_back(".F08");
+          validSourceFileSuffixes.push_back(".rmod"); //FMZ 5/28/2008
           validSourceFileSuffixes.push_back(".upc");
           validSourceFileSuffixes.push_back(".php");
 #endif

Modified: branches/testonly/src/util/commandlineProcessing/commandline_processing.h
===================================================================
--- branches/testonly/src/util/commandlineProcessing/commandline_processing.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/util/commandlineProcessing/commandline_processing.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -7,12 +7,16 @@
 
 namespace CommandlineProcessing
    {
-          /// Separate a string into individual parameters and store them into a string vector
+          //! Separate a string into individual parameters and store them into a string vector
           Rose_STL_Container<std::string> generateArgListFromString ( std::string commandline );
-          /// Convert an arc-argv pair into a string vector
+
+	  //! Convert an argc-argv pair into a string vector
           Rose_STL_Container<std::string> generateArgListFromArgcArgv ( int argc, const char* argv[] );
-          inline Rose_STL_Container<std::string> generateArgListFromArgcArgv ( int argc, char* argv[] ) {return generateArgListFromArgcArgv(argc, (const char**)argv);}
-          /// Convert a string vector back to an arc-argv pair
+	  
+          inline Rose_STL_Container<std::string> generateArgListFromArgcArgv ( int argc, char* argv[] ) 
+	  {return generateArgListFromArgcArgv(argc, (const char**)argv);}
+	  
+          //! Convert a string vector back to an argc-argv pair
           void generateArgcArgvFromList ( Rose_STL_Container<std::string> argList, int & argc, char** & argv );
 
           Rose_STL_Container<std::string> generateOptionList ( Rose_STL_Container<std::string> & argList, std::string inputPrefix );
@@ -40,8 +44,9 @@
 
       //! Add the strings in argList to the command line represented by argc and argv, prepend 'prefix' to each of the arguments
           void addListToCommandLine ( std::vector<std::string> & argv , std::string prefix, Rose_STL_Container<std::string> argList );
-
+      //! Remove all options matching a specified prefix 'prefix' from the argument list 'argv'  
           void removeArgs ( std::vector<std::string> & argv, std::string prefix );
+      //! Remove all options matching a specified prefix 'prefix' from the argument list 'argv', as well as the option values following them
           void removeArgsWithParameters ( std::vector<std::string> & argv, std::string prefix );
 
           void removeAllFileNamesExcept ( std::vector<std::string> & argv, Rose_STL_Container<std::string> filenameList, std::string exceptFilename );

Modified: branches/testonly/src/util/graphs/BaseGraphCreate.h
===================================================================
--- branches/testonly/src/util/graphs/BaseGraphCreate.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/util/graphs/BaseGraphCreate.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -6,17 +6,20 @@
 #include <GraphAccess.h>
 #include <assert.h>
 
+//Both nodes and edges are multigraph elements (could be shared by mulitiple graphs) 
 typedef MultiGraphElemTemplate<void*> BaseGraphNode;
 typedef MultiGraphElemTemplate<void*> BaseGraphEdge;
 
+//Base interface of graph creation: create/delete nodes and edges
+// with additional interfaces to multigraph and graph access
 class BaseGraphCreate 
   : public MultiGraphCreate,
            GraphAccessTemplate<BaseGraphNode,BaseGraphEdge>
 {
  protected:
-  typedef GraphAccessTemplate<BaseGraphNode,BaseGraphEdge>
-      GraphAccessBase;
+  typedef GraphAccessTemplate<BaseGraphNode,BaseGraphEdge> GraphAccessBase;
  public:
+  //Arbitrary node and edge information
   typedef void* NodeContent;
   typedef void* EdgeContent;
   typedef GraphAccessBase::Node Node;
@@ -28,10 +31,8 @@
   virtual ~BaseGraphCreate() {}
 
   virtual BaseGraphNode* CreateNode(NodeContent _id) =0;
-  virtual BaseGraphEdge* 
-  CreateEdge(BaseGraphNode* src, BaseGraphNode *snk, EdgeContent _id)=0;
-  virtual void 
-  MoveEdgeEndPoint( BaseGraphEdge *e, BaseGraphNode *n, EdgeDirection dir)=0;
+  virtual BaseGraphEdge* CreateEdge(BaseGraphNode* src, BaseGraphNode *snk, EdgeContent _id)=0;
+  virtual void MoveEdgeEndPoint( BaseGraphEdge *e, BaseGraphNode *n, EdgeDirection dir)=0;
   virtual void DeleteNode( BaseGraphNode *n)=0;
   virtual void DeleteEdge( BaseGraphEdge *n)=0;
 
@@ -42,6 +43,7 @@
   GraphAccessBase::ContainEdge;
 };
 
+// A wrapper on top of a graph implementation to implement base graph create interface
 template <class GraphImpl>
 class BaseGraphCreateWrap : public BaseGraphCreate
 {
@@ -94,10 +96,12 @@
   typename GraphImpl::EdgeDirection
   TranslateDirection( GraphAccess::EdgeDirection dir) const
   { switch (dir) {
-   case GraphAccess::EdgeOut: return GraphImpl::EdgeOut;
-   case GraphAccess::EdgeIn: return GraphImpl::EdgeIn;
-   default:
-     assert(false);
+     case GraphAccess::EdgeOut: 
+       return GraphImpl::EdgeOut;
+     case GraphAccess::EdgeIn: 
+       return GraphImpl::EdgeIn;
+     default:
+       assert(false);
    }
   }
 

Modified: branches/testonly/src/util/graphs/DGBaseGraphImpl.h
===================================================================
--- branches/testonly/src/util/graphs/DGBaseGraphImpl.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/util/graphs/DGBaseGraphImpl.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -41,7 +41,7 @@
 { };
 
 
-// definition of DAGBaseGraphImpl
+// definition of DAGBaseGraphImpl: Directed Acyclic Graph
 class DAGBaseEdgeImpl;
 class DAGBaseNodeImpl
    : public DAGNode<DAGBaseNodeImpl,DAGBaseEdgeImpl>,

Modified: branches/testonly/src/util/graphs/GraphAccess.h
===================================================================
--- branches/testonly/src/util/graphs/GraphAccess.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/util/graphs/GraphAccess.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -6,7 +6,7 @@
 #define GRAPH_ACCESS_H
 
 #include <IteratorTmpl.h>
-
+//Provide edge directions and a reversing-edge-direction operation
 class GraphAccess {
  public:
   typedef enum {EdgeOut = 1, EdgeIn = 2, BiEdge = 3} EdgeDirection;
@@ -20,7 +20,7 @@
     }
 };
 
-// The graph access template
+// The graph access template: providing abstract iterator interface for nodes and edges
 template <class NodeImpl, class EdgeImpl>
 class GraphAccessTemplate : public GraphAccess
 {
@@ -31,19 +31,20 @@
   typedef IteratorWrap<Node*,IteratorImpl<Node*> > NodeIterator;
 
   virtual ~GraphAccessTemplate() {}
-  virtual NodeIterator GetNodeIterator() const = 0; // iterator to all nodes
-  virtual EdgeIterator   // the iterator to all edges incident to node n
-  GetNodeEdgeIterator(const Node* n, EdgeDirection dir) const=0;
-  virtual Node*  // the source or sink of edge e
-  GetEdgeEndPoint( const Edge* e, EdgeDirection dir) const = 0;
+  // iterator to all nodes
+  virtual NodeIterator GetNodeIterator() const = 0; 
+  // the iterator to all edges associated with node n and have a direction 'dir'
+  virtual EdgeIterator GetNodeEdgeIterator(const Node* n, EdgeDirection dir) const=0;
+  // the source or sink of edge e
+  virtual Node* GetEdgeEndPoint( const Edge* e, EdgeDirection dir) const = 0;
   virtual bool ContainNode(const Node* n) const = 0; // whether graph contains n
   virtual bool ContainEdge(const Edge* e) const = 0; // whether graph contains e
   virtual std::string nodeToString(Node* n) const { return ""; }
   virtual std::string edgeToString(Edge* n) const { return ""; }
 };
 
-// this template class builds a bridge to GraphAccess interface 
-// from a concrete graph implementaion. 
+// this template class builds a wrapper on top of a graph implementaion 
+// to implment GraphAccess interface 
 template <class NodeBase, class EdgeBase, class GraphImpl>
 class GraphAccessWrapTemplate : public GraphAccessTemplate<NodeBase,EdgeBase>
 {

Modified: branches/testonly/src/util/graphs/MultiGraphCreate.h
===================================================================
--- branches/testonly/src/util/graphs/MultiGraphCreate.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/util/graphs/MultiGraphCreate.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -4,21 +4,25 @@
 
 #include <stdlib.h>
 #include <assert.h>
-
+/*
+An element (could be a node or an edge) which can belong to more than one graphs.
+*/
 class MultiGraphCreate;
 class MultiGraphElem 
 {
-  MultiGraphCreate *gc;
-  int count;
+  MultiGraphCreate *gc; // The owner graph of this element
+  int count;// Reference count of this element, >0 means shared by more than one graphs
  public:
   MultiGraphElem( MultiGraphCreate *c) : gc(c) { count = 0; }
   virtual ~MultiGraphElem() { assert( count == 0); }
 
   bool UnlinkGraphCreate( const MultiGraphCreate *c)
-       { if (gc != c) 
+       { // Decrement the reference count if not the original graph
+         if (gc != c) 
             count--;
-         else
+         else // (gc==c) Unlink the original 'owner' graph
             gc = 0;
+	 // Delete this elment if it is not used in any graph   
          if (gc == 0 && count == 0) {
              delete this;
             return true;
@@ -35,6 +39,44 @@
  friend class MultiGraphCreate;
 };
 
+/* Class Hierarchy for MultiGraphCreate. 
+
+MultiGraphCreate
+* BaseGraphCreate
+** DAGBaseGraphImpl
+** DGBaseGraphImpl
+
+* VirtualGraphCreateTemplate
+** CallGraphCreate
+
+** CFGImplTEmplate
+*** DataFlowAnalysis
+**** ReachingDefinitionAnalysis
+*** DefaultCFGImpl
+
+** CompSliceRegistry
+
+** DAGCreate
+
+** DefUseChain
+*** DefaultDUChain
+*** ValuePropagate
+
+** DepInfoGraphCreate
+*** CompSliceDepGraphCreate
+*** DepCompAstRefGraphCreate
+**** DepCompAstRefDAG
+*** LoopTreeDepGraphCreate
+
+** DepInfoSetGraphCreate
+
+** GroupGraphCreate
+*** SCCGraphCreate
+**** TransAnalSCCCreate
+
+** TransDepGraphCreate
+
+*/
 class MultiGraphCreate 
 {
  protected:
@@ -44,10 +86,12 @@
   bool UnlinkElem( void* n) {  return false; }
   bool LinkElem(void* n) { return false; }
  public:
+  // Check if this MultiGraphCreate owns the element
   bool ContainElem( const MultiGraphElem* e) const
           { return e->GetGraphCreate() == this; }
 };
 
+//A template class implementing mulitiGraphElem and storing arbitrary information.
 template <class Info>
 class MultiGraphElemTemplate : public MultiGraphElem
 {

Modified: branches/testonly/src/util/graphs/VirtualGraphCreate.h
===================================================================
--- branches/testonly/src/util/graphs/VirtualGraphCreate.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/util/graphs/VirtualGraphCreate.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -46,6 +46,7 @@
      bool ReachEnd() const { return baseIter.ReachEnd(); }
     friend class VirtualGraphCreateTemplate<NodeImpl,EdgeImpl>;
    };
+   
    class NodeIteratorImpl  : public IteratorImpl<NodeImpl*>
    {  
      const VirtualGraphCreateTemplate<NodeImpl,EdgeImpl> *gc;

Modified: branches/testonly/src/util/stringSupport/string_functions.C
===================================================================
--- branches/testonly/src/util/stringSupport/string_functions.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/util/stringSupport/string_functions.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -17,6 +17,7 @@
 #include <sstream>              /* std::ostringstream */
 
 #include "string_functions.h"
+#include <boost/lexical_cast.hpp>
 
 // DQ (9/29/2006): This is required for 64-bit g++ 3.4.4 compiler.
 #include <errno.h>
@@ -260,39 +261,39 @@
    }
 
 string
+StringUtility::numberToString ( long long x )
+   {
+     return boost::lexical_cast<std::string>(x);
+   }
+
+string
+StringUtility::numberToString ( unsigned long long x )
+   {
+     return boost::lexical_cast<std::string>(x);
+   }
+
+string
 StringUtility::numberToString ( long x )
    {
-  // Build a string representing the dimensionOfArrayStatement
-     std::ostringstream os;
-     os << x;
-     return os.str();
+     return boost::lexical_cast<std::string>(x);
    }
 
 string
 StringUtility::numberToString ( unsigned long x )
    {
-  // Build a string representing the dimensionOfArrayStatement
-     std::ostringstream os;
-     os << x;
-     return os.str();
+     return boost::lexical_cast<std::string>(x);
    }
 
 string
 StringUtility::numberToString ( int x )
    {
-  // Build a string representing the dimensionOfArrayStatement
-     std::ostringstream os;
-     os << x;
-     return os.str();
+     return boost::lexical_cast<std::string>(x);
    }
 
 string
 StringUtility::numberToString ( unsigned int x )
    {
-  // Build a string representing the dimensionOfArrayStatement
-     std::ostringstream os;
-     os << x;
-     return os.str();
+     return boost::lexical_cast<std::string>(x);
    }
 
 #if 0
@@ -1249,3 +1250,20 @@
   os << "0x" << std::hex << i;
   return os.str();
 }
+
+
+string
+StringUtility::convertToLowerCase( const string & inputString )
+   {
+  // DQ (11/12/2008): Used to convert module names to lower case.
+
+  // printf ("Before conversion to lower case: inputString = %s \n",inputString.c_str());
+     string returnString = inputString;
+     for (int i=0; i < returnString.length(); i++)
+        {
+          returnString[i] = tolower(returnString[i]);
+        }
+  // printf ("After conversion to lower case: returnString = %s \n",returnString.c_str());
+
+     return returnString;
+   }

Modified: branches/testonly/src/util/stringSupport/string_functions.h
===================================================================
--- branches/testonly/src/util/stringSupport/string_functions.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/util/stringSupport/string_functions.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -100,6 +100,8 @@
        //! Substring replacement function
            std::string copyEdit ( const std::string& inputString, const std::string & oldToken, const std::string & newToken );
        //! Convert a number to a string
+           std::string numberToString ( long long x );
+           std::string numberToString ( unsigned long long x );
            std::string numberToString ( long x );
            std::string numberToString ( unsigned long x );
            std::string numberToString ( int x );
@@ -166,6 +168,9 @@
        //  unsigned short int chksum(char *buffer, int len);
            unsigned long generate_checksum( std::string s );
 
+       //! Convert string to lower case (e.g. for module file name generation).
+           std::string convertToLowerCase( const std::string & inputString );
+
 //--------------------------------------------------------------
 //@{
 /*! @name File name strings

Modified: branches/testonly/src/util/support/BitVectorRepr.h
===================================================================
--- branches/testonly/src/util/support/BitVectorRepr.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/util/support/BitVectorRepr.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -6,14 +6,17 @@
 #include <DoublyLinkedList.h>
 #include <assert.h>
 #include <sstream>
-
+// Using an array of unsigned integers to simulate a bit vector, 
+// Bit index is translated into a block (the memory block for an unsigned integer) index and a block offset.
 class BitVectorReprImpl {
   unsigned* impl;
-  unsigned  num;
+  unsigned  num; 
   
   void operator = ( const BitVectorReprImpl& that)
   {}
  public:
+  // Constructor: allocating the integer array of an enough length to hold 'size' bits
+  // initializing all bits to 0
   BitVectorReprImpl( unsigned size)
     { 
       unsigned intsize = sizeof(unsigned);
@@ -23,6 +26,7 @@
 	impl[i] = 0;
       }
     }
+  // Copy constructor  
   BitVectorReprImpl( const BitVectorReprImpl& that)
     : num(that.num)
     {
@@ -86,14 +90,16 @@
       unsigned mask = 1 << i2;
       return impl[i1] & mask;
     }
+  //Set the index-th bit of the bit vector to 1
   void add_member( unsigned index)  
     {
       unsigned intsize = sizeof(unsigned);
-      int i1 = index / intsize;
-      int i2 = index % intsize;
+      int i1 = index / intsize; // block index
+      int i2 = index % intsize; // offset in the block
       unsigned mask = 1 << i2;
       impl[i1] |= mask;
     }
+   //Set the index-th bit to 0
   void delete_member( unsigned index)
     {
       unsigned intsize = sizeof(unsigned);
@@ -103,7 +109,7 @@
       impl[i1] &= mask;
     }
 };
-
+// Bit vector implementation with reference counting for self memory management
 class BitVectorRepr : public CountRefHandle<BitVectorReprImpl>
 {
  public:
@@ -142,7 +148,7 @@
   std::string toString() const
     { return ConstRef().toString();  }
 };
-
+// Associating a variable's name and information with a (bit vector) index
 template <class Name, class Data>
 class BitVectorReprBase 
 {
@@ -154,6 +160,7 @@
       : data(d), name(n), index(i) {}
   };
   typedef DoublyLinkedListWrap<DataEntry> DataList;
+  // A map between a named variable and a pointer to its first DataEntry
   typedef std::map<Name, DoublyLinkedEntryWrap<DataEntry>* > DataMap;
   
   DataList datalist;
@@ -185,12 +192,15 @@
 	DoublyLinkedEntryWrap<DataEntry>* cur = datalist.AppendLast(DataEntry(n,d));
 	datamap[n] = cur;
       }
-      else {
+      else { 
+      // Allowing multiple data entries for the same variable:
+      // such as a variable's definitions appearing in mulitple places in CFG
 	DoublyLinkedEntryWrap<DataEntry>* lp = (*mp).second;
 	assert( lp->GetEntry().name == n);
 	datalist.InsertAfter( DataEntry(n,d), lp); 
       }
     }
+  //Set the index for all data entries  
   void finalize() 
     {
       unsigned index = 0;
@@ -216,7 +226,7 @@
   int get_index( iterator p) const
     { return (*p).index; }
 };
-
+// Associating linked data entries with a bit vector
 template <class Name, class Data>
 class BitVectorReprGenerator
 {
@@ -224,30 +234,33 @@
  public:
   BitVectorReprGenerator( const BitVectorReprBase<Name,Data>& b)
     : base(b) {}
+  //Returning an empty bit vector for the linked data entries  
   BitVectorRepr get_empty_set() const
     {  return BitVectorRepr(base.size()); }
+
+  // Returning a bit vector with the corresponding bits turned on for 
+  // the entries in the link for a named variable
   BitVectorRepr get_data_set( const Name& name) const
     {
       BitVectorRepr result(base.size());
-      for (typename BitVectorReprBase<Name,Data>::iterator p 
-	     = base.find(name);
+      for (typename BitVectorReprBase<Name,Data>::iterator p = base.find(name);
 	   p != base.end() && base.get_name(p) == name; ++p) {
 	int i = base.get_index( p );
 	result.add_member(i);
       }
       return result;
     }
-  
+  // Turn the bit representing entry(name,d) to 1, if the entry is stored in the linked list
   void add_member( BitVectorRepr& repr, const Name& name, const Data& d) const
     {
       typename BitVectorReprBase<Name,Data>::iterator p = base.find(name);
       if (p == base.end()) {
-           std::cerr << "Error: cannot find variable " << name << "\n";
+           std::cerr << "Error: BitVectorReprGenerator<T1,T2>::add_member() cannot find variable " << name << "\n";
            assert(false);
       }
       for ( ;  p != base.end() && base.get_data(p) != d; ++p); 
       if (p == base.end()) {
-           std::cerr << "Error: cannot find data " << " for variable " << name << "\n";
+           std::cerr << "Error: BitVectorReprGenerator<T1,T2>::add_member() cannot find data " << " for variable " << name << "\n";
            assert(false);
       }
       repr.add_member( base.get_index(p));
@@ -261,7 +274,7 @@
       assert( p != base.end());
       repr.delete_member(base.get_index(p));
     }
-  
+  // Finding all 1-valued bits in a bit vector 'repr', storing their corresponding data into 'collect'
   void collect_member( const BitVectorRepr& repr, 
 		       CollectObject<Data>& collect) const
     {

Modified: branches/testonly/src/util/support/CommandOptions.h
===================================================================
--- branches/testonly/src/util/support/CommandOptions.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/util/support/CommandOptions.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -3,7 +3,8 @@
 #include <string>
 #include <vector>
 #include <iostream>
-
+//! Old class for command option handling. 
+//Please use the better src/util/commandlineProcessing/commandline_processing.h instead
 class CmdOptions
 {
   static CmdOptions *inst;

Modified: branches/testonly/src/util/support/CountRefHandle.h
===================================================================
--- branches/testonly/src/util/support/CountRefHandle.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/util/support/CountRefHandle.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -3,7 +3,7 @@
 #define COUNT_REF_HANDLE
 
 #include <stdlib.h>
-
+// Self-memory management using a reference counter
 template  <class T>
 class CountRefHandle 
 {
@@ -15,20 +15,26 @@
    void DecreaseUse() 
        { 
          if (count == 0);
-         else if ((*count) > 1) (*count)--; 
-         else {
-           delete count;
-           delete obj;
-           count = 0;
-           obj = 0; 
-         }
+         else 
+	   if ((*count) > 1)
+	     (*count)--; 
+           else //Free the object when the reference count decreases to 0
+	   {
+             delete count;
+             delete obj;
+             count = 0;
+             obj = 0; 
+           }
        }
    int RefCount() { return (count == 0)? 0 : *count; }
   
  protected:
    const T* ConstPtr() const { return obj;}
+   //We do want to modify obj in rare cases
+   T* NonConstPtr() const { return obj;}
    T* UpdatePtr()
-    { if (RefCount() > 1) {
+    { 
+      if (RefCount() > 1) {
         DecreaseUse();
         obj = obj->Clone();
         Init();
@@ -37,6 +43,7 @@
      }
 
    const T& ConstRef() const { return *obj; }
+   T& NonConstRef() const { return *obj; }
    T& UpdateRef() { return *UpdatePtr(); }
 
  public:
@@ -48,8 +55,10 @@
    CountRefHandle<T> & operator = ( const CountRefHandle <T> &that)
       { 
         DecreaseUse(); 
-        obj = that.obj; count = that.count;
-        IncreaseUse(); return *this; 
+        obj = that.obj; 
+	count = that.count;
+        IncreaseUse(); 
+	return *this; 
       }
    ~CountRefHandle <T> () 
         {  DecreaseUse(); }

Modified: branches/testonly/src/util/support/DirectedGraph.h
===================================================================
--- branches/testonly/src/util/support/DirectedGraph.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/util/support/DirectedGraph.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -5,18 +5,21 @@
 #include <DoublyLinkedList.h>
 #include <assert.h>
 #include <iostream>
-
+// Provide edge direction
 class DirectedEdgeInterface
 { public:
    typedef enum {EdgeOut = 0, EdgeIn = 1} EdgeDirection;
 };
 template <class Node, class Edge> class DirectedGraph;
 template <class Node, class Edge> class DirectedGraphEdge;
+
 template <class Node, class Edge>
 class DirectedGraphNode 
-{ 
+{  // Out and In edges
    DoublyLinkedListWrap <Edge*> edges[2];
+   // Pointer to all nodes ??
    DoublyLinkedEntryWrap<Node*> *entry;
+   // Pointer to the owner graph
    DirectedGraph<Node,Edge> *graph;  
  public:
    typedef DirectedEdgeInterface::EdgeDirection EdgeDirection;
@@ -40,7 +43,7 @@
 
 template <class Node, class Edge>
 class DirectedGraphEdge
-{
+{ // 'out' and 'in' nodes
   Node* nodes[2];
   DoublyLinkedEntryWrap<Edge*> *entries[2];
  public:

Modified: branches/testonly/src/util/support/FunctionObject.h
===================================================================
--- branches/testonly/src/util/support/FunctionObject.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/util/support/FunctionObject.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -33,7 +33,8 @@
    virtual bool operator()(const T1& t1, const T2& t2) const  = 0;
    virtual ~Select2Object() {}
 };
-
+//!A container interface to add elements only
+// operator() does the adding operation and its implementation should be provided in its sub classes, such as CollectDoublyLinkedList
 template <class T> class CollectObject
 {
   public:

Modified: branches/testonly/src/util/support/SinglyLinkedList.h
===================================================================
--- branches/testonly/src/util/support/SinglyLinkedList.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/util/support/SinglyLinkedList.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -69,6 +69,7 @@
        }
        return e;
      }
+     //! Prepend an entry to a list
      SinglyLinkedEntryWrap<T>* PushFirst( const T& o )
      {
        ++count;

Modified: branches/testonly/src/util/support/union_find.h
===================================================================
--- branches/testonly/src/util/support/union_find.h	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/src/util/support/union_find.h	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,5 +1,8 @@
 // Define union-find style groups
-
+// two sets: x1->x1(point-to-self)  and y1->y2->y3(point-to-self) 
+// after union 
+//   x1->x1->y3  
+//    y1->y2->y3(point-to-self) 
 #ifndef UNION_FIND_h
 #define UNION_FIND_h
 
@@ -12,19 +15,22 @@
    UF_elem *p_group;
    unsigned size;
  public:
+   // Create a set containing a single element. Its group id is a pointer to itself
    UF_elem () : p_group(this), size(1) {}
    UF_elem (const UF_elem& that)  // no copying, can only modify using union_with 
     : p_group(this), size(1) {}
- 
+   // Check if two elements belong to the same group
    bool in_same_group(UF_elem *that) 
      {
        return find_group() == that->find_group();
      }
+   // Union with another element's group  
    void union_with(UF_elem *that)
      {
+       // Skip if two elements are already within the same group
        UF_elem *p1 = find_group(), *p2 = that->find_group();
        if (p1 == p2) return;
-       
+       // Set the group id of smaller group to the larger group's group id      
        if (p1->size < p2->size) {
 	 p1->p_group = p2;
 	 p2->size += p1->size;
@@ -34,6 +40,7 @@
 	 p1->size += p2->size;
        }
      } 
+   // Return the top group link: self-pointing  
    UF_elem * find_group()
    {
      if (this->p_group == this->p_group->p_group)

Modified: branches/testonly/tests/CompileTests/Fortran_tests/Makefile.am
===================================================================
--- branches/testonly/tests/CompileTests/Fortran_tests/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/Fortran_tests/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -356,6 +356,14 @@
 
 if ROSE_USE_OPEN_FORTRAN_PARSER
 
+# Go back and build the translator we are using to test Fortran (in case make check 
+# is run directly in this directory before make has been run from the root of the 
+# ROSE directory structure).  This does not appear to work!
+../../testTranslator:
+	cd ../..; $(MAKE) testTranslator
+
+testTranslator: ../../testTranslator
+
 $(TEST_F90_Objects): ../../testTranslator ${ALL_TESTCODES}
 # $(TEST_F90_Objects): ../../testTranslator
 # Example of how to call the OpenFortranParser
@@ -398,7 +406,18 @@
 # Include makefile rules specific to QMTest
 include $(top_srcdir)/config/QMTest_makefile.inc
 
+# DQ (11/11/2008): Module test copied from developersScratchSpace/Dan/Fortran_tests
+# This file declares a module used by module_B_file.f90
+module_A_file.o: testTranslator
+	$(VALGRIND) ../../testTranslator $(ROSE_FLAGS) -I$(srcdir) -c $(srcdir)/$(@:.o=.f90)
 
+# Force representation of module dependency so that mod files are properly generated before use.
+module_B_file.o: testTranslator module_A_file.o
+	$(VALGRIND) ../../testTranslator $(ROSE_FLAGS) -I$(srcdir) -c $(srcdir)/$(@:.o=.f90)
+
+# We will build a larger collection of module tests soon (supported by makefile dependence rules).
+PASSING_MODULE_TEST_Objects = module_B_file.o
+
 testSuffixRules:
 	java parser.java.FortranMain --dump $(srcdir)/test2007_suffixTest_01.f
 	../../testTranslator $(ROSE_FLAGS) -c $(srcdir)/test2007_suffixTest_01.f
@@ -428,6 +447,7 @@
 #  Run this test explicitly since it has to be run using a specific rule and can't be lumped with the rest
 #	These Fortran programs must be called externally to the test codes in the "TESTCODES" make variable
 	@$(MAKE) $(PASSING_TEST_Objects)
+	@$(MAKE) $(PASSING_MODULE_TEST_Objects)
 	@echo "***************************************************************************************************"
 	@echo "****** ROSE/tests/CompileTests/Fortran_tests: make check rule complete (terminated normally) ******"
 	@echo "***************************************************************************************************"
@@ -450,10 +470,10 @@
 EXTRA_DIST = $(ALL_F77_FIXED_FORMAT_TESTCODES) $(ALL_F77_TESTCODES) $(ALL_F90_TESTCODES) $(ALL_F03_TESTCODES) \
    test2007_suffixTest_01.f test2007_suffixTest_02.f77 test2007_suffixTest_03.f90 test2007_suffixTest_04.f95 \
    test2007_suffixTest_05.f03 test2007_suffixTest_06.F test2007_suffixTest_07.F90 test2007_suffixTest_08.F95 \
-   test2007_suffixTest_09.F03 test2007_suffixTest_10.F08 test2007_suffixTest_11.f08
+   test2007_suffixTest_09.F03 test2007_suffixTest_10.F08 test2007_suffixTest_11.f08 module_A_file.f90 module_B_file.f90
 
 clean-local:
-	rm -f *.o rose_*.f*
+	rm -f *.o rose_*.f* *.rmod
 	rm -f *.s *.mod rose_*.f rose_*.f77 rose_*.f90 rose_*.f95 rose_*.f03 *.dot *.pdf *~ *.ps *.out *.log rose_performance_report_lockfile.lock
 	rm -rf QMTest
 

Copied: branches/testonly/tests/CompileTests/Fortran_tests/module_A_file.f90 (from rev 128, trunk/tests/CompileTests/Fortran_tests/module_A_file.f90)
===================================================================
--- branches/testonly/tests/CompileTests/Fortran_tests/module_A_file.f90	                        (rev 0)
+++ branches/testonly/tests/CompileTests/Fortran_tests/module_A_file.f90	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,15 @@
+! DQ (11/10/2008): Note module names use file name prefix to for use of 
+! unique names and avoid race conditions in mod file generation.
+module module_A_file_module_A
+
+   implicit none
+   private
+   save
+
+ ! This variable "r8" will be used a a kind parameter in the rest of the application
+ !  integer, parameter, public :: r8 = selected_real_kind(13)
+
+   integer x
+
+end module module_A_file_module_A
+

Copied: branches/testonly/tests/CompileTests/Fortran_tests/module_B_file.f90 (from rev 128, trunk/tests/CompileTests/Fortran_tests/module_B_file.f90)
===================================================================
--- branches/testonly/tests/CompileTests/Fortran_tests/module_B_file.f90	                        (rev 0)
+++ branches/testonly/tests/CompileTests/Fortran_tests/module_B_file.f90	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,19 @@
+! DQ (11/10/2008): Note module names use file name prefix to for use of 
+! unique names and avoid race conditions in mod file generation.
+module module_B_file_module_B
+
+   use module_A_file_module_A
+
+   implicit none
+   private
+   save
+
+ ! This means build a real type like "r8" defined in module "module_A"
+ ! Note: it is a current bug that the initializer is unparsed as "0.0" instead of "0.0_r8"
+ !  real (r8), parameter, public :: c0 = 0.0_r8
+
+  integer y
+
+end module module_B_file_module_B
+
+

Modified: branches/testonly/tests/CompileTests/Fortran_tests/test2007_176.f03
===================================================================
--- branches/testonly/tests/CompileTests/Fortran_tests/test2007_176.f03	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/Fortran_tests/test2007_176.f03	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,4 +1,4 @@
-      module mod1
+      module test2007_176_mod1
           integer, protected :: val
           integer :: age
           protected :: age
@@ -13,7 +13,7 @@
               end subroutine
       end module
       program dt_init01
-          use mod1
+          use test2007_176_mod1
           implicit none
           integer :: value, his_age
           call set_val(88)

Modified: branches/testonly/tests/CompileTests/Fortran_tests/test2007_236.f90
===================================================================
--- branches/testonly/tests/CompileTests/Fortran_tests/test2007_236.f90	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/Fortran_tests/test2007_236.f90	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,15 +1,15 @@
 ! user defined operator not supported
-MODULE TEST
-       INTERFACE OPERATOR (+)
-       END INTERFACE
-       INTERFACE OPERATOR (-)
-       END INTERFACE
-       INTERFACE OPERATOR (*)
-       END INTERFACE
-       INTERFACE OPERATOR (/)
-       END INTERFACE
-       INTERFACE OPERATOR (.SIN.)
-       END INTERFACE
-       INTERFACE ASSIGNMENT(=)
-       END INTERFACE
-END MODULE TEST
+MODULE test2007_236_TEST
+   INTERFACE OPERATOR (+)
+   END INTERFACE
+   INTERFACE OPERATOR (-)
+   END INTERFACE
+   INTERFACE OPERATOR (*)
+   END INTERFACE
+   INTERFACE OPERATOR (/)
+   END INTERFACE
+   INTERFACE OPERATOR (.SIN.)
+   END INTERFACE
+   INTERFACE ASSIGNMENT(=)
+   END INTERFACE
+END MODULE test2007_236_TEST

Modified: branches/testonly/tests/CompileTests/Fortran_tests/test2007_250.f90
===================================================================
--- branches/testonly/tests/CompileTests/Fortran_tests/test2007_250.f90	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/Fortran_tests/test2007_250.f90	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,6 +1,8 @@
-module TEST
+! DQ (11/10/2008): Note module names use file name prefix to for use of 
+! unique names and avoid race conditions in mod file generation.
+module test2007_250_TEST
 end module
 
-use TEST
+use test2007_250_TEST
 END
 

Modified: branches/testonly/tests/CompileTests/Fortran_tests/test2007_258.f
===================================================================
--- branches/testonly/tests/CompileTests/Fortran_tests/test2007_258.f	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/Fortran_tests/test2007_258.f	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,8 +1,9 @@
-      MODULE MAIN_MODULE
-      IMPLICIT NONE
-      INTEGER i
-      CONTAINS
-        SUBROUTINE TEST(i)
-        REAL :: i
-        END SUBROUTINE
-      END MODULE
+C      Fixed format example using F90 constructs (module).
+       MODULE test2007_258_MAIN_MODULE
+       IMPLICIT NONE
+       INTEGER i
+       CONTAINS
+          SUBROUTINE TEST(i)
+             REAL :: i
+          END SUBROUTINE
+       END MODULE

Modified: branches/testonly/tests/CompileTests/Fortran_tests/test2007_33.f90
===================================================================
--- branches/testonly/tests/CompileTests/Fortran_tests/test2007_33.f90	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/Fortran_tests/test2007_33.f90	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,6 +1,8 @@
-module test
+! DQ (11/10/2008): Note module names use file name prefix to for use of 
+! unique names and avoid race conditions in mod file generation.
+module test2007_33_test
 
 integer :: i
 PRIVATE :: i
 
-end module test
+end module test2007_33_test

Modified: branches/testonly/tests/CompileTests/Fortran_tests/test2007_37.f03
===================================================================
--- branches/testonly/tests/CompileTests/Fortran_tests/test2007_37.f03	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/Fortran_tests/test2007_37.f03	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,6 +1,6 @@
-module test
+module test2007_37_test
 
 integer :: i
 protected :: i
 
-end module test
+end module test2007_37_test

Modified: branches/testonly/tests/CompileTests/Fortran_tests/test2007_40.f90
===================================================================
--- branches/testonly/tests/CompileTests/Fortran_tests/test2007_40.f90	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/Fortran_tests/test2007_40.f90	2008-11-18 06:54:05 UTC (rev 129)
@@ -4,10 +4,12 @@
 !   end subroutine foo
 !end interface test
 
-module test
+! DQ (11/10/2008): Note module names use file name prefix to for use of 
+! unique names and avoid race conditions in mod file generation.
+module test2007_40_test
 interface A
   subroutine foo()
     integer :: i 
   end subroutine foo
 end interface A
-end module test
+end module test2007_40_test

Modified: branches/testonly/tests/CompileTests/Fortran_tests/test2007_41.f03
===================================================================
--- branches/testonly/tests/CompileTests/Fortran_tests/test2007_41.f03	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/Fortran_tests/test2007_41.f03	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,4 +1,4 @@
-module test
+module test2007_41_test
    interface test_interface
       subroutine foo (i)
          import
@@ -8,4 +8,4 @@
     ! end subroutine sub
       end subroutine foo
    end interface test_interface
-end module test
+end module test2007_41_test

Modified: branches/testonly/tests/CompileTests/Makefile.am
===================================================================
--- branches/testonly/tests/CompileTests/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -10,7 +10,7 @@
      C_tests C99_tests UPC_tests Cxx_tests C_subset_of_Cxx_tests \
      Fortran_tests copyAST_tests RoseExample_tests PythonExample_tests \
      colorAST_tests mergeAST_tests unparseToString_tests \
-     sourcePosition_tests \
+     sourcePosition_tests OpenMP_tests \
      OpenMP_C_tests boost_tests virtualCFG_tests uninitializedField_tests \
      A++Tests OvertureCode P++Tests A++Code ElsaTestCases \
      ExpressionTemplateExample_tests hiddenTypeAndDeclarationListTests

Copied: branches/testonly/tests/CompileTests/OpenMP_tests (from rev 128, trunk/tests/CompileTests/OpenMP_tests)

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/3loops.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/3loops.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/3loops.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,19 +0,0 @@
-#include <stdio.h>
-#if defined (_OPENMP)
-#include <omp.h>
-#endif
-
-int main(void)
-{
-int i,jj,kkk;
-double a[10][9][8];
-
-#pragma omp parallel for
-for(i=0;i<10;i++){
- for(jj=0;jj<9;jj++){
-   for (kkk=0;kkk<8;kkk++){
-      a[i][jj][kkk]=9.9;
-      printf("a[%d][%d][%d]=%f ",i,jj,kkk,a[i][jj][kkk]);
-  } }}
-
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/3loops.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/3loops.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/3loops.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/3loops.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,19 @@
+#include <stdio.h>
+#if defined (_OPENMP)
+#include <omp.h>
+#endif
+
+int main(void)
+{
+int i,jj,kkk;
+double a[10][9][8];
+
+#pragma omp parallel for
+for(i=0;i<10;i++){
+ for(jj=0;jj<9;jj++){
+   for (kkk=0;kkk<8;kkk++){
+      a[i][jj][kkk]=9.9;
+      printf("a[%d][%d][%d]=%f ",i,jj,kkk,a[i][jj][kkk]);
+  } }}
+
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/Makefile.am
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,107 +0,0 @@
-include $(top_srcdir)/config/Makefile.for.ROSE.includes.and.libs
-
-noinst_PROGRAMS = parseOmp
-parseOmp_SOURCES = parseOmp.C
-
-INCLUDES = $(ROSE_INCLUDES)
-LDADD    = $(LIBS_WITH_RPATH) $(ROSE_LIBS)
-
-C_TESTCODES_REQUIRED_TO_PASS = \
-	3loops.c \
-	atomic.c \
-	collapse.c \
-	copyin.c \
-	copyprivate2.c \
-	copyprivate3.c \
-	copyprivate.c \
-	critical.c \
-	critical_dead.c \
-	critical_orphaned.c \
-	dynamicChunk.c \
-	empty.c \
-	expressions.c \
-	falsesharing.c \
-	firstlastprivate.c \
-	flush.c \
-	get_max_threads.c \
-	hello.c \
-	hello-ordered.c \
-	lastprivate0.c \
-	lastprivate.c \
-	limits_threads.c \
-	lockarray.c \
-	lu_factorization.c \
-	masterSingle.c \
-	matrix_vector.c \
-	nestedpar1.c \
-	nestedpar.c \
-	omp1.c \
-	ompfor.c \
-	ordered2.c \
-	ordered.c \
-	orphaned-directives.c \
-	parallel.c \
-	parallelfor.c \
-	private.c \
-	privatej.c \
-	recursive.c \
-	reduction2.c \
-	reduction.c \
-	section.c \
-	set_num_threads.c \
-	single_copyprivate.c \
-	spmd1.c \
-	staticChunk.c \
-	subteam2.c \
-	subteam.c \
-	task_largenumber.c \
-	task_orphaned.c \
-	task_untied.c \
-	task_underIf.c \
-	task_wait.c \
-	threadprivate2.c \
-	threadprivate3.c \
-	threadprivate.c \
-	threadProcessor.c \
-	variables.c
-
-CXX_TESTCODES_REQUIRED_TO_PASS = \
-	task_link.cpp \
-	task_tree.cpp 
-
-TESTCODE_CURRENTLY_FAILING =  
-
-ROSE_FLAGS = -rose:openmp --edg:no_warnings -w -rose:verbose 0 --edg:restrict
-# used to find omp.h, added it as one of  rose headers
-TESTCODE_INCLUDES = ${ROSE_INCLUDES}
-
-PASSING_C_TEST_Objects = $(C_TESTCODES_REQUIRED_TO_PASS:.c=.o)
-
-PASSING_CXX_TEST_Objects = $(CXX_TESTCODES_REQUIRED_TO_PASS:.cpp=.o)
-
-$(PASSING_C_TEST_Objects): %.o: $(srcdir)/%.c parseOmp
-	./parseOmp $(ROSE_FLAGS) $(TESTCODE_INCLUDES) -c $<
-
-$(PASSING_CXX_TEST_Objects): %.o: $(srcdir)/%.cpp parseOmp
-	./parseOmp ${ROSE_FLAGS} ${TESTCODE_INCLUDES} -c $<
-
-ALL_TESTCODES = \
-$(C_TESTCODES_REQUIRED_TO_PASS) \
-$(CXX_TESTCODES_REQUIRED_TO_PASS) \
-$(TESTCODE_CURRENTLY_FAILING)
-
-
-check-local:
-	@echo "Test for ROSE OpenMP Parser."
-	@$(MAKE) $(PASSING_C_TEST_Objects) 
-	@$(MAKE) $(PASSING_CXX_TEST_Objects)
-	@echo "***********************************************************************************************************"
-	@echo "****** ROSE/tests/CompileTests/OpenMP_tests: make check rule complete (terminated normally) ******"
-	@echo "***********************************************************************************************************"
-
-EXTRA_DIST = $(ALL_TESTCODES) README
-
-clean-local:
-	rm -f *.o rose_*.* *.out
-	rm -rf QMTest
-	

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/Makefile.am (from rev 128, trunk/tests/CompileTests/OpenMP_tests/Makefile.am)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/Makefile.am	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,107 @@
+include $(top_srcdir)/config/Makefile.for.ROSE.includes.and.libs
+
+noinst_PROGRAMS = parseOmp
+parseOmp_SOURCES = parseOmp.C
+
+INCLUDES = $(ROSE_INCLUDES)
+LDADD    = $(LIBS_WITH_RPATH) $(ROSE_LIBS)
+
+C_TESTCODES_REQUIRED_TO_PASS = \
+	3loops.c \
+	atomic.c \
+	collapse.c \
+	copyin.c \
+	copyprivate2.c \
+	copyprivate3.c \
+	copyprivate.c \
+	critical.c \
+	critical_dead.c \
+	critical_orphaned.c \
+	dynamicChunk.c \
+	empty.c \
+	expressions.c \
+	falsesharing.c \
+	firstlastprivate.c \
+	flush.c \
+	get_max_threads.c \
+	hello.c \
+	hello-ordered.c \
+	lastprivate0.c \
+	lastprivate.c \
+	limits_threads.c \
+	lockarray.c \
+	lu_factorization.c \
+	masterSingle.c \
+	matrix_vector.c \
+	nestedpar1.c \
+	nestedpar.c \
+	omp1.c \
+	ompfor.c \
+	ordered2.c \
+	ordered.c \
+	orphaned-directives.c \
+	parallel.c \
+	parallelfor.c \
+	private.c \
+	privatej.c \
+	recursive.c \
+	reduction2.c \
+	reduction.c \
+	section.c \
+	set_num_threads.c \
+	single_copyprivate.c \
+	spmd1.c \
+	staticChunk.c \
+	subteam2.c \
+	subteam.c \
+	task_largenumber.c \
+	task_orphaned.c \
+	task_untied.c \
+	task_underIf.c \
+	task_wait.c \
+	threadprivate2.c \
+	threadprivate3.c \
+	threadprivate.c \
+	threadProcessor.c \
+	variables.c
+
+CXX_TESTCODES_REQUIRED_TO_PASS = \
+	task_link.cpp \
+	task_tree.cpp 
+
+TESTCODE_CURRENTLY_FAILING =  
+
+ROSE_FLAGS = -rose:openmp --edg:no_warnings -w -rose:verbose 0 --edg:restrict
+# used to find omp.h, added it as one of  rose headers
+TESTCODE_INCLUDES = ${ROSE_INCLUDES}
+
+PASSING_C_TEST_Objects = $(C_TESTCODES_REQUIRED_TO_PASS:.c=.o)
+
+PASSING_CXX_TEST_Objects = $(CXX_TESTCODES_REQUIRED_TO_PASS:.cpp=.o)
+
+$(PASSING_C_TEST_Objects): %.o: $(srcdir)/%.c parseOmp
+	./parseOmp $(ROSE_FLAGS) $(TESTCODE_INCLUDES) -c $<
+
+$(PASSING_CXX_TEST_Objects): %.o: $(srcdir)/%.cpp parseOmp
+	./parseOmp ${ROSE_FLAGS} ${TESTCODE_INCLUDES} -c $<
+
+ALL_TESTCODES = \
+$(C_TESTCODES_REQUIRED_TO_PASS) \
+$(CXX_TESTCODES_REQUIRED_TO_PASS) \
+$(TESTCODE_CURRENTLY_FAILING)
+
+
+check-local:
+	@echo "Test for ROSE OpenMP Parser."
+	@$(MAKE) $(PASSING_C_TEST_Objects) 
+	@$(MAKE) $(PASSING_CXX_TEST_Objects)
+	@echo "***********************************************************************************************************"
+	@echo "****** ROSE/tests/CompileTests/OpenMP_tests: make check rule complete (terminated normally) ******"
+	@echo "***********************************************************************************************************"
+
+EXTRA_DIST = $(ALL_TESTCODES) README
+
+clean-local:
+	rm -f *.o rose_*.* *.out
+	rm -rf QMTest
+	

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/README
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/README	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/README	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,22 +0,0 @@
-This is a project to 
-* use Flex/Bison to parse OpenMP pragmas based on Markus's contributions
-* support the latest OpenMP 3.0 syntax
-* refine the OmpAttribute data structure to separate interface from implementation
-
-File List:
-
-* OpenMP persistent attributes:  OmpAttribute.C and OmpAttribute.h
-  Moved to src/frontend/SageIII
-
-* Flex scanner:   omplexer.ll (omplexer.cc )
-  Bison parser:   ompparser.yy (ompparser.cc, ompparser.h)
-
-  Moved to src/frontend/CxxFrontend/EDG_SAGE_Connection
-
-* test parser:    parseOmp.C 
-
-By Liao, 9/19/2008
-Latest modified: 10/28/2008
-
-
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/README (from rev 128, trunk/tests/CompileTests/OpenMP_tests/README)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/README	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/README	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,22 @@
+This is a project to 
+* use Flex/Bison to parse OpenMP pragmas based on Markus's contributions
+* support the latest OpenMP 3.0 syntax
+* refine the OmpAttribute data structure to separate interface from implementation
+
+File List:
+
+* OpenMP persistent attributes:  OmpAttribute.C and OmpAttribute.h
+  Moved to src/frontend/SageIII
+
+* Flex scanner:   omplexer.ll (omplexer.cc )
+  Bison parser:   ompparser.yy (ompparser.cc, ompparser.h)
+
+  Moved to src/frontend/CxxFrontend/EDG_SAGE_Connection
+
+* test parser:    parseOmp.C 
+
+By Liao, 9/19/2008
+Latest modified: 10/28/2008
+
+
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/atomic.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/atomic.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/atomic.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,13 +0,0 @@
-#include <omp.h>
-
-int main (void)
-{
-
-int a;
-#pragma omp parallel 
-{
-#pragma omp atomic
-  a+=1;
-}
-
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/atomic.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/atomic.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/atomic.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/atomic.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,13 @@
+#include <omp.h>
+
+int main (void)
+{
+
+int a;
+#pragma omp parallel 
+{
+#pragma omp atomic
+  a+=1;
+}
+
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/collapse.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/collapse.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/collapse.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,14 +0,0 @@
-/* Based on OMP 3.0 A.10 Example A.10.1
- */
-void foo()
-{
-  int j,k;
-  int jlast, klast;
-#pragma omp parallel for private(j,k), collapse(2), lastprivate (jlast, klast)
-  for (k=1;k<=100;k++)
-    for (j=1;j<=100;j++)
-    {
-      jlast = j;
-      klast = k;
-    } 
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/collapse.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/collapse.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/collapse.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/collapse.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,14 @@
+/* Based on OMP 3.0 A.10 Example A.10.1
+ */
+void foo()
+{
+  int j,k;
+  int jlast, klast;
+#pragma omp parallel for private(j,k), collapse(2), lastprivate (jlast, klast)
+  for (k=1;k<=100;k++)
+    for (j=1;j<=100;j++)
+    {
+      jlast = j;
+      klast = k;
+    } 
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/copyin.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/copyin.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/copyin.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,33 +0,0 @@
-/*
-test for copyin 
-*/
-#include <stdio.h>
-#ifdef _OPENMP
-#include <omp.h>
-#endif 
-
-float x;
-int y;
-struct s_zi
-{
-  int id;
-  char name[20];
-  float height;
-};
-
-struct s_zi z={123,"hello",1.75};
-
-#pragma omp threadprivate(x,y,z)
-
-int main (int argc, char * argv[])
-{
-    x=1555.0;
-    y=765;
-#pragma omp parallel copyin(x,y,z)
-  {
- printf("x=%f, y=%d,z.name=%s\n",x,y,z.name);
-  }
-
-  return 0;
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/copyin.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/copyin.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/copyin.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/copyin.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,33 @@
+/*
+test for copyin 
+*/
+#include <stdio.h>
+#ifdef _OPENMP
+#include <omp.h>
+#endif 
+
+float x;
+int y;
+struct s_zi
+{
+  int id;
+  char name[20];
+  float height;
+};
+
+struct s_zi z={123,"hello",1.75};
+
+#pragma omp threadprivate(x,y,z)
+
+int main (int argc, char * argv[])
+{
+    x=1555.0;
+    y=765;
+#pragma omp parallel copyin(x,y,z)
+  {
+ printf("x=%f, y=%d,z.name=%s\n",x,y,z.name);
+  }
+
+  return 0;
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/copyprivate.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,32 +0,0 @@
-/*
-A variable is both threadprivate and copyprivate.
-*/
-#include <stdio.h>
-#ifdef _OPENMP
-#include <omp.h>
-#endif 
-float x=0.0;
-int y=0;
-#pragma omp threadprivate(x,y)
- 
-void init ()
-{
-  #pragma omp single copyprivate(x,y)
-  {
-    x=1.0;
-    y=1;
-  }
- printf("x=%f, y=%d\n",x,y);
-}
- 
-int main (int argc, char * argv[])
-{
-#ifdef _OPENMP
-omp_set_num_threads(4);
-#endif
-#pragma omp parallel
-  {
-    init ();
-  }
-  return 0;
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/copyprivate.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,32 @@
+/*
+A variable is both threadprivate and copyprivate.
+*/
+#include <stdio.h>
+#ifdef _OPENMP
+#include <omp.h>
+#endif 
+float x=0.0;
+int y=0;
+#pragma omp threadprivate(x,y)
+ 
+void init ()
+{
+  #pragma omp single copyprivate(x,y)
+  {
+    x=1.0;
+    y=1;
+  }
+ printf("x=%f, y=%d\n",x,y);
+}
+ 
+int main (int argc, char * argv[])
+{
+#ifdef _OPENMP
+omp_set_num_threads(4);
+#endif
+#pragma omp parallel
+  {
+    init ();
+  }
+  return 0;
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate2.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/copyprivate2.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,25 +0,0 @@
-/*single and copyprivate*/
-#include <stdio.h>
-#ifdef _OPENMP
-#include <omp.h>
-#endif 
- 
- 
-int main (int argc, char * argv[])
-{
-float x=0.0;
-int y=0;
-#ifdef _OPENMP
-omp_set_num_threads(4);
-#endif
-#pragma omp parallel private(x,y)
-  {
-  #pragma omp single copyprivate(x,y)
-  {
-    x=546.0;
-    y=777;
-  }
- printf("x=%f, y=%d\n",x,y);
-  }
-  return 0;
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate2.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/copyprivate2.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate2.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,25 @@
+/*single and copyprivate*/
+#include <stdio.h>
+#ifdef _OPENMP
+#include <omp.h>
+#endif 
+ 
+ 
+int main (int argc, char * argv[])
+{
+float x=0.0;
+int y=0;
+#ifdef _OPENMP
+omp_set_num_threads(4);
+#endif
+#pragma omp parallel private(x,y)
+  {
+  #pragma omp single copyprivate(x,y)
+  {
+    x=546.0;
+    y=777;
+  }
+ printf("x=%f, y=%d\n",x,y);
+  }
+  return 0;
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate3.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/copyprivate3.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate3.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,38 +0,0 @@
-#include <stdio.h>
-#ifdef _OPENMP
-#include <omp.h>
-#endif
-
-#define LOOPCOUNT 100
-
-int main(void)
-{
-  int result = 0;
-  int nr_iterations = 0;
-  int i;
-  int j;
-
-#pragma omp parallel private(i,j)
-  {
-    for (i = 0; i < LOOPCOUNT; i++)
-      {
-#pragma omp single copyprivate(j)
-        {
-          nr_iterations++;
-          j = i;
-        }
-        /*      #pragma omp barrier */
-#pragma omp critical
-        {
-          result = result + j - i;
-        }
-#pragma omp barrier
-      }                         /* end of for */
-
-  }                             /* end of parallel */
-
- printf("result=%d nr_iterations=%d\n",result, nr_iterations);
-  return (result == 0) && (nr_iterations == LOOPCOUNT);
-}
-
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate3.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/copyprivate3.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate3.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/copyprivate3.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,38 @@
+#include <stdio.h>
+#ifdef _OPENMP
+#include <omp.h>
+#endif
+
+#define LOOPCOUNT 100
+
+int main(void)
+{
+  int result = 0;
+  int nr_iterations = 0;
+  int i;
+  int j;
+
+#pragma omp parallel private(i,j)
+  {
+    for (i = 0; i < LOOPCOUNT; i++)
+      {
+#pragma omp single copyprivate(j)
+        {
+          nr_iterations++;
+          j = i;
+        }
+        /*      #pragma omp barrier */
+#pragma omp critical
+        {
+          result = result + j - i;
+        }
+#pragma omp barrier
+      }                         /* end of for */
+
+  }                             /* end of parallel */
+
+ printf("result=%d nr_iterations=%d\n",result, nr_iterations);
+  return (result == 0) && (nr_iterations == LOOPCOUNT);
+}
+
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/critical.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/critical.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/critical.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,15 +0,0 @@
-#include <omp.h>
-
-int main (void)
-{
-
-int a=0,b=0;
-#pragma omp parallel 
-{
-#pragma omp critical (aaa)
-  a=a+1;
-#pragma omp critical (bbb)
-  b=b+1;
-}
-
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/critical.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/critical.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/critical.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/critical.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,15 @@
+#include <omp.h>
+
+int main (void)
+{
+
+int a=0,b=0;
+#pragma omp parallel 
+{
+#pragma omp critical (aaa)
+  a=a+1;
+#pragma omp critical (bbb)
+  b=b+1;
+}
+
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/critical_dead.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/critical_dead.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/critical_dead.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,20 +0,0 @@
-int counter = 0;
-void foo()
-{
-#pragma omp critical
-  {
-if (counter <100)
-   counter++;
-else 
-  return;
-//    foo();
- }
-  foo();
-}
-
-int main()
-{
- foo();
-  return 0;
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/critical_dead.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/critical_dead.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/critical_dead.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/critical_dead.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,20 @@
+int counter = 0;
+void foo()
+{
+#pragma omp critical
+  {
+if (counter <100)
+   counter++;
+else 
+  return;
+//    foo();
+ }
+  foo();
+}
+
+int main()
+{
+ foo();
+  return 0;
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/critical_orphaned.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/critical_orphaned.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/critical_orphaned.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,15 +0,0 @@
-int counter = 0;
-int foo()
-{
-#pragma omp critical
-  {
-  counter++;
- }
-return 0; 
-}
-
-int main()
-{
- foo();
-  return 0;
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/critical_orphaned.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/critical_orphaned.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/critical_orphaned.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/critical_orphaned.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,15 @@
+int counter = 0;
+int foo()
+{
+#pragma omp critical
+  {
+  counter++;
+ }
+return 0; 
+}
+
+int main()
+{
+ foo();
+  return 0;
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/dynamicChunk.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/dynamicChunk.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/dynamicChunk.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,18 +0,0 @@
-#include <stdio.h>
-#include <omp.h>
-int main(void)
-{
-double a[1000];
-  int i;
-int n;
-scanf("%d",&n);
-#pragma omp for schedule(dynamic,50)
-  for (i=0;i<n;i++)
-   {
-    a[i]=(double)i/2.0;
-   }
-printf("a[878]=%f\n",a[878]);
-
-
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/dynamicChunk.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/dynamicChunk.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/dynamicChunk.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/dynamicChunk.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include <omp.h>
+int main(void)
+{
+double a[1000];
+  int i;
+int n;
+scanf("%d",&n);
+#pragma omp for schedule(dynamic,50)
+  for (i=0;i<n;i++)
+   {
+    a[i]=(double)i/2.0;
+   }
+printf("a[878]=%f\n",a[878]);
+
+
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/empty.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/empty.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/empty.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,28 +0,0 @@
-/*
-1. how to include header
-2. parallel region
-3. runtime routine
-4. undeterminated execution order
-5. control number of threads
-
-By C. Liao
-*/
-#include <stdio.h>
-
-#ifdef _OPENMP
-#include <omp.h>
-#endif
-
-void main(void)
-{
-int i=0;
-
-#pragma omp parallel 
-{
-#ifdef _OPENMP
- i=omp_get_thread_num();
-#endif
- printf("Hello,world! I am thread %d\n",i);
-}
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/empty.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/empty.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/empty.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/empty.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,28 @@
+/*
+1. how to include header
+2. parallel region
+3. runtime routine
+4. undeterminated execution order
+5. control number of threads
+
+By C. Liao
+*/
+#include <stdio.h>
+
+#ifdef _OPENMP
+#include <omp.h>
+#endif
+
+void main(void)
+{
+int i=0;
+
+#pragma omp parallel 
+{
+#ifdef _OPENMP
+ i=omp_get_thread_num();
+#endif
+ printf("Hello,world! I am thread %d\n",i);
+}
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/expressions.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/expressions.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/expressions.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,28 +0,0 @@
-/* some simple expressions */
-void foo()
-{
-int i;
-#pragma omp task if (99)
-i=i++;
-
-#pragma omp task if (i)
-i=i++;
-
-#pragma omp task if (i=0)
-i=i++;
-
-#pragma omp task if (i+=0)
-i=i++;
-
-#pragma omp task if (i==0)
-i=i++;
-
-#pragma omp task if (i!=0)
-i=i++;
-
-#pragma omp task if (i<0)
-i=i++;
-
-#pragma omp task if (i>0)
-i=i++;
-} 

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/expressions.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/expressions.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/expressions.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/expressions.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,28 @@
+/* some simple expressions */
+void foo()
+{
+int i;
+#pragma omp task if (99)
+i=i++;
+
+#pragma omp task if (i)
+i=i++;
+
+#pragma omp task if (i=0)
+i=i++;
+
+#pragma omp task if (i+=0)
+i=i++;
+
+#pragma omp task if (i==0)
+i=i++;
+
+#pragma omp task if (i!=0)
+i=i++;
+
+#pragma omp task if (i<0)
+i=i++;
+
+#pragma omp task if (i>0)
+i=i++;
+} 

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/falsesharing.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/falsesharing.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/falsesharing.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,24 +0,0 @@
-#include <stdio.h>
-#include <omp.h>
-static long num_steps = 100000; 
-double step;
-#define NUM_THREADS 20
-
-void main ()
-{	  int i;
-	  int id;
- 	  double x, pi, sum[NUM_THREADS];
-	  step = 1.0/(double) num_steps;
-	  omp_set_num_threads(NUM_THREADS);
-#pragma omp parallel 
-{
-	  id = omp_get_thread_num();
-	  for (i=id, sum[id]=0.0;i< num_steps; i=i+NUM_THREADS){
-		  x = (i+0.5)*step;
-		  sum[id] += 4.0/(1.0+x*x);
-	  }
-}
-	  for(i=0, pi=0.0;i<NUM_THREADS;i++)pi += sum[i] * step;
-     printf("PI=%f\n",pi);
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/falsesharing.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/falsesharing.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/falsesharing.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/falsesharing.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,24 @@
+#include <stdio.h>
+#include <omp.h>
+static long num_steps = 100000; 
+double step;
+#define NUM_THREADS 20
+
+void main ()
+{	  int i;
+	  int id;
+ 	  double x, pi, sum[NUM_THREADS];
+	  step = 1.0/(double) num_steps;
+	  omp_set_num_threads(NUM_THREADS);
+#pragma omp parallel 
+{
+	  id = omp_get_thread_num();
+	  for (i=id, sum[id]=0.0;i< num_steps; i=i+NUM_THREADS){
+		  x = (i+0.5)*step;
+		  sum[id] += 4.0/(1.0+x*x);
+	  }
+}
+	  for(i=0, pi=0.0;i<NUM_THREADS;i++)pi += sum[i] * step;
+     printf("PI=%f\n",pi);
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/firstlastprivate.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/firstlastprivate.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/firstlastprivate.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,40 +0,0 @@
-#include <stdio.h>
-#include <omp.h>
-#include <sys/times.h>
-#include <time.h>
-
-#ifndef CLK_TCK
-#define CLK_TCK 60
-#endif
-
-
-double get_seconds() /*routine to read time*/
-{
-  struct tms rusage;
-  times(&rusage);
-  return (double) (rusage.tms_utime)/CLK_TCK;
-}
-
-
-int main()
-{
-  int i,sum=0;
-  int num_steps=10000000;
-  double sec0, sec;
-
-
-  sec=0.0;
-  sec0=get_seconds();
-  omp_set_num_threads(4);
-
-#pragma omp parallel for firstprivate (sum) lastprivate (sum)
-for(i=1;i<=num_steps;i++)
-{
-  sum=sum + i;
-}
- sec=sec+(get_seconds() -sec0);
- printf("sum of %d = %d  spent time:%f seconds\n",num_steps,sum, sec);
-
- return 1;
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/firstlastprivate.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/firstlastprivate.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/firstlastprivate.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/firstlastprivate.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,40 @@
+#include <stdio.h>
+#include <omp.h>
+#include <sys/times.h>
+#include <time.h>
+
+#ifndef CLK_TCK
+#define CLK_TCK 60
+#endif
+
+
+double get_seconds() /*routine to read time*/
+{
+  struct tms rusage;
+  times(&rusage);
+  return (double) (rusage.tms_utime)/CLK_TCK;
+}
+
+
+int main()
+{
+  int i,sum=0;
+  int num_steps=10000000;
+  double sec0, sec;
+
+
+  sec=0.0;
+  sec0=get_seconds();
+  omp_set_num_threads(4);
+
+#pragma omp parallel for firstprivate (sum) lastprivate (sum)
+for(i=1;i<=num_steps;i++)
+{
+  sum=sum + i;
+}
+ sec=sec+(get_seconds() -sec0);
+ printf("sum of %d = %d  spent time:%f seconds\n",num_steps,sum, sec);
+
+ return 1;
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/flush.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/flush.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/flush.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,17 +0,0 @@
-int
-main (void)
-{
-  int a = 1, b=2;
-#pragma omp parallel if (a) num_threads(4)
-  {
-#pragma omp flush    
-    if (a != 0)
-      {
-#pragma omp flush(a,b)
-      }
-    if (a != 0)
-      {
-#pragma omp barrier
-      }
-  }
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/flush.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/flush.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/flush.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/flush.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,17 @@
+int
+main (void)
+{
+  int a = 1, b=2;
+#pragma omp parallel if (a) num_threads(4)
+  {
+#pragma omp flush    
+    if (a != 0)
+      {
+#pragma omp flush(a,b)
+      }
+    if (a != 0)
+      {
+#pragma omp barrier
+      }
+  }
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/get_max_threads.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/get_max_threads.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/get_max_threads.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,18 +0,0 @@
-#include <stdio.h>
-#ifdef _OPENMP
-#include <omp.h>
-#endif
-
-int main(void)
-{
-int i=0;
-#pragma omp parallel 
-{
-#ifdef _OPENMP
- i=omp_get_max_threads();
-#endif
- printf("Hello,world! I am thread %d\n",i);
-}
-return 0;
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/get_max_threads.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/get_max_threads.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/get_max_threads.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/get_max_threads.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#ifdef _OPENMP
+#include <omp.h>
+#endif
+
+int main(void)
+{
+int i=0;
+#pragma omp parallel 
+{
+#ifdef _OPENMP
+ i=omp_get_max_threads();
+#endif
+ printf("Hello,world! I am thread %d\n",i);
+}
+return 0;
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/hello-ordered.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/hello-ordered.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/hello-ordered.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,15 +0,0 @@
-#include <stdio.h>
-#if defined(_OPENMP)
-#include <omp.h>
-#endif
-
-int main(void)
-{
-int i;
-#pragma omp parallel for ordered
-for (i=0;i<100;i++)
-{
-#pragma omp ordered  
-  printf("%2d,Hello,world.!\n",i);
-}
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/hello-ordered.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/hello-ordered.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/hello-ordered.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/hello-ordered.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,15 @@
+#include <stdio.h>
+#if defined(_OPENMP)
+#include <omp.h>
+#endif
+
+int main(void)
+{
+int i;
+#pragma omp parallel for ordered
+for (i=0;i<100;i++)
+{
+#pragma omp ordered  
+  printf("%2d,Hello,world.!\n",i);
+}
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/hello.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/hello.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/hello.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,28 +0,0 @@
-/*
-1. how to include header
-2. parallel region
-3. runtime routine
-4. undeterminated execution order
-5. control number of threads
-
-By C. Liao
-*/
-#include <stdio.h>
-
-#ifdef _OPENMP
-#include <omp.h>
-#endif
-
-int main(void)
-{
-int i=0;
-#pragma omp parallel default(shared)
-{
-#ifdef _OPENMP
- i=omp_get_thread_num();
-#endif
- printf("Hello,world! I am thread %d\n",i);
-}
-return 0;
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/hello.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/hello.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/hello.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/hello.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,28 @@
+/*
+1. how to include header
+2. parallel region
+3. runtime routine
+4. undeterminated execution order
+5. control number of threads
+
+By C. Liao
+*/
+#include <stdio.h>
+
+#ifdef _OPENMP
+#include <omp.h>
+#endif
+
+int main(void)
+{
+int i=0;
+#pragma omp parallel default(shared)
+{
+#ifdef _OPENMP
+ i=omp_get_thread_num();
+#endif
+ printf("Hello,world! I am thread %d\n",i);
+}
+return 0;
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/lastprivate.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/lastprivate.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/lastprivate.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,16 +0,0 @@
-#include <omp.h>
-#define n 100
-int a[n];
-int main()
-{
-  int i,j;
-  j = 0;
-  #pragma omp parallel for lastprivate(j)
-   for(i=1; i<=n; i++){
-      if(i == 1 || i == n)
-         j = j + 1;
-      a[i] = a[i] + j;
-   }
-}
-
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/lastprivate.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/lastprivate.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/lastprivate.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/lastprivate.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,16 @@
+#include <omp.h>
+#define n 100
+int a[n];
+int main()
+{
+  int i,j;
+  j = 0;
+  #pragma omp parallel for lastprivate(j)
+   for(i=1; i<=n; i++){
+      if(i == 1 || i == n)
+         j = j + 1;
+      a[i] = a[i] + j;
+   }
+}
+
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/lastprivate0.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/lastprivate0.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/lastprivate0.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,42 +0,0 @@
-#include <stdio.h>
-#ifdef _OPENMP
-#include <omp.h>
-#endif
-int main(void)
-{
-int i,is=0;
-
-#pragma omp parallel for private(is)
-for (i=0;i<100;i++)
-  is = is+i;
-printf("%d=%d\n ",i,is);
-
-is=0;
-
-#pragma omp parallel for firstprivate(is)
-for (i=0;i<100;i++)
-  is = is+i;
-printf("%d=%d\n ",i,is);
-
-is=0;
-
-#pragma omp parallel for lastprivate(is)
-for (i=0;i<100;i++)
-  is = is+i;
-printf("%d=%d\n ",i,is);
-
-is=0;
-
-//#pragma omp parallel for lastprivate(is)
-#pragma omp parallel for schedule(static,30) firstprivate(is) lastprivate(is)
-for (i=0;i<100;i++)
-  is = is+i;
-
-/*The value of is depends on the num of threads and schedule method*/
-printf("%d=%d\n ",i,is);
-
-is=0;
-for (i=90;i<100;i++)
-  is = is+i;
-printf("%d=%d\n ",i,is);
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/lastprivate0.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/lastprivate0.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/lastprivate0.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/lastprivate0.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,42 @@
+#include <stdio.h>
+#ifdef _OPENMP
+#include <omp.h>
+#endif
+int main(void)
+{
+int i,is=0;
+
+#pragma omp parallel for private(is)
+for (i=0;i<100;i++)
+  is = is+i;
+printf("%d=%d\n ",i,is);
+
+is=0;
+
+#pragma omp parallel for firstprivate(is)
+for (i=0;i<100;i++)
+  is = is+i;
+printf("%d=%d\n ",i,is);
+
+is=0;
+
+#pragma omp parallel for lastprivate(is)
+for (i=0;i<100;i++)
+  is = is+i;
+printf("%d=%d\n ",i,is);
+
+is=0;
+
+//#pragma omp parallel for lastprivate(is)
+#pragma omp parallel for schedule(static,30) firstprivate(is) lastprivate(is)
+for (i=0;i<100;i++)
+  is = is+i;
+
+/*The value of is depends on the num of threads and schedule method*/
+printf("%d=%d\n ",i,is);
+
+is=0;
+for (i=90;i<100;i++)
+  is = is+i;
+printf("%d=%d\n ",i,is);
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/limits_threads.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/limits_threads.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/limits_threads.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,28 +0,0 @@
-/*
-1. how to include header
-2. parallel region
-3. runtime routine
-4. undeterminated execution order
-5. control number of threads
-
-By C. Liao
-*/
-#include <stdio.h>
-
-#ifdef _OPENMP
-#include <omp.h>
-#endif
-
-int main(void)
-{
-int i=0;
-#pragma omp parallel 
-{
-#ifdef _OPENMP
- i=omp_get_thread_num();
-#endif
- printf("Hello,world! I am thread %d\n",i);
-}
-return 0;
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/limits_threads.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/limits_threads.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/limits_threads.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/limits_threads.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,28 @@
+/*
+1. how to include header
+2. parallel region
+3. runtime routine
+4. undeterminated execution order
+5. control number of threads
+
+By C. Liao
+*/
+#include <stdio.h>
+
+#ifdef _OPENMP
+#include <omp.h>
+#endif
+
+int main(void)
+{
+int i=0;
+#pragma omp parallel 
+{
+#ifdef _OPENMP
+ i=omp_get_thread_num();
+#endif
+ printf("Hello,world! I am thread %d\n",i);
+}
+return 0;
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/lockarray.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/lockarray.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/lockarray.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,75 +0,0 @@
-/*
-test fine grained locks instead of critical section
-by Chunhua Liao
-*/
-#include <stdio.h>
-
-#ifdef __OPENMP
-#include <omp.h>
-#define LOCKNUM 100
-#endif
-
-#define SIZE 5000
-int main(void)
-{
-int a[SIZE];
-int i,j,sum,lock_index;
-
-#ifdef __OPENMP
-  omp_lock_t lck[LOCKNUM];
-  for (i=0;i<LOCKNUM;i++)
-    omp_init_lock(&(lck[i]));
-#endif
-
-for (i=0;i<SIZE;i++)
-  a[i]=0;
-
-#pragma omp parallel private (i,j,lock_index)
- {
-
-/*critical version*/
-
-#pragma omp for schedule(dynamic,1)
-    for (i=0;i<SIZE;i++)
-  {
-    j=(i*i)%SIZE;
-  #pragma omp critical
-     {
-      a[j]=a[j]+5;
-     }
-   }
-
-/* fine grained lock version*/
-
-#pragma omp for schedule(dynamic,1)
-    for (i=0;i<SIZE;i++)
-   {
-     j=(i*i)%SIZE;
-#ifdef __OPENMP
-      lock_index= j%LOCKNUM; 
-//    omp_set_lock(lck[lock_index]);
-#endif
-      a[j]=a[j]-5;
-#ifdef __OPENMP
-//    omp_unset_lock(lck[lock_index]);
-#endif
-   }
-
-/*verify the result*/
-   sum=0;
-#pragma omp for reduction (+:sum)
-    for (i=0;i<SIZE;i++)
-   {
-    sum+=a[i];
-   }
-
- }
-
-/* destroy locks*/
-#ifdef __OPENMP
-for (i=0;i<LOCKNUM;i++)
-  omp_destroy_lock(&(lck[i]));
-#endif
-printf("sum of a[] = %d\n",sum);
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/lockarray.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/lockarray.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/lockarray.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/lockarray.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,75 @@
+/*
+test fine grained locks instead of critical section
+by Chunhua Liao
+*/
+#include <stdio.h>
+
+#ifdef __OPENMP
+#include <omp.h>
+#define LOCKNUM 100
+#endif
+
+#define SIZE 5000
+int main(void)
+{
+int a[SIZE];
+int i,j,sum,lock_index;
+
+#ifdef __OPENMP
+  omp_lock_t lck[LOCKNUM];
+  for (i=0;i<LOCKNUM;i++)
+    omp_init_lock(&(lck[i]));
+#endif
+
+for (i=0;i<SIZE;i++)
+  a[i]=0;
+
+#pragma omp parallel private (i,j,lock_index)
+ {
+
+/*critical version*/
+
+#pragma omp for schedule(dynamic,1)
+    for (i=0;i<SIZE;i++)
+  {
+    j=(i*i)%SIZE;
+  #pragma omp critical
+     {
+      a[j]=a[j]+5;
+     }
+   }
+
+/* fine grained lock version*/
+
+#pragma omp for schedule(dynamic,1)
+    for (i=0;i<SIZE;i++)
+   {
+     j=(i*i)%SIZE;
+#ifdef __OPENMP
+      lock_index= j%LOCKNUM; 
+//    omp_set_lock(lck[lock_index]);
+#endif
+      a[j]=a[j]-5;
+#ifdef __OPENMP
+//    omp_unset_lock(lck[lock_index]);
+#endif
+   }
+
+/*verify the result*/
+   sum=0;
+#pragma omp for reduction (+:sum)
+    for (i=0;i<SIZE;i++)
+   {
+    sum+=a[i];
+   }
+
+ }
+
+/* destroy locks*/
+#ifdef __OPENMP
+for (i=0;i<LOCKNUM;i++)
+  omp_destroy_lock(&(lck[i]));
+#endif
+printf("sum of a[] = %d\n",sum);
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/lu_factorization.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/lu_factorization.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/lu_factorization.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,22 +0,0 @@
-//from BikEfficient2001
-//LU-factorization without pivoting
-// outermost loop k is not parallelizable 
-// inner loop i is.
-//
-int main(void)
-{
-  int i,j,k,n=500;
-  double a[n][n];
-  for (k = 0; k < n - 1; k++)
-    {
-      for (i = k + 1; i < n; i++)
-	{
-	  a[i][k] = a[i][k] / a[k][k];
-	  for (j = k + 1; j < n; j++)
-	    a[i][j] = a[i][j] - a[i][k] * a[k][j];
-	}
-    }
-
-  return 0;
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/lu_factorization.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/lu_factorization.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/lu_factorization.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/lu_factorization.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,22 @@
+//from BikEfficient2001
+//LU-factorization without pivoting
+// outermost loop k is not parallelizable 
+// inner loop i is.
+//
+int main(void)
+{
+  int i,j,k,n=500;
+  double a[n][n];
+  for (k = 0; k < n - 1; k++)
+    {
+      for (i = k + 1; i < n; i++)
+	{
+	  a[i][k] = a[i][k] / a[k][k];
+	  for (j = k + 1; j < n; j++)
+	    a[i][j] = a[i][j] - a[i][k] * a[k][j];
+	}
+    }
+
+  return 0;
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/masterSingle.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/masterSingle.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/masterSingle.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,15 +0,0 @@
-#include <omp.h>
-
-int main (void)
-{
-
-int a,b;
-#pragma omp parallel 
-{
-#pragma omp master
-  a=a+1;
-#pragma omp single
-  b=b+1;
-}
-
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/masterSingle.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/masterSingle.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/masterSingle.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/masterSingle.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,15 @@
+#include <omp.h>
+
+int main (void)
+{
+
+int a,b;
+#pragma omp parallel 
+{
+#pragma omp master
+  a=a+1;
+#pragma omp single
+  b=b+1;
+}
+
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/matrix_vector.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/matrix_vector.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/matrix_vector.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,32 +0,0 @@
-// double-precision floating-point matrix-vector product
-// from BikEfficient2001
-// segmentation fault ???
-// May 30, 2008
-#include <stdio.h>
-#define SIZE 5000
-int
-main ()
-{
-  double d, a[SIZE][SIZE], x[SIZE], y[SIZE];
-  int i,j,n;
-  n=SIZE;
-  for (i = 0; i < n; i++)
-  {
-      y[i]= (double)i*i; 
-      for (j = 0; j < n; j++)
-        a[i][j] = (double)(i/j);
-  }        
-
-  for (i = 0; i < n; i++)
-    {
-      d = 0.0;
-      for (j = 0; j < n; j++)
-	{
-	  d += a[i][j] * y[j];
-	}
-      x[i] = d;
-    }
-  printf("%f\n",x[0]);
-
-  return 0;
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/matrix_vector.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/matrix_vector.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/matrix_vector.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/matrix_vector.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,32 @@
+// double-precision floating-point matrix-vector product
+// from BikEfficient2001
+// segmentation fault ???
+// May 30, 2008
+#include <stdio.h>
+#define SIZE 5000
+int
+main ()
+{
+  double d, a[SIZE][SIZE], x[SIZE], y[SIZE];
+  int i,j,n;
+  n=SIZE;
+  for (i = 0; i < n; i++)
+  {
+      y[i]= (double)i*i; 
+      for (j = 0; j < n; j++)
+        a[i][j] = (double)(i/j);
+  }        
+
+  for (i = 0; i < n; i++)
+    {
+      d = 0.0;
+      for (j = 0; j < n; j++)
+	{
+	  d += a[i][j] * y[j];
+	}
+      x[i] = d;
+    }
+  printf("%f\n",x[0]);
+
+  return 0;
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/nestedpar.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/nestedpar.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/nestedpar.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,25 +0,0 @@
-#include<omp.h>
-#include <stdio.h>
-
-void paroutput(char* s)
-{
-#pragma omp parallel
-printf("%s\n",s);
-}
-
-int main(void)
-{
- #pragma omp parallel
- {
-  paroutput("before single");
-
- #pragma omp single
-  {
-   paroutput("inside single");
-  }
-
-  paroutput("after single");
- }
-}
-
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/nestedpar.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/nestedpar.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/nestedpar.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/nestedpar.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,25 @@
+#include<omp.h>
+#include <stdio.h>
+
+void paroutput(char* s)
+{
+#pragma omp parallel
+printf("%s\n",s);
+}
+
+int main(void)
+{
+ #pragma omp parallel
+ {
+  paroutput("before single");
+
+ #pragma omp single
+  {
+   paroutput("inside single");
+  }
+
+  paroutput("after single");
+ }
+}
+
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/nestedpar1.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/nestedpar1.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/nestedpar1.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,30 +0,0 @@
-#include<omp.h>
-#include <stdio.h>
-
-void paroutput(char* s)
-{
-}
-
-int main(void)
-{
-#ifdef _OPENMP
-   omp_set_nested(1);
-#endif
-
- #pragma omp parallel
- {
-   #pragma omp parallel
-   printf("before single.\n");
-   
- #pragma omp single
-  {
-
-   #pragma omp parallel
-   printf("Inside single.\n");
-  }
-   #pragma omp parallel
-   printf("after single.\n");
- }
-}
-
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/nestedpar1.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/nestedpar1.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/nestedpar1.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/nestedpar1.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,30 @@
+#include<omp.h>
+#include <stdio.h>
+
+void paroutput(char* s)
+{
+}
+
+int main(void)
+{
+#ifdef _OPENMP
+   omp_set_nested(1);
+#endif
+
+ #pragma omp parallel
+ {
+   #pragma omp parallel
+   printf("before single.\n");
+   
+ #pragma omp single
+  {
+
+   #pragma omp parallel
+   printf("Inside single.\n");
+  }
+   #pragma omp parallel
+   printf("after single.\n");
+ }
+}
+
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/omp1.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/omp1.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/omp1.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,20 +0,0 @@
-/*Example to show outlining vs. inlining*/
-
-#ifdef _OPENMP
-#include <omp.h>
-#endif 
-
-void do_sth(int ar1,int ar2, int ar3)
-{
-}
-
-int main(void)
-{
-  int a,b,c;
-
-#pragma omp parallel private(c)
-  do_sth(a,b,c);
-  
-  return 0;
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/omp1.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/omp1.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/omp1.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/omp1.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,20 @@
+/*Example to show outlining vs. inlining*/
+
+#ifdef _OPENMP
+#include <omp.h>
+#endif 
+
+void do_sth(int ar1,int ar2, int ar3)
+{
+}
+
+int main(void)
+{
+  int a,b,c;
+
+#pragma omp parallel private(c)
+  do_sth(a,b,c);
+  
+  return 0;
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/ompfor.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/ompfor.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/ompfor.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,23 +0,0 @@
-/*
-1. with and without omp for
-2. default loop scheduling: implementation dependent
-*/
-#include <stdio.h>
-#ifdef _OPENMP
-#include <omp.h>
-#endif 
-int a[20];
-int main(void)
-{
-  int i;
-// #pragma omp parallel
-//#pragma omp parallel for schedule(dynamic,2)
-#pragma omp parallel for schedule (auto)
-  for (i=0;i<20;i++)
-   {
-    a[i]=i*2;
-    printf("Iteration %2d is carried out by thread %2d\n",\
-           i, omp_get_thread_num());
-   }
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/ompfor.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/ompfor.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/ompfor.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/ompfor.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,23 @@
+/*
+1. with and without omp for
+2. default loop scheduling: implementation dependent
+*/
+#include <stdio.h>
+#ifdef _OPENMP
+#include <omp.h>
+#endif 
+int a[20];
+int main(void)
+{
+  int i;
+// #pragma omp parallel
+//#pragma omp parallel for schedule(dynamic,2)
+#pragma omp parallel for schedule (auto)
+  for (i=0;i<20;i++)
+   {
+    a[i]=i*2;
+    printf("Iteration %2d is carried out by thread %2d\n",\
+           i, omp_get_thread_num());
+   }
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/ordered.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/ordered.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/ordered.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,17 +0,0 @@
-#include <stdio.h>
-#include <omp.h>
-
-int main (void)
-{
-
-  int i,myval;
-#pragma omp parallel for private(myval) ordered
-   for(i=1; i<=100; i++){
-      myval=i*i; 
-      #pragma omp ordered
-      {
-         printf("%d %d\n", i, myval);
-      }
-   }
-
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/ordered.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/ordered.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/ordered.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/ordered.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,17 @@
+#include <stdio.h>
+#include <omp.h>
+
+int main (void)
+{
+
+  int i,myval;
+#pragma omp parallel for private(myval) ordered
+   for(i=1; i<=100; i++){
+      myval=i*i; 
+      #pragma omp ordered
+      {
+         printf("%d %d\n", i, myval);
+      }
+   }
+
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/ordered2.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/ordered2.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/ordered2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,18 +0,0 @@
-#include <stdio.h>
-#include <omp.h>
-void main(void)
-{
-int i=0,t_id;
-#pragma omp parallel for ordered private (t_id)
-//#pragma omp parallel for private (t_id)
-for (i=0;i<100;i++)
-{
-t_id= omp_get_thread_num();
-
-#pragma omp ordered
- {
-  printf("I am i=%d in thread %d\n",i,t_id);
- }
-}
-
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/ordered2.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/ordered2.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/ordered2.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/ordered2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include <omp.h>
+void main(void)
+{
+int i=0,t_id;
+#pragma omp parallel for ordered private (t_id)
+//#pragma omp parallel for private (t_id)
+for (i=0;i<100;i++)
+{
+t_id= omp_get_thread_num();
+
+#pragma omp ordered
+ {
+  printf("I am i=%d in thread %d\n",i,t_id);
+ }
+}
+
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/orphaned-directives.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/orphaned-directives.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/orphaned-directives.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,27 +0,0 @@
-#include <stdio.h>
-
-#if defined(_OPENMP)
-#include <omp.h>
-#endif /* _OPENMP */
-
-static double a[1000];
-
-static void init(void)
-{
-  int i;
-   i=i+5; 
-#pragma omp for
-  for (i=0;i<1000;i++)
-   {
-    a[i]=(double)i/2.0;
-   }
-}
-
-int main(void){
-
-#pragma omp parallel
- {
-  init();
- }
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/orphaned-directives.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/orphaned-directives.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/orphaned-directives.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/orphaned-directives.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,27 @@
+#include <stdio.h>
+
+#if defined(_OPENMP)
+#include <omp.h>
+#endif /* _OPENMP */
+
+static double a[1000];
+
+static void init(void)
+{
+  int i;
+   i=i+5; 
+#pragma omp for
+  for (i=0;i<1000;i++)
+   {
+    a[i]=(double)i/2.0;
+   }
+}
+
+int main(void){
+
+#pragma omp parallel
+ {
+  init();
+ }
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/parallel.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/parallel.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/parallel.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,7 +0,0 @@
-int main(void)
-{
-  int i, a[1000];
-#pragma omp parallel if(i<100)
-    a[i]=i*2;
-return 1;
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/parallel.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/parallel.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/parallel.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/parallel.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,7 @@
+int main(void)
+{
+  int i, a[1000];
+#pragma omp parallel if(i<100)
+    a[i]=i*2;
+return 1;
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/parallelfor.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/parallelfor.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/parallelfor.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,9 +0,0 @@
-#include <omp.h>
-int main(void)
-{
-  int i, a[1000];
-#pragma omp parallel for if(1)
-  for (i=0;i<1000;i++)
-    a[i]=i*2;
-return 1;
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/parallelfor.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/parallelfor.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/parallelfor.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/parallelfor.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,9 @@
+#include <omp.h>
+int main(void)
+{
+  int i, a[1000];
+#pragma omp parallel for if(1)
+  for (i=0;i<1000;i++)
+    a[i]=i*2;
+return 1;
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/parseOmp.C
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/parseOmp.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/parseOmp.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,34 +0,0 @@
-/*
- * Parsing OpenMP pragma text
-by Liao, 9/17/2008
-Last Modified: 9/19/2008
-*/
-#include "rose.h"
-#include <iostream>
-#include <string>
-#include "OmpAttribute.h"
-using namespace OmpSupport;
-
-class visitorTraversal : public AstSimpleProcessing
-{
-  protected: 
-    virtual void visit(SgNode* n);
-};
-
-void visitorTraversal::visit(SgNode* node)
-{
-  OmpAttribute* attribute = getOmpAttribute(node);
-  if (attribute)
-    attribute->print();//debug only for now
-}
-
-// must have argc and argv here!!
-int main(int argc, char * argv[])
-
-{
-  SgProject *project = frontend (argc, argv);
-  visitorTraversal myvisitor;
-  myvisitor.traverseInputFiles(project,preorder);
-
-  return backend(project);
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/parseOmp.C (from rev 128, trunk/tests/CompileTests/OpenMP_tests/parseOmp.C)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/parseOmp.C	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/parseOmp.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,34 @@
+/*
+ * Parsing OpenMP pragma text
+by Liao, 9/17/2008
+Last Modified: 9/19/2008
+*/
+#include "rose.h"
+#include <iostream>
+#include <string>
+#include "OmpAttribute.h"
+using namespace OmpSupport;
+
+class visitorTraversal : public AstSimpleProcessing
+{
+  protected: 
+    virtual void visit(SgNode* n);
+};
+
+void visitorTraversal::visit(SgNode* node)
+{
+  OmpAttribute* attribute = getOmpAttribute(node);
+  if (attribute)
+    attribute->print();//debug only for now
+}
+
+// must have argc and argv here!!
+int main(int argc, char * argv[])
+
+{
+  SgProject *project = frontend (argc, argv);
+  visitorTraversal myvisitor;
+  myvisitor.traverseInputFiles(project,preorder);
+
+  return backend(project);
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/private.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/private.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/private.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,25 +0,0 @@
-/*
-*/
-#include <stdio.h>
-#ifdef _OPENMP
-#include <omp.h>
-#endif 
-
-float x;
-int y;
-
-int main (int argc, char * argv[])
-{
-#ifdef _OPENMP
-   omp_set_num_threads(4);
-#endif
-    x=1.0;
-    y=1;
-#pragma omp parallel private(x,y)
-  {
- printf("x=%f, y=%d\n",x,y);
-  }
-
-  return 0;
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/private.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/private.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/private.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/private.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,25 @@
+/*
+*/
+#include <stdio.h>
+#ifdef _OPENMP
+#include <omp.h>
+#endif 
+
+float x;
+int y;
+
+int main (int argc, char * argv[])
+{
+#ifdef _OPENMP
+   omp_set_num_threads(4);
+#endif
+    x=1.0;
+    y=1;
+#pragma omp parallel private(x,y)
+  {
+ printf("x=%f, y=%d\n",x,y);
+  }
+
+  return 0;
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/privatej.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/privatej.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/privatej.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,25 +0,0 @@
-/*
-What will happen if the loop indices inside an omp for is not private?
-by C. Liao
- */
-#include <stdio.h>
-#ifdef _OPENMP 
-#include <omp.h>
-#endif
-
-int main()
-{
- int a[1000][1000];
- int i,j;
-
- #pragma omp parallel for 
-   for (i=0;i<1000;i++)
-     for (j=0;j<1000;j++)
-       a[i][j]=999;
-
-   for (i=0;i<1000;i++)
-     for (j=0;j<1000;j++)
-       if(a[i][j]!=999) printf("a[%d][%d]!=999\n",i,j);
-  return 0;
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/privatej.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/privatej.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/privatej.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/privatej.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,25 @@
+/*
+What will happen if the loop indices inside an omp for is not private?
+by C. Liao
+ */
+#include <stdio.h>
+#ifdef _OPENMP 
+#include <omp.h>
+#endif
+
+int main()
+{
+ int a[1000][1000];
+ int i,j;
+
+ #pragma omp parallel for 
+   for (i=0;i<1000;i++)
+     for (j=0;j<1000;j++)
+       a[i][j]=999;
+
+   for (i=0;i<1000;i++)
+     for (j=0;j<1000;j++)
+       if(a[i][j]!=999) printf("a[%d][%d]!=999\n",i,j);
+  return 0;
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/recursive.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/recursive.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/recursive.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,16 +0,0 @@
-int counter = 0;
-int foo()
-{
-#pragma omp critical
-  {
-  counter++;
-  if (counter <100)
-    foo();
- }
-}
-
-int main()
-{
- foo();
-  return 0;
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/recursive.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/recursive.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/recursive.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/recursive.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,16 @@
+int counter = 0;
+int foo()
+{
+#pragma omp critical
+  {
+  counter++;
+  if (counter <100)
+    foo();
+ }
+}
+
+int main()
+{
+ foo();
+  return 0;
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/reduction.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/reduction.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/reduction.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,43 +0,0 @@
-/*
-1. A local copy of reduction variable  is made and initialized depending on the op(e.g. 0 for +).
-2. Compiler finds standard reduction expressions containing op and uses them to update the local copy. 
-3. Local copies are reduced into a single value and combined with the original global value.
-
-*/
-#include <stdio.h>
-#ifdef _OPENMP
-#include <omp.h>
-#endif
-
-int main()
-{
-  int i;
-  long sum=0;
-  int total=100;
-
-#pragma omp parallel for reduction(+:sum)
- for (i=0; i<= total; i++){
-  sum = sum + i;
- }
-
-/******************************************/
-/*
- long sum0;
-#pragma omp parallel private(sum0)
-{
-  sum0=0; 
-
- #pragma omp for private(i)
- for (i=0; i<= total; i++)
-   sum0=sum0+i;
-
- #pragma omp critical
-  sum = sum + sum0; 
-*/
-/******************************************/
-
- printf("sum of 1 to %d = %d\n",total,sum);
-
- return 0;
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/reduction.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/reduction.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/reduction.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/reduction.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,43 @@
+/*
+1. A local copy of reduction variable  is made and initialized depending on the op(e.g. 0 for +).
+2. Compiler finds standard reduction expressions containing op and uses them to update the local copy. 
+3. Local copies are reduced into a single value and combined with the original global value.
+
+*/
+#include <stdio.h>
+#ifdef _OPENMP
+#include <omp.h>
+#endif
+
+int main()
+{
+  int i;
+  long sum=0;
+  int total=100;
+
+#pragma omp parallel for reduction(+:sum)
+ for (i=0; i<= total; i++){
+  sum = sum + i;
+ }
+
+/******************************************/
+/*
+ long sum0;
+#pragma omp parallel private(sum0)
+{
+  sum0=0; 
+
+ #pragma omp for private(i)
+ for (i=0; i<= total; i++)
+   sum0=sum0+i;
+
+ #pragma omp critical
+  sum = sum + sum0; 
+*/
+/******************************************/
+
+ printf("sum of 1 to %d = %d\n",total,sum);
+
+ return 0;
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/reduction2.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/reduction2.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/reduction2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,20 +0,0 @@
-#include <stdio.h>
-#include <omp.h>
-
-#define NUM_THREADS 4
-
-void main ()
-{
- int i,total=1000000;
- double res=0.0;
-
- omp_set_num_threads(NUM_THREADS);
-
- #pragma omp parallel for reduction(+:res) 
- for (i=0; i<= total; i++){
-  res = res + i;
-  res = res - 2*i;
-  }
- 
- printf("the sum of 1000000 is :%.0f\n", res);
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/reduction2.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/reduction2.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/reduction2.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/reduction2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,20 @@
+#include <stdio.h>
+#include <omp.h>
+
+#define NUM_THREADS 4
+
+void main ()
+{
+ int i,total=1000000;
+ double res=0.0;
+
+ omp_set_num_threads(NUM_THREADS);
+
+ #pragma omp parallel for reduction(+:res) 
+ for (i=0; i<= total; i++){
+  res = res + i;
+  res = res - 2*i;
+  }
+ 
+ printf("the sum of 1000000 is :%.0f\n", res);
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/section.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/section.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/section.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,34 +0,0 @@
-#include <omp.h>
-#include <assert.h>
-int main(){
-  int sum=7;
-  int known_sum;
-  int i;
-#pragma omp parallel
-  {
-#pragma omp sections reduction(+:sum) private(i)
-    {
-#pragma omp section
-      {
-        for (i=1;i<400;i++){
-          sum += i;
-        }
-      }
-#pragma omp section
-      {
-        for(i=400;i<700;i++)
-          sum += i;
-      }
-#pragma omp section
-      {
-        for(i=700;i<1000;i++)
-           sum += i;
-      }
-
-    }/* end of section reduction.*/
-  }                      /* end of parallel */
-  known_sum=(999*1000)/2+7;
-  assert (known_sum==sum);
-  return 0;
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/section.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/section.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/section.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/section.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,34 @@
+#include <omp.h>
+#include <assert.h>
+int main(){
+  int sum=7;
+  int known_sum;
+  int i;
+#pragma omp parallel
+  {
+#pragma omp sections reduction(+:sum) private(i)
+    {
+#pragma omp section
+      {
+        for (i=1;i<400;i++){
+          sum += i;
+        }
+      }
+#pragma omp section
+      {
+        for(i=400;i<700;i++)
+          sum += i;
+      }
+#pragma omp section
+      {
+        for(i=700;i<1000;i++)
+           sum += i;
+      }
+
+    }/* end of section reduction.*/
+  }                      /* end of parallel */
+  known_sum=(999*1000)/2+7;
+  assert (known_sum==sum);
+  return 0;
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/set_num_threads.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/set_num_threads.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/set_num_threads.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,27 +0,0 @@
-#include <stdio.h>
-#include <assert.h>
-#ifdef _OPENMP
-#include <omp.h>
-#endif
-
-int main(void)
-{
-  int counter=0, nthreads;
-#ifdef _OPENMP
-  omp_set_num_threads(-8);
-#endif  
-  #pragma omp parallel 
-  {
-  #pragma omp critical
-    counter ++;
-    nthreads = omp_get_num_threads();
-  }
-  printf("number threads is:%d\n",nthreads);
-#ifdef _OPENMP
-  assert(counter == 7);
-#else
-  assert (counter ==1 );
-#endif  
-  return 0;
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/set_num_threads.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/set_num_threads.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/set_num_threads.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/set_num_threads.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,27 @@
+#include <stdio.h>
+#include <assert.h>
+#ifdef _OPENMP
+#include <omp.h>
+#endif
+
+int main(void)
+{
+  int counter=0, nthreads;
+#ifdef _OPENMP
+  omp_set_num_threads(-8);
+#endif  
+  #pragma omp parallel 
+  {
+  #pragma omp critical
+    counter ++;
+    nthreads = omp_get_num_threads();
+  }
+  printf("number threads is:%d\n",nthreads);
+#ifdef _OPENMP
+  assert(counter == 7);
+#else
+  assert (counter ==1 );
+#endif  
+  return 0;
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/single_copyprivate.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/single_copyprivate.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/single_copyprivate.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,73 +0,0 @@
-
-#include <omp.h>
-#include <stdio.h>
-#define LOOPCOUNT 200
-int
-check_single_copyprivate (FILE * logFile)
-{
-  int result = 0;
-  int nr_iterations = 0;
-  int i;
-#pragma omp parallel private(i)
-  {
-    for (i = 0; i < LOOPCOUNT; i++)
-      {
-	int j;
-	/*
-	   int thread;
-	   thread=omp_get_thread_num();
-	 */
-#pragma omp single copyprivate(j)
-	{
-	  nr_iterations++;
-	  j = i;
-	  /*printf("thread %d assigns ,j=%d,i=%d\n",thread,j,i); */
-	}
-	/*      #pragma omp barrier */
-#pragma omp critical
-	{
-	  /*printf("thread=%d,j=%d,i=%d\n",thread,j,i); */
-	  result = result + j - i;
-	}
-#pragma omp barrier
-      }				/* end of for */
-
-  }				/* end of parallel */
-  return (result == 0) && (nr_iterations == LOOPCOUNT);
-}
-
-
-
-int
-crosscheck_single_copyprivate (FILE * logFile)
-{
-  int result = 0;
-  int nr_iterations = 0;
-  int i;
-#pragma omp parallel private(i)
-  {
-    for (i = 0; i < LOOPCOUNT; i++)
-      {
-	int j;
-	/*
-	   int thread;
-	   thread=omp_get_thread_num();
-	 */
-#pragma omp single private(j)
-	{
-	  nr_iterations++;
-	  j = i;
-	  /*printf("thread %d assigns ,j=%d,i=%d\n",thread,j,i); */
-	}
-	/*      #pragma omp barrier */
-#pragma omp critical
-	{
-	  /*printf("thread=%d,j=%d,i=%d\n",thread,j,i); */
-	  result = result + j - i;
-	}
-#pragma omp barrier
-      }				/* end of for */
-
-  }				/* end of parallel */
-  return (result == 0) && (nr_iterations == LOOPCOUNT);
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/single_copyprivate.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/single_copyprivate.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/single_copyprivate.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/single_copyprivate.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,73 @@
+
+#include <omp.h>
+#include <stdio.h>
+#define LOOPCOUNT 200
+int
+check_single_copyprivate (FILE * logFile)
+{
+  int result = 0;
+  int nr_iterations = 0;
+  int i;
+#pragma omp parallel private(i)
+  {
+    for (i = 0; i < LOOPCOUNT; i++)
+      {
+	int j;
+	/*
+	   int thread;
+	   thread=omp_get_thread_num();
+	 */
+#pragma omp single copyprivate(j)
+	{
+	  nr_iterations++;
+	  j = i;
+	  /*printf("thread %d assigns ,j=%d,i=%d\n",thread,j,i); */
+	}
+	/*      #pragma omp barrier */
+#pragma omp critical
+	{
+	  /*printf("thread=%d,j=%d,i=%d\n",thread,j,i); */
+	  result = result + j - i;
+	}
+#pragma omp barrier
+      }				/* end of for */
+
+  }				/* end of parallel */
+  return (result == 0) && (nr_iterations == LOOPCOUNT);
+}
+
+
+
+int
+crosscheck_single_copyprivate (FILE * logFile)
+{
+  int result = 0;
+  int nr_iterations = 0;
+  int i;
+#pragma omp parallel private(i)
+  {
+    for (i = 0; i < LOOPCOUNT; i++)
+      {
+	int j;
+	/*
+	   int thread;
+	   thread=omp_get_thread_num();
+	 */
+#pragma omp single private(j)
+	{
+	  nr_iterations++;
+	  j = i;
+	  /*printf("thread %d assigns ,j=%d,i=%d\n",thread,j,i); */
+	}
+	/*      #pragma omp barrier */
+#pragma omp critical
+	{
+	  /*printf("thread=%d,j=%d,i=%d\n",thread,j,i); */
+	  result = result + j - i;
+	}
+#pragma omp barrier
+      }				/* end of for */
+
+  }				/* end of parallel */
+  return (result == 0) && (nr_iterations == LOOPCOUNT);
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/spmd1.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/spmd1.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/spmd1.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,34 +0,0 @@
-/*
-1. manual control over work sharing
-*/
-#ifdef _OPENMP
-#include <omp.h>
-#endif 
-#include <stdio.h>
-
-#define N 20
-int a[N];
-int main(void)
-{
-  int i;
-  int id, Nthrds, istart, iend;
-#pragma omp parallel private(i,id,Nthrds,istart,iend)
-{
-/* each thread get self ID and total number of threads
-   then decide which portion of work to do
-*/
-  id = omp_get_thread_num();
-  Nthrds = omp_get_num_threads();
-  istart= id* N/ Nthrds;
-  iend = (id+1)*N/Nthrds; 
-
-//  for (i=0;i<20;i++)
-   for (i=istart;i<iend;i++)
-   {
-    a[i]=i*2;
-    printf("Iteration %2d is carried out by thread %2d\n",\
-           i, omp_get_thread_num());
-   }
-}
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/spmd1.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/spmd1.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/spmd1.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/spmd1.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,34 @@
+/*
+1. manual control over work sharing
+*/
+#ifdef _OPENMP
+#include <omp.h>
+#endif 
+#include <stdio.h>
+
+#define N 20
+int a[N];
+int main(void)
+{
+  int i;
+  int id, Nthrds, istart, iend;
+#pragma omp parallel private(i,id,Nthrds,istart,iend)
+{
+/* each thread get self ID and total number of threads
+   then decide which portion of work to do
+*/
+  id = omp_get_thread_num();
+  Nthrds = omp_get_num_threads();
+  istart= id* N/ Nthrds;
+  iend = (id+1)*N/Nthrds; 
+
+//  for (i=0;i<20;i++)
+   for (i=istart;i<iend;i++)
+   {
+    a[i]=i*2;
+    printf("Iteration %2d is carried out by thread %2d\n",\
+           i, omp_get_thread_num());
+   }
+}
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/staticChunk.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/staticChunk.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/staticChunk.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,18 +0,0 @@
-#include <omp.h>
-#include <stdio.h>
-int main(void)
-{
-double a[1000];
-  int i;
-int n;
-scanf("%d",&n);
-#pragma omp for schedule(static)
-  for (i=0;i<n;i++)
-   {
-    a[i]=(double)i/2.0;
-   }
-printf("a[878]=%f\n",a[878]);
-
-
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/staticChunk.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/staticChunk.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/staticChunk.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/staticChunk.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,18 @@
+#include <omp.h>
+#include <stdio.h>
+int main(void)
+{
+double a[1000];
+  int i;
+int n;
+scanf("%d",&n);
+#pragma omp for schedule(static)
+  for (i=0;i<n;i++)
+   {
+    a[i]=(double)i/2.0;
+   }
+printf("a[878]=%f\n",a[878]);
+
+
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/subteam.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/subteam.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/subteam.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,38 +0,0 @@
-#include <stdio.h>
-
-#if defined(_OPENMP)
-#include <omp.h>
-#endif /* _OPENMP */
-
-#define NUMELEMENT 10000000
-static double a[NUMELEMENT];
-
-static void init(void)
-{
-  int i,j,k;
-   i=i+5; 
-/*assume onthread 1,3 */
-#pragma omp for
-  for (i=0;i<NUMELEMENT;i++)
-   {
-    a[i]=(double)i/2.0;
-    a[i]=(double)i/2.0;
-    a[i]=(double)i/2.0;
-    a[i]=(double)i/2.0;
-   }
-/*default team, on all threads*/
-#pragma omp single 
-  {
-    j=omp_get_thread_num();
-   printf("I am the single one: %d\n",j );
-  }
-}
-
-int main(void){
-
-#pragma omp parallel
- {
-  init();
- }
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/subteam.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/subteam.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/subteam.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/subteam.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,38 @@
+#include <stdio.h>
+
+#if defined(_OPENMP)
+#include <omp.h>
+#endif /* _OPENMP */
+
+#define NUMELEMENT 10000000
+static double a[NUMELEMENT];
+
+static void init(void)
+{
+  int i,j,k;
+   i=i+5; 
+/*assume onthread 1,3 */
+#pragma omp for
+  for (i=0;i<NUMELEMENT;i++)
+   {
+    a[i]=(double)i/2.0;
+    a[i]=(double)i/2.0;
+    a[i]=(double)i/2.0;
+    a[i]=(double)i/2.0;
+   }
+/*default team, on all threads*/
+#pragma omp single 
+  {
+    j=omp_get_thread_num();
+   printf("I am the single one: %d\n",j );
+  }
+}
+
+int main(void){
+
+#pragma omp parallel
+ {
+  init();
+ }
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/subteam2.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/subteam2.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/subteam2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,86 +0,0 @@
-/* test two omp for loops in two subteams
- and a single thread in the 3rd subteam
-*/ 
-#include <stdio.h>
-#include <stdlib.h>
-
-#if defined(_OPENMP)
-#include <omp.h>
-#endif /* _OPENMP */
-
-/*by Liao, new data types and functions to support thread subteams*/
-/*compiler generated new data type to store thread ids in a subteam*/
-
-typedef struct{
-   int iCount;
-   int *iThreadIds;
-} omp_id_set_t;
-omp_id_set_t idSet1,idSet2,idSet3;
-
-extern int __ompc_is_in_idset();
-extern void __ompc_subteam_create();
-void *subteam1, *subteam2, *subteam3; /*use it as &threadsubteam*/
-
-#define NUMELEMENT 100
-
-int main(void){
-
-  int a[NUMELEMENT];
-  int i,j=0,k,sum=0,sum2=0;
-
-/* assume 5 threads */
-#ifdef _OPENMP
-  omp_set_num_threads(5);
-#endif
-/* manual code to generate the thread subteams' ID sets currently */
-/*stuff code to get ids from the thread ids in the subteam*/
- idSet1.iCount=2;
- idSet1.iThreadIds=(int *)malloc(2*sizeof(int));
- idSet1.iThreadIds[0]=1;
- idSet1.iThreadIds[1]=3;
-
- idSet2.iCount=2;
- idSet2.iThreadIds=(int *)malloc(2*sizeof(int));
- idSet2.iThreadIds[0]=0;
- idSet2.iThreadIds[1]=2;
-
- idSet3.iCount=1;
- idSet3.iThreadIds=(int *)malloc(1*sizeof(int));
- idSet3.iThreadIds[0]=1;
-
-
-#pragma omp parallel
- {
-/* onthreads(0,2) */
-#pragma omp for reduction(+:sum)
-  for (i=1;i<=NUMELEMENT;i++)
-   {
-     sum = sum +i;
-   }
-
-/* onthreads(1,3) */
-#pragma omp for schedule(dynamic,5)
-  for (i=0;i<NUMELEMENT;i++)
-   {
-    a[i]=9;
-   }
-
-/* onthread 4 */
-#pragma omp single 
-  {
-#ifdef _OPENMP
-    j=omp_get_thread_num();
-#endif
-   printf("I am the single one: %d\n",j );
-  }
- }/*end of parallel */
-
-/*------verify results---------------*/
-    for (i=0;i<NUMELEMENT;i++)
-   {
-    sum2=sum2+a[i];
-   }
- printf("sum=%d\n",sum);
- printf("sum2=%d\n",sum2);
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/subteam2.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/subteam2.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/subteam2.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/subteam2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,86 @@
+/* test two omp for loops in two subteams
+ and a single thread in the 3rd subteam
+*/ 
+#include <stdio.h>
+#include <stdlib.h>
+
+#if defined(_OPENMP)
+#include <omp.h>
+#endif /* _OPENMP */
+
+/*by Liao, new data types and functions to support thread subteams*/
+/*compiler generated new data type to store thread ids in a subteam*/
+
+typedef struct{
+   int iCount;
+   int *iThreadIds;
+} omp_id_set_t;
+omp_id_set_t idSet1,idSet2,idSet3;
+
+extern int __ompc_is_in_idset();
+extern void __ompc_subteam_create();
+void *subteam1, *subteam2, *subteam3; /*use it as &threadsubteam*/
+
+#define NUMELEMENT 100
+
+int main(void){
+
+  int a[NUMELEMENT];
+  int i,j=0,k,sum=0,sum2=0;
+
+/* assume 5 threads */
+#ifdef _OPENMP
+  omp_set_num_threads(5);
+#endif
+/* manual code to generate the thread subteams' ID sets currently */
+/*stuff code to get ids from the thread ids in the subteam*/
+ idSet1.iCount=2;
+ idSet1.iThreadIds=(int *)malloc(2*sizeof(int));
+ idSet1.iThreadIds[0]=1;
+ idSet1.iThreadIds[1]=3;
+
+ idSet2.iCount=2;
+ idSet2.iThreadIds=(int *)malloc(2*sizeof(int));
+ idSet2.iThreadIds[0]=0;
+ idSet2.iThreadIds[1]=2;
+
+ idSet3.iCount=1;
+ idSet3.iThreadIds=(int *)malloc(1*sizeof(int));
+ idSet3.iThreadIds[0]=1;
+
+
+#pragma omp parallel
+ {
+/* onthreads(0,2) */
+#pragma omp for reduction(+:sum)
+  for (i=1;i<=NUMELEMENT;i++)
+   {
+     sum = sum +i;
+   }
+
+/* onthreads(1,3) */
+#pragma omp for schedule(dynamic,5)
+  for (i=0;i<NUMELEMENT;i++)
+   {
+    a[i]=9;
+   }
+
+/* onthread 4 */
+#pragma omp single 
+  {
+#ifdef _OPENMP
+    j=omp_get_thread_num();
+#endif
+   printf("I am the single one: %d\n",j );
+  }
+ }/*end of parallel */
+
+/*------verify results---------------*/
+    for (i=0;i<NUMELEMENT;i++)
+   {
+    sum2=sum2+a[i];
+   }
+ printf("sum=%d\n",sum);
+ printf("sum2=%d\n",sum2);
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/task_largenumber.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/task_largenumber.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/task_largenumber.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,24 +0,0 @@
-#include <stdio.h>
-#include <omp.h>
-
-#define LARGE_NUMBER 10000000
-double item[LARGE_NUMBER];
-void process (double input)
-{
-  printf("processing %f by thread %d\n",input, omp_get_thread_num());
-}
-int
-main ()
-{
-#pragma omp parallel
-  {
-#pragma omp single
-    {
-      int i;
-      printf("Using %d threads.\n",omp_get_num_threads());
-      for (i = 0; i < LARGE_NUMBER; i++)
-        #pragma omp task
-         process (item[i]);
-    }
-  }
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/task_largenumber.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/task_largenumber.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/task_largenumber.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/task_largenumber.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,24 @@
+#include <stdio.h>
+#include <omp.h>
+
+#define LARGE_NUMBER 10000000
+double item[LARGE_NUMBER];
+void process (double input)
+{
+  printf("processing %f by thread %d\n",input, omp_get_thread_num());
+}
+int
+main ()
+{
+#pragma omp parallel
+  {
+#pragma omp single
+    {
+      int i;
+      printf("Using %d threads.\n",omp_get_num_threads());
+      for (i = 0; i < LARGE_NUMBER; i++)
+        #pragma omp task
+         process (item[i]);
+    }
+  }
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/task_link.cpp
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/task_link.cpp	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/task_link.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,86 +0,0 @@
-/*
- * The single thread will join to do the processing?
- * The other threads can do the processing before 
- * the single thread finishes generating tasks?
- * 
- * Based on OMP spec. 3.0 Example A.13.3c
- * By Liao
- * 9/12/2008
- */
-#include <iostream>
-#include <omp.h>
-using namespace std;
-class node
-{
-public:  
-  int data;
-  node *next;
-  node(int i):data(i){}
-  void setNext(node* n){next = n;}
-};
-
-void process (node * p)
-{
-  cout<<"Found node:"<<p->data;
-#if _OPENMP  
-  cout<<" by thread:"<<omp_get_thread_num();
-#endif  
-  cout<<endl;
-}
-
-node* root;
-
-void init()
-{
-  root = new node(1);
-  node* node2= new node(2);
-  root->setNext(node2);
-  node* node3= new node(3);
-  node2->setNext(node3);
-  node* node4 = new node(4);
-  node3->setNext(node4);
-  node* node5 = new node(5);
-  node4->setNext(node5);
-
-  node* node6= new node(6);
-  node5->setNext(node6);
-  node* node7= new node(7);
-  node6->setNext(node7);
-  node* node8= new node(8);
-  node7->setNext(node8);
-  node* node9= new node(9);
-  node8->setNext(node9);
-  node* node10= new node(10);
-  node9->setNext(node10);
-}
-void
-increment_list_items (node * head)
-{
-#pragma omp parallel
-  {
-#pragma omp single
-    {
-#if _OPENMP      
-      cout<<"Total threads :"<<omp_get_num_threads();
-      cout<<", reported by thread:"<<omp_get_thread_num()<<endl;
-#endif      
-      node *p = head;
-      while (p)
-	{
-// p is firstprivate by default
-//#pragma omp task if (0)
-#pragma omp task 
-	  process (p);
-//#pragma omp taskwait          
-	  p = p->next;
-	} // end while
-    } // end single
-  }// end parallel
-}
-
-int main()
-{
-  init();
-  increment_list_items(root);
-  return 0;
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/task_link.cpp (from rev 128, trunk/tests/CompileTests/OpenMP_tests/task_link.cpp)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/task_link.cpp	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/task_link.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,86 @@
+/*
+ * The single thread will join to do the processing?
+ * The other threads can do the processing before 
+ * the single thread finishes generating tasks?
+ * 
+ * Based on OMP spec. 3.0 Example A.13.3c
+ * By Liao
+ * 9/12/2008
+ */
+#include <iostream>
+#include <omp.h>
+using namespace std;
+class node
+{
+public:  
+  int data;
+  node *next;
+  node(int i):data(i){}
+  void setNext(node* n){next = n;}
+};
+
+void process (node * p)
+{
+  cout<<"Found node:"<<p->data;
+#if _OPENMP  
+  cout<<" by thread:"<<omp_get_thread_num();
+#endif  
+  cout<<endl;
+}
+
+node* root;
+
+void init()
+{
+  root = new node(1);
+  node* node2= new node(2);
+  root->setNext(node2);
+  node* node3= new node(3);
+  node2->setNext(node3);
+  node* node4 = new node(4);
+  node3->setNext(node4);
+  node* node5 = new node(5);
+  node4->setNext(node5);
+
+  node* node6= new node(6);
+  node5->setNext(node6);
+  node* node7= new node(7);
+  node6->setNext(node7);
+  node* node8= new node(8);
+  node7->setNext(node8);
+  node* node9= new node(9);
+  node8->setNext(node9);
+  node* node10= new node(10);
+  node9->setNext(node10);
+}
+void
+increment_list_items (node * head)
+{
+#pragma omp parallel
+  {
+#pragma omp single
+    {
+#if _OPENMP      
+      cout<<"Total threads :"<<omp_get_num_threads();
+      cout<<", reported by thread:"<<omp_get_thread_num()<<endl;
+#endif      
+      node *p = head;
+      while (p)
+	{
+// p is firstprivate by default
+//#pragma omp task if (0)
+#pragma omp task 
+	  process (p);
+//#pragma omp taskwait          
+	  p = p->next;
+	} // end while
+    } // end single
+  }// end parallel
+}
+
+int main()
+{
+  init();
+  increment_list_items(root);
+  return 0;
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/task_orphaned.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/task_orphaned.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/task_orphaned.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,6 +0,0 @@
-extern void process();
-void foo()
-{
- #pragma omp task
- process();
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/task_orphaned.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/task_orphaned.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/task_orphaned.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/task_orphaned.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,6 @@
+extern void process();
+void foo()
+{
+ #pragma omp task
+ process();
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/task_tree.cpp
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/task_tree.cpp	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/task_tree.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,111 +0,0 @@
-/*
- * OMP 3.0 p.178
- * Example A.13.1c
- *
- * OpenMP tasks will be executed asynchronously 
- * Assuming pre-order/post-order of traversal is wrong
- * unless #pragma omp taskwait is used in the end
- * 9/12/2008
- */
-#include<iostream> 
-#ifdef _OPENMP
-#include<omp.h>
-#endif
-
-using namespace std;
-
-//A simple binary tree node
-class node {
-  public:
-    int id;
-    node* parent;
-    class node* left; // class node or node here? Both
-    node* right;
-    node(int id):id(id){}
-    void setLeft(node* child) { left = child; child->parent = this;}
-    void setRight(node* child){ right = child; child->parent = this;}
-};
-
-void process(node* n) 
-{
-#pragma omp critical  
-  printf("Found node %d\n",n->id);
-}
-
-void traverse (struct node *p)
-{
-  //process(p); // pre-order
-  if (p->left)
-  {
-#pragma omp task
-    traverse(p->left);
-  }
- // else // very wrong!!
-  
-  if(p->right) 
-  {
-#pragma omp task
-     traverse(p->right);
-  }
-//#pragma omp taskwait     
-  process(p); // post-order   
-}
-
-
-struct node * tree;
-/*!
- *      1
- *     /  \
- *    2    3
- *   /  \  / \
- *  4   5  6  7
- * /\   /\
- * 8 9 10
- *
- */
-void init()
-{
-  tree = new node(1);
-  node* child2 = new node(2);  
-  node* child3 = new node(3);  
-  node* child4 = new node(4);  
-  node* child5 = new node(5);  
-  node* child6 = new node(6);  
-  node* child7 = new node(7);  
-  node* child8 = new node(8);  
-  node* child9 = new node(9);  
-  node* child10 = new node(10);  
-
-  tree->setLeft(child2);
-  tree->setRight(child3);
-
-  child2->setLeft(child4);
-  child2->setRight(child5);
-  
-  child3->setLeft(child6);
-  child3->setRight(child7);
-
-  child4->setLeft(child8);
-  child4->setRight(child9);
-
-  child5->setLeft(child10);
-}
-
-int main()
-{
-  init(); 
-#ifdef _OPENMP  
-  omp_set_num_threads(4);
-#endif  
-
-//// wrong? seg fault
-//#pragma omp parallel  
-
-//#pragma omp parallel sections
-#pragma omp parallel 
-{
-#pragma omp single
-  traverse(tree);
-}
-  return 0;
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/task_tree.cpp (from rev 128, trunk/tests/CompileTests/OpenMP_tests/task_tree.cpp)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/task_tree.cpp	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/task_tree.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,111 @@
+/*
+ * OMP 3.0 p.178
+ * Example A.13.1c
+ *
+ * OpenMP tasks will be executed asynchronously 
+ * Assuming pre-order/post-order of traversal is wrong
+ * unless #pragma omp taskwait is used in the end
+ * 9/12/2008
+ */
+#include<iostream> 
+#ifdef _OPENMP
+#include<omp.h>
+#endif
+
+using namespace std;
+
+//A simple binary tree node
+class node {
+  public:
+    int id;
+    node* parent;
+    class node* left; // class node or node here? Both
+    node* right;
+    node(int id):id(id){}
+    void setLeft(node* child) { left = child; child->parent = this;}
+    void setRight(node* child){ right = child; child->parent = this;}
+};
+
+void process(node* n) 
+{
+#pragma omp critical  
+  printf("Found node %d\n",n->id);
+}
+
+void traverse (struct node *p)
+{
+  //process(p); // pre-order
+  if (p->left)
+  {
+#pragma omp task
+    traverse(p->left);
+  }
+ // else // very wrong!!
+  
+  if(p->right) 
+  {
+#pragma omp task
+     traverse(p->right);
+  }
+//#pragma omp taskwait     
+  process(p); // post-order   
+}
+
+
+struct node * tree;
+/*!
+ *      1
+ *     /  \
+ *    2    3
+ *   /  \  / \
+ *  4   5  6  7
+ * /\   /\
+ * 8 9 10
+ *
+ */
+void init()
+{
+  tree = new node(1);
+  node* child2 = new node(2);  
+  node* child3 = new node(3);  
+  node* child4 = new node(4);  
+  node* child5 = new node(5);  
+  node* child6 = new node(6);  
+  node* child7 = new node(7);  
+  node* child8 = new node(8);  
+  node* child9 = new node(9);  
+  node* child10 = new node(10);  
+
+  tree->setLeft(child2);
+  tree->setRight(child3);
+
+  child2->setLeft(child4);
+  child2->setRight(child5);
+  
+  child3->setLeft(child6);
+  child3->setRight(child7);
+
+  child4->setLeft(child8);
+  child4->setRight(child9);
+
+  child5->setLeft(child10);
+}
+
+int main()
+{
+  init(); 
+#ifdef _OPENMP  
+  omp_set_num_threads(4);
+#endif  
+
+//// wrong? seg fault
+//#pragma omp parallel  
+
+//#pragma omp parallel sections
+#pragma omp parallel 
+{
+#pragma omp single
+  traverse(tree);
+}
+  return 0;
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/task_underIf.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/task_underIf.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/task_underIf.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,31 +0,0 @@
-/* test pragma under the true body of if statement 
- *  two cases: inside {} or directly attached to true/false body
- *
- *  Liao, 10/1/2008
- * */
-extern void process(int);
-extern void process2(int);
-int item[100];
-void foo(int i)
-{
-  if (i%2==0)
-    #pragma omp task
-    process (item[i]);
-  else
-   #pragma omp task
-    process2(item[i]);
-
-   if (i%2==0)
-   {
-    #pragma omp task
-    process (item[i]);
-   }
-  else
-  {
-    #pragma omp task
-    process2(item[i]);
-  }
-   
-}
-
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/task_underIf.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/task_underIf.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/task_underIf.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/task_underIf.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,31 @@
+/* test pragma under the true body of if statement 
+ *  two cases: inside {} or directly attached to true/false body
+ *
+ *  Liao, 10/1/2008
+ * */
+extern void process(int);
+extern void process2(int);
+int item[100];
+void foo(int i)
+{
+  if (i%2==0)
+    #pragma omp task
+    process (item[i]);
+  else
+   #pragma omp task
+    process2(item[i]);
+
+   if (i%2==0)
+   {
+    #pragma omp task
+    process (item[i]);
+   }
+  else
+  {
+    #pragma omp task
+    process2(item[i]);
+  }
+   
+}
+
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/task_untied.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/task_untied.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/task_untied.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,49 +0,0 @@
-/*
- * the task-generation loop is put into a untied task
- * So when the thread running task-generation loop get preempted to
- * conduct the generated tasks,
- * the other threads can resume the task-generation task, which
- * is not tied to the original thread.
- */
-#include <stdio.h>
-#include <omp.h>
-
-#define LARGE_NUMBER 10000000
-double item[LARGE_NUMBER];
-void process (double input)
-{
-  printf("processing %f by thread %d\n",input, omp_get_thread_num());
-}
-int
-main ()
-{
-#pragma omp parallel
-  {
-#pragma omp single
-    {
-      int i;
-      printf("Using %d threads.\n",omp_get_num_threads());
-/*
- untied cannot be used with omp single
- So another level of task is needed to used untied here!!
-
- explicit tasks: 
-  * generated by #omp task
-  * tied or untied
-
- implicit tasks: 
-  * generated by #omp parallel
-  * always tied!!
-*/   
-#pragma omp task untied
-// i is firstprivate, item is shared
-      {
-	for (i = 0; i < LARGE_NUMBER; i++)
-	{
-#pragma omp task
-	  process (item[i]);
-	}
-      }
-    }
-  }
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/task_untied.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/task_untied.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/task_untied.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/task_untied.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,49 @@
+/*
+ * the task-generation loop is put into a untied task
+ * So when the thread running task-generation loop get preempted to
+ * conduct the generated tasks,
+ * the other threads can resume the task-generation task, which
+ * is not tied to the original thread.
+ */
+#include <stdio.h>
+#include <omp.h>
+
+#define LARGE_NUMBER 10000000
+double item[LARGE_NUMBER];
+void process (double input)
+{
+  printf("processing %f by thread %d\n",input, omp_get_thread_num());
+}
+int
+main ()
+{
+#pragma omp parallel
+  {
+#pragma omp single
+    {
+      int i;
+      printf("Using %d threads.\n",omp_get_num_threads());
+/*
+ untied cannot be used with omp single
+ So another level of task is needed to used untied here!!
+
+ explicit tasks: 
+  * generated by #omp task
+  * tied or untied
+
+ implicit tasks: 
+  * generated by #omp parallel
+  * always tied!!
+*/   
+#pragma omp task untied
+// i is firstprivate, item is shared
+      {
+	for (i = 0; i < LARGE_NUMBER; i++)
+	{
+#pragma omp task
+	  process (item[i]);
+	}
+      }
+    }
+  }
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/task_wait.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/task_wait.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/task_wait.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,47 +0,0 @@
-
-/* input: result
- * 5 : 5
- * 10: 55
- * 20: 6756
- * 30: 832040
- * 40: 102334155
- * 50: runs for quite a while. for int type and return negative values
- *     using unsigned long int: 3 996 334 433
- *
- * Based on A.13.4c, p182 of OMP 3.0 spec.
- *
- * How much speedup can we get when omp taskwait is used??
- *
- * 9/15/2008
- */
-#include <stdio.h>
-unsigned long int input = 50;
-
-unsigned long int fib(unsigned long int n) {
-  unsigned long int i, j;
-  if (n<2)
-    return n;
-  else 
-  {
-    #pragma omp task shared(i)
-     i=fib(n-1);
-    #pragma omp task shared(j)
-    j=fib(n-2);
-    #pragma omp taskwait
-     return i+j;
-  }
-}
-
-int main()
-{
-  unsigned long int result = 0;
-#pragma omp parallel
-  {
-   #pragma omp single
-    {
-      result = fib(input);
-    }
-  }
-  printf("Fibonacci number for %d is:%u\n",input, result);
-  return 0;
- }

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/task_wait.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/task_wait.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/task_wait.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/task_wait.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,47 @@
+
+/* input: result
+ * 5 : 5
+ * 10: 55
+ * 20: 6756
+ * 30: 832040
+ * 40: 102334155
+ * 50: runs for quite a while. for int type and return negative values
+ *     using unsigned long int: 3 996 334 433
+ *
+ * Based on A.13.4c, p182 of OMP 3.0 spec.
+ *
+ * How much speedup can we get when omp taskwait is used??
+ *
+ * 9/15/2008
+ */
+#include <stdio.h>
+unsigned long int input = 50;
+
+unsigned long int fib(unsigned long int n) {
+  unsigned long int i, j;
+  if (n<2)
+    return n;
+  else 
+  {
+    #pragma omp task shared(i)
+     i=fib(n-1);
+    #pragma omp task shared(j)
+    j=fib(n-2);
+    #pragma omp taskwait
+     return i+j;
+  }
+}
+
+int main()
+{
+  unsigned long int result = 0;
+#pragma omp parallel
+  {
+   #pragma omp single
+    {
+      result = fib(input);
+    }
+  }
+  printf("Fibonacci number for %d is:%u\n",input, result);
+  return 0;
+ }

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/threadProcessor.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/threadProcessor.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/threadProcessor.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,18 +0,0 @@
-#include <stdio.h>
-#include <omp.h>
-#include <pthread.h>
-extern int pthread_num_processors_np(void);
-int main(void)
-{
-int tid,procid;
-omp_set_num_threads(4);
-
-#pragma omp parallel private(tid,procid)
-{
-  tid=omp_get_thread_num();
-  procid=pthread_num_processors_np();
-  printf("Hello,world.! by thread %d  on processor %d\n",tid,procid);
-
-}
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/threadProcessor.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/threadProcessor.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/threadProcessor.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/threadProcessor.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include <omp.h>
+#include <pthread.h>
+extern int pthread_num_processors_np(void);
+int main(void)
+{
+int tid,procid;
+omp_set_num_threads(4);
+
+#pragma omp parallel private(tid,procid)
+{
+  tid=omp_get_thread_num();
+  procid=pthread_num_processors_np();
+  printf("Hello,world.! by thread %d  on processor %d\n",tid,procid);
+
+}
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/threadprivate.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,15 +0,0 @@
-#include <stdio.h>
-#ifdef _OPENMP
-#include <omp.h>
-#endif 
-int counter=0;
-#pragma omp threadprivate(counter)
-int main(void)
-{
- int i;
-#pragma omp parallel for
- for(i=0;i<10000;i++)
-    counter++;
-#pragma omp parallel
-  printf("counter=%d\n",counter);
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/threadprivate.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,15 @@
+#include <stdio.h>
+#ifdef _OPENMP
+#include <omp.h>
+#endif 
+int counter=0;
+#pragma omp threadprivate(counter)
+int main(void)
+{
+ int i;
+#pragma omp parallel for
+ for(i=0;i<10000;i++)
+    counter++;
+#pragma omp parallel
+  printf("counter=%d\n",counter);
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate2.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/threadprivate2.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,18 +0,0 @@
-#include <stdio.h>
-#ifdef _OPENMP
-#include <omp.h>
-#endif 
-int counter=0;
-#pragma omp threadprivate(counter)
-int main(void)
-{
- int i;
-#pragma omp parallel for
- for(i=0;i<10000;i++)
-    counter++;
-#pragma omp parallel for
- for(i=0;i<10000;i++)
-    counter+=3;
-#pragma omp parallel
-  printf("counter=%d\n",counter);
-}

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate2.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/threadprivate2.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate2.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate2.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#ifdef _OPENMP
+#include <omp.h>
+#endif 
+int counter=0;
+#pragma omp threadprivate(counter)
+int main(void)
+{
+ int i;
+#pragma omp parallel for
+ for(i=0;i<10000;i++)
+    counter++;
+#pragma omp parallel for
+ for(i=0;i<10000;i++)
+    counter+=3;
+#pragma omp parallel
+  printf("counter=%d\n",counter);
+}

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate3.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/threadprivate3.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate3.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,35 +0,0 @@
-#include <stdio.h>
-#ifdef _OPENMP
-#include <omp.h>
-#endif
-
-static int sum0=0;
-#pragma omp threadprivate(sum0)
-
-int main()
-{
-  int sum=0,sum1=0;
-  int i;
-#pragma omp parallel
-  {
-     sum0=0;
-#pragma omp for
-       for (i=1;i<=1000;i++)
-          {
-	         sum0=sum0+i;
-          }                       /*end of for*/
-#pragma omp critical
-         {
-    printf("partial sum0 is:%d\n",sum0);
-     sum= sum+sum0;
-          }    /*end of critical*/
-  }           /* end of parallel*/
-  
-   for (i=1;i<=1000;i++)
-      {
-         sum1=sum1+i;
-      }                       /*end of for*/
-  printf("sum=%d; sum1=%d\n",sum,sum1);
-  return(sum==sum1);
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate3.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/threadprivate3.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate3.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/threadprivate3.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,35 @@
+#include <stdio.h>
+#ifdef _OPENMP
+#include <omp.h>
+#endif
+
+static int sum0=0;
+#pragma omp threadprivate(sum0)
+
+int main()
+{
+  int sum=0,sum1=0;
+  int i;
+#pragma omp parallel
+  {
+     sum0=0;
+#pragma omp for
+       for (i=1;i<=1000;i++)
+          {
+	         sum0=sum0+i;
+          }                       /*end of for*/
+#pragma omp critical
+         {
+    printf("partial sum0 is:%d\n",sum0);
+     sum= sum+sum0;
+          }    /*end of critical*/
+  }           /* end of parallel*/
+  
+   for (i=1;i<=1000;i++)
+      {
+         sum1=sum1+i;
+      }                       /*end of for*/
+  printf("sum=%d; sum1=%d\n",sum,sum1);
+  return(sum==sum1);
+}
+

Deleted: branches/testonly/tests/CompileTests/OpenMP_tests/variables.c
===================================================================
--- trunk/tests/CompileTests/OpenMP_tests/variables.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/variables.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,58 +0,0 @@
-/*
-test input
-
-  handling of variable scopes:
-   private, firstprivate, lastprivate
-   shared : from the same scope or from upper level scope
-By C. Liao
-*/
-#include <stdio.h>
-
-#ifdef _OPENMP
-#include "omp.h"
-#endif
-
-int gi=0;
-int m=1;
-double mm=9.0;
-#pragma omp threadprivate(m)
-//#pragma omp threadprivate(mm)
-
-int main(void)
-{
- int i;
- int k_3;
- int gj=0;
- double j=0.5;
-// m=1;
-// mm=9.0;
- k_3=7;
-
-#pragma omp parallel private (i) firstprivate(k_3) reduction(+:gi,gj) private(mm)
- {
- int k=1;
-#ifdef  _OPENMP 
- i=omp_get_thread_num();
-#endif
- printf("Hello,world! I am thread %d\n",i);
-//#pragma omp for shared(mm) 
-// shared () cannot be used with 'omp for' according to the specification 
-#pragma omp for
-for (i=0;i<100;i++)
- {i+=mm;}
-
-#pragma omp single 
- printf("mm is:%f\n",mm);
-#pragma omp critical
- gi=i+j+k+k_3;
-// int i=5;
- gi+=i;
-#pragma omp atomic
- j++;
- gj+=m+mm;
-
- }
-printf("gi is %d,gj is %d\n",gi,gj);
-return 0;
-}
-

Copied: branches/testonly/tests/CompileTests/OpenMP_tests/variables.c (from rev 128, trunk/tests/CompileTests/OpenMP_tests/variables.c)
===================================================================
--- branches/testonly/tests/CompileTests/OpenMP_tests/variables.c	                        (rev 0)
+++ branches/testonly/tests/CompileTests/OpenMP_tests/variables.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,58 @@
+/*
+test input
+
+  handling of variable scopes:
+   private, firstprivate, lastprivate
+   shared : from the same scope or from upper level scope
+By C. Liao
+*/
+#include <stdio.h>
+
+#ifdef _OPENMP
+#include "omp.h"
+#endif
+
+int gi=0;
+int m=1;
+double mm=9.0;
+#pragma omp threadprivate(m)
+//#pragma omp threadprivate(mm)
+
+int main(void)
+{
+ int i;
+ int k_3;
+ int gj=0;
+ double j=0.5;
+// m=1;
+// mm=9.0;
+ k_3=7;
+
+#pragma omp parallel private (i) firstprivate(k_3) reduction(+:gi,gj) private(mm)
+ {
+ int k=1;
+#ifdef  _OPENMP 
+ i=omp_get_thread_num();
+#endif
+ printf("Hello,world! I am thread %d\n",i);
+//#pragma omp for shared(mm) 
+// shared () cannot be used with 'omp for' according to the specification 
+#pragma omp for
+for (i=0;i<100;i++)
+ {i+=mm;}
+
+#pragma omp single 
+ printf("mm is:%f\n",mm);
+#pragma omp critical
+ gi=i+j+k+k_3;
+// int i=5;
+ gi+=i;
+#pragma omp atomic
+ j++;
+ gj+=m+mm;
+
+ }
+printf("gi is %d,gj is %d\n",gi,gj);
+return 0;
+}
+

Modified: branches/testonly/tests/CompileTests/virtualCFG_tests/testVirtualCFG.C
===================================================================
--- branches/testonly/tests/CompileTests/virtualCFG_tests/testVirtualCFG.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompileTests/virtualCFG_tests/testVirtualCFG.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -2,6 +2,7 @@
 // and whether the forward and backward edge sets are consistent
 
 #include "rose.h"
+#include <algorithm>
 using namespace std;
 using namespace VirtualCFG;
 
@@ -34,21 +35,21 @@
      }
 
   // Get the forward edges from each node
-  map<CFGNode, set<CFGEdge> > forwardEdges; // Source to set of edges
+  map<CFGNode, vector<CFGEdge> > forwardEdges; // Source to set of edges
   for (set<CFGNode>::const_iterator i = nodes.begin(); i != nodes.end(); ++i) {
     vector<CFGEdge> oe = i->outEdges();
-    forwardEdges[*i] = set<CFGEdge>(oe.begin(), oe.end());
+    forwardEdges[*i] = oe;
   }
 
   // Get the backward edges to each node from other nodes in the set
   // There may be spurious edges from unreachable nodes to nodes that are
   // reachable, but those don't matter for checking the CFG correctness
-  map<CFGNode, set<CFGEdge> > backwardEdges; // Source to set of edges
+  map<CFGNode, vector<CFGEdge> > backwardEdges; // Source to set of edges
   for (set<CFGNode>::const_iterator i = nodes.begin(); i != nodes.end(); ++i) {
     vector<CFGEdge> ie = i->inEdges();
     for (vector<CFGEdge>::const_iterator j = ie.begin(); j != ie.end(); ++j) {
       if (nodes.find(j->source()) != nodes.end()) {
-        backwardEdges[j->source()].insert(*j);
+        backwardEdges[j->source()].push_back(*j);
       }
     }
   }
@@ -61,18 +62,18 @@
   bool anyMismatches = false;
   for (set<CFGNode>::const_iterator i = nodes.begin(); i != nodes.end(); ++i) {
     CFGNode n = *i;
-    const set<CFGEdge>& forwardEdgesFromN = forwardEdges[n];
-    const set<CFGEdge>& backwardEdgesFromN = backwardEdges[n];
-    for (set<CFGEdge>::const_iterator j = forwardEdgesFromN.begin();
+    const vector<CFGEdge>& forwardEdgesFromN = forwardEdges[n];
+    const vector<CFGEdge>& backwardEdgesFromN = backwardEdges[n];
+    for (vector<CFGEdge>::const_iterator j = forwardEdgesFromN.begin();
          j != forwardEdgesFromN.end(); ++j) {
-      if (backwardEdgesFromN.find(*j) == backwardEdgesFromN.end()) {
+      if (std::find(backwardEdgesFromN.begin(), backwardEdgesFromN.end(), *j) == backwardEdgesFromN.end()) {
         cerr << "Found edge in forward set which is not in backward set: " << j->source().toStringForDebugging() << " -> " << j->target().toStringForDebugging() << " " << j->toStringForDebugging() << endl;
         anyMismatches = true;
       }
     }
-    for (set<CFGEdge>::const_iterator j = backwardEdgesFromN.begin();
+    for (vector<CFGEdge>::const_iterator j = backwardEdgesFromN.begin();
          j != backwardEdgesFromN.end(); ++j) {
-      if (forwardEdgesFromN.find(*j) == forwardEdgesFromN.end()) {
+      if (std::find(forwardEdgesFromN.begin(), forwardEdgesFromN.end(), *j) == forwardEdgesFromN.end()) {
         cerr << "Found edge in backward set which is not in forward set: " << j->source().toStringForDebugging() << " -> " << j->target().toStringForDebugging() << " " << j->toStringForDebugging() << endl;
         anyMismatches = true;
       }

Modified: branches/testonly/tests/CompilerOptionsTests/testFileNamesAndExtensions/Makefile.am
===================================================================
--- branches/testonly/tests/CompilerOptionsTests/testFileNamesAndExtensions/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/CompilerOptionsTests/testFileNamesAndExtensions/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -102,3 +102,4 @@
 	*.C.pdf *.C.edg.pdf *.pdf *.int.C rose_directives_list.txt core \
 	rose_*.s *.new *.dump
 	rm -rf ti_files a*.out
+	rm -rf rose_testFileNamesAndExtensions

Modified: branches/testonly/tests/roseTests/astOutliningTests/fortranTests/Makefile.am
===================================================================
--- branches/testonly/tests/roseTests/astOutliningTests/fortranTests/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/astOutliningTests/fortranTests/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -161,6 +161,6 @@
 
 
 clean-local:
-	rm -f rose_* *.o *.dot *.out *.mod core* *.s *.dot *.pdf *.log *.ps *~
+	rm -f rose_* *.o *.dot *.out *.mod core* *.s *.dot *.pdf *.log *.ps *~ *.rmod
 	rm -rf QMTest
 

Modified: branches/testonly/tests/roseTests/programAnalysisTests/Makefile.am
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,7 +1,7 @@
 include $(top_srcdir)/config/Makefile.for.ROSE.includes.and.libs
 
 # Need to add sibdirectory for annotation parser tests as well
-SUBDIRS = testCallGraphAnalysis defUseAnalysisTests staticInterproceduralSlicingTests sideEffectAnalysisTests
+SUBDIRS = testCallGraphAnalysis defUseAnalysisTests variableLivenessTests staticInterproceduralSlicingTests sideEffectAnalysisTests
 #ptrTraceDriver
 
 INCLUDES = $(ROSE_INCLUDES) -I$(top_srcdir)/src/midend/programAnalysis -I$(top_srcdir)/src/midend/programAnalysis/pointerAnal -I${top_srcdir}/src/midend/programAnalysis/CFG -I${top_srcdir}/src/midend/programAnalysis/dataflowAnalysis -I$(top_srcdir)/src/util/support -I$(top_srcdir)/src/util/graphs -I$(top_srcdir)/src/midend/astUtil/astSupport -I$(top_srcdir)/src/midend/astUtil/astInterface -I$(top_srcdir)/src/midend/astUtil -I$(top_srcdir)/src/midend/programAnalysis/ 

Modified: branches/testonly/tests/roseTests/programAnalysisTests/defUseAnalysisTests/Makefile.am
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/defUseAnalysisTests/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/defUseAnalysisTests/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -19,10 +19,10 @@
 # Build the list of object files
 TEST_Objects = ${TESTCODES:.C=.o}
 
-ROSE_FLAGS = -rose:verbose 2
+#ROSE_FLAGS = -rose:verbose 2
 # ROSE_FLAGS = 
 
-TEST_TRANSLATOR = ./runTest all $(ROSE_FLAGS)
+TEST_TRANSLATOR = ./runTest all $(ROSE_FLAGS) > output
 TESTCODE_INCLUDES =
 
 # DQ (7/12/2004): Modified to run with make -j4 options
@@ -41,7 +41,7 @@
 
 
 clean-local:
-	rm -rf $(CXX_TEMPLATE_OBJECTS) *.o rose_*.C *.dot Templates.DB ii_files ti_files DATABASE DATABASE.dot
+	rm -rf $(CXX_TEMPLATE_OBJECTS) *.o rose_*.C *.dot Templates.DB ii_files ti_files DATABASE DATABASE.dot output *.pdf
 
 distclean-local:
 	rm -rf Templates.DB 

Modified: branches/testonly/tests/roseTests/programAnalysisTests/defUseAnalysisTests/runTest.C
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/defUseAnalysisTests/runTest.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/defUseAnalysisTests/runTest.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -112,7 +112,7 @@
       }
       if (hit!=useresults.size()) {
 	cout << " Error: No hit! ... DFA values of node " << nrOfNodes << " are not correct! " << endl;
-	exit(0);
+	exit(1);
       }
     } // if
   }
@@ -196,6 +196,7 @@
   int b;
   std::stringstream ss(str);
   ss >> b;
+  if (!ss) return 0;
   return b;
 }
 
@@ -337,7 +338,7 @@
       results.insert(pair<string,int>("i", 12));
       results.insert(pair<string,int>("i", 31));
       useresults.insert(pair<string,int>("i", 15));    
-      useresults.insert(pair<string,int>("array", 21));    
+      useresults.insert(pair<string,int>("array", 20));    
       testOneFunction("::main", argvList, debug, 30, results,useresults);
     }
 
@@ -366,9 +367,9 @@
       results.insert(pair<string,int>("p", 24));
       results.insert(pair<string,int>("i", 28));
       results.insert(pair<string,int>("i", 56));
-      results.insert(pair<string,int>("j", 41));
+      results.insert(pair<string,int>("j", 40)); //41
       results.insert(pair<string,int>("j", 77));
-      results.insert(pair<string,int>("res", 42));
+      //      results.insert(pair<string,int>("res", 42));
       testOneFunction("::main", argvList, debug, 76, results,useresults);
       results.clear();  useresults.clear();
       testOneFunction("::f1", argvList, debug, 76, results,useresults);

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests)

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/Makefile.am
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,48 +0,0 @@
-include $(top_srcdir)/config/Makefile.for.ROSE.includes.and.libs
-
-# To keep compile commands tidy, please ONLY put required include flags here.
-INCLUDES = $(ROSE_INCLUDES)
-
-## Don't use the repository in ../src
-CXX_TEMPLATE_REPOSITORY_PATH = .
-
-# This test program does not require the rest of ROSE so it can be handled locally
-bin_PROGRAMS  = runTest
-
-runTest_SOURCES = runTest.C
-
-# testCallGraph_LDADD = $(LIBS_WITH_RPATH) $(ROSE_LIBS)
-runTest_LDADD = $(LIBS_WITH_RPATH) $(ROSE_SEPARATE_LIBS)
-
-TESTCODES =  test1.C
-
-# Build the list of object files
-TEST_Objects = ${TESTCODES:.C=.o}
-
-#ROSE_FLAGS = -rose:verbose 2
-# ROSE_FLAGS = 
-
-TEST_TRANSLATOR = ./runTest all $(ROSE_FLAGS) > output
-TESTCODE_INCLUDES =
-
-# DQ (7/12/2004): Modified to run with make -j4 options
-$(TEST_Objects): runTest $(TESTCODES) 
-	@echo "Compiling test code using $(TEST_TRANSLATOR) ..."
-	env SRCDIR="$(srcdir)" $(TEST_TRANSLATOR)
-
-EXTRA_DIST = $(TESTCODES) tests
-
-# DQ (7/25/2005): The current changes to the AST break these test programs:
-check-local:
-	@$(MAKE) $(TEST_Objects)
-	@echo "*********************************************************************************************************************"
-	@echo "*** ROSE/tests/roseTests/programAnalysisTests/defUseAnalysisTests: make check rule complete (terminated normally) ***"
-	@echo "*********************************************************************************************************************"
-
-
-clean-local:
-	rm -rf $(CXX_TEMPLATE_OBJECTS) *.o rose_*.C *.dot Templates.DB ii_files ti_files DATABASE DATABASE.dot output *.pdf
-
-distclean-local:
-	rm -rf Templates.DB 
-

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/Makefile.am (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/Makefile.am)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/Makefile.am	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,48 @@
+include $(top_srcdir)/config/Makefile.for.ROSE.includes.and.libs
+
+# To keep compile commands tidy, please ONLY put required include flags here.
+INCLUDES = $(ROSE_INCLUDES)
+
+## Don't use the repository in ../src
+CXX_TEMPLATE_REPOSITORY_PATH = .
+
+# This test program does not require the rest of ROSE so it can be handled locally
+bin_PROGRAMS  = runTest
+
+runTest_SOURCES = runTest.C
+
+# testCallGraph_LDADD = $(LIBS_WITH_RPATH) $(ROSE_LIBS)
+runTest_LDADD = $(LIBS_WITH_RPATH) $(ROSE_SEPARATE_LIBS)
+
+TESTCODES =  test1.C
+
+# Build the list of object files
+TEST_Objects = ${TESTCODES:.C=.o}
+
+#ROSE_FLAGS = -rose:verbose 2
+# ROSE_FLAGS = 
+
+TEST_TRANSLATOR = ./runTest all $(ROSE_FLAGS) > output
+TESTCODE_INCLUDES =
+
+# DQ (7/12/2004): Modified to run with make -j4 options
+$(TEST_Objects): runTest $(TESTCODES) 
+	@echo "Compiling test code using $(TEST_TRANSLATOR) ..."
+	env SRCDIR="$(srcdir)" $(TEST_TRANSLATOR)
+
+EXTRA_DIST = $(TESTCODES) tests
+
+# DQ (7/25/2005): The current changes to the AST break these test programs:
+check-local:
+	@$(MAKE) $(TEST_Objects)
+	@echo "*********************************************************************************************************************"
+	@echo "*** ROSE/tests/roseTests/programAnalysisTests/defUseAnalysisTests: make check rule complete (terminated normally) ***"
+	@echo "*********************************************************************************************************************"
+
+
+clean-local:
+	rm -rf $(CXX_TEMPLATE_OBJECTS) *.o rose_*.C *.dot Templates.DB ii_files ti_files DATABASE DATABASE.dot output *.pdf
+
+distclean-local:
+	rm -rf Templates.DB 
+

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/runTest.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/runTest.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/runTest.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,406 +0,0 @@
-/****************************************** 
- * Category: DFA
- * Application to test the Def-Use Analysis
- * created by tps in Feb 2007
- *****************************************/
-
-#include "DefUseAnalysis.h"
-#include "LivenessAnalysis.h"
-#include <string>
-#include <iostream>
-using namespace std;
-
-void testOneFunction( std::string funcParamName, 
-		      vector<string> argvList,
-		      bool debug, int nrOfNodes, 
-		      multimap <string, int> results,
-		      multimap <string, int> useresults) {
-  cout << " \n\n------------------------------------------\nrunning ... " << argvList[1] << endl;
-  // Build the AST used by ROSE
-  SgProject* project = frontend(argvList);
-  // Call the Def-Use Analysis
-  DFAnalysis* defuse = new DefUseAnalysis(project);
-  int val = defuse->run(debug);
-  std::cerr << ">Analysis run is : " << (val ?  "failure" : "success" ) << " " << val << std::endl;
-  if (val==1) exit(1);
-
-  if (debug==false)
-    defuse->dfaToDOT();
-
-
-  LivenessAnalysis* liv = new LivenessAnalysis(debug,(DefUseAnalysis*)defuse);
-
-  std::vector <FilteredCFGNode < IsDFAFilter > > dfaFunctions;
-//std::list<SgNode*> vars = NodeQuery::querySubTree(project, V_SgFunctionDefinition); 
-//std::list<SgNode*>::const_iterator i = vars.begin();
-  NodeQuerySynthesizedAttributeType vars = NodeQuery::querySubTree(project, V_SgFunctionDefinition); 
-  NodeQuerySynthesizedAttributeType::const_iterator i = vars.begin();
-  bool abortme=false;
-  for (; i!=vars.end();++i) {
-    SgFunctionDefinition* func = isSgFunctionDefinition(*i);
-    std::string name = func->class_name();
-    string funcName = func->get_declaration()->get_qualified_name().str();
-    cerr << " .. running live analysis for func : " << funcName << endl;
-    FilteredCFGNode <IsDFAFilter> rem_source = liv->run(func,abortme);
-    if (rem_source.getNode()!=NULL)
-      dfaFunctions.push_back(rem_source);    
-    if (abortme)
-      break;
-  }
-  cerr << "Writing out to var.dot... " << endl;
-  std::ofstream f2("var.dot");
-  dfaToDot(f2, string("var"), dfaFunctions, 
-	   (DefUseAnalysis*)defuse, liv);     
-  f2.close();
-
-  if (abortme) {
-    cerr<<"ABORTING ." << endl;
-    exit(1);
-  }
-  std::cout << "Analysis test is success." << std::endl;
-}
-
-
-void runCurrentFile(vector<string> &argvList, bool debug, bool debug_map) {
-  // Build the AST used by ROSE
-  std::cout << ">>>> Starting ROSE frontend ... " << endl;
-  SgProject* project = frontend(argvList);
-  std::cout << ">>>> generate PDF " << endl;
-  generatePDF ( *project );
-  std::cout << ">>>> start def-use analysis ... " << endl;
-
-  // Call the Def-Use Analysis
-  DFAnalysis* defuse = new DefUseAnalysis(project);
-  int val = defuse->run(debug);
-  std::cout << "Analysis is : " << (val ?  "failure" : "success" ) << " " << val <<std::endl;
-  if (val==1) exit(1);
-  if (debug==false)
-    defuse->dfaToDOT();
-
-  LivenessAnalysis* liv = new LivenessAnalysis(true,(DefUseAnalysis*)defuse);
-  
-  //example usage
-  // testing
-  std::vector <FilteredCFGNode < IsDFAFilter > > dfaFunctions;
-  bool abortme=false;
-  NodeQuerySynthesizedAttributeType vars = NodeQuery::querySubTree(project, V_SgFunctionDefinition); 
-  NodeQuerySynthesizedAttributeType::const_iterator i = vars.begin();
-  for (; i!=vars.end();++i) {
-    SgFunctionDefinition* func = isSgFunctionDefinition(*i);
-    string funcName = func->get_declaration()->get_qualified_name().str();
-    cerr << " running live analysis for func : " << funcName << endl;
-    FilteredCFGNode <IsDFAFilter> rem_source = liv->run(func,abortme);
-    if (rem_source.getNode()!=NULL)
-      dfaFunctions.push_back(rem_source);
-    if (abortme)
-      break;
-  }   
-
-
-  std::ofstream f2("var.dot");
-  dfaToDot(f2, string("var"), dfaFunctions, 
-	   (DefUseAnalysis*)defuse, liv);     
-  f2.close();
-  if (abortme) {
-    cerr<<"ABORTING ." << endl;
-    exit(1);
-  }
-
-
-  delete project;
-  delete defuse;
-}
-
-void usage() {
-  cout << " Usage: " << endl;
-  cout << "   runTest all [startNr]   --- to test all testcases" << endl;
-  cout << "   runTest [file]          --- to test one file" << endl;
-  exit(1);
-}
-
-int strToInt(string str) {
-  int b;
-  std::stringstream ss(str);
-  ss >> b;
-  return b;
-}
-
-int main( int argc, char * argv[] )
-{
-  if (argc==1) {
-    usage();
-  }
-  string pass = argv[1];
-  if (pass=="--help") {
-    usage();
-  }
-  bool allTests=false;
-  if (pass=="all") {
-    allTests=true;
-  }
-
-  vector<string> argvList(argv, argv + argc);
-
-
-  if (allTests==false) {
-  // change here if you want debug
-    bool debug_map = false;
-    bool debug = false;
-    runCurrentFile(argvList, debug, debug_map);
-  }  
-  
-  if (allTests==true) {
-    bool debug =false;
-    string startNr = "";
-    if (argc>2)
-      startNr = argv[2];
-    bool testAll = false;
-    int startNrInt = 0;
-    if (startNr=="")
-      testAll=true;
-    else 
-      startNrInt = strToInt(startNr);
-    //cout << "start: " << startNrInt << "  all: " << testAll << endl;
-
-    argvList.resize(2);
-    argvList[0]=argv[0];
-    multimap <string, int> results;
-    multimap <string, int> useresults;
-
-    char* srcdirVar = getenv("SRCDIR");
-    ROSE_ASSERT (srcdirVar);
-    std::string srcdir = srcdirVar;
-    srcdir += "/";
-
-#if 1
-    cerr << " RUNNING VARIABLE ANALYSIS (DEFUSE) TESTS" <<endl;
-
-
-    if (startNrInt<=1 || testAll) {
-      // ------------------------------ TESTCASE 1 -----------------------------------------
-      argvList[1]=srcdir+"tests/test1.C";
-      results.clear();      useresults.clear();
-      results.insert(pair<string,int>("a", 8));
-      results.insert(pair<string,int>("a", 17));    
-      results.insert(pair<string,int>("c", 18));
-      testOneFunction("::main",argvList, debug, 21, results,useresults);
-    }
-
-    if (startNrInt<=2 || testAll) {
-      // ------------------------------ TESTCASE 2 -----------------------------------------
-      argvList[1]=srcdir+"tests/test2.C";
-      results.clear();      useresults.clear();
-      results.insert(pair<string,int>("a", 8));
-      results.insert(pair<string,int>("a", 17));    
-      results.insert(pair<string,int>("c", 18));
-      testOneFunction("::main",argvList, debug, 19, results,useresults);
-    }
-
-    if (startNrInt<=3 || testAll) {
-      // ------------------------------ TESTCASE 3 -----------------------------------------
-      argvList[1]=srcdir+"tests/test3.C";
-      results.clear();       useresults.clear();
-      results.insert(pair<string,int>("d", 15));
-      testOneFunction("::main", argvList, debug, 17, results,useresults);
-    }
-
-    if (startNrInt<=4 || testAll) {
-      // ------------------------------ TESTCASE 4 -----------------------------------------
-      argvList[1]=srcdir+"tests/test4.C";
-      results.clear();       useresults.clear();
-      results.insert(pair<string,int>("::globalvar", 12));
-      testOneFunction("::main", argvList, debug, 14, results, useresults);
-    }
-
-    if (startNrInt<=5 || testAll) {
-      // ------------------------------ TESTCASE 5 -----------------------------------------
-      argvList[1]=srcdir+"tests/test5.C";
-      results.clear();       useresults.clear();
-      results.insert(pair<string,int>("x", 10));
-      results.insert(pair<string,int>("y", 16));    
-      useresults.insert(pair<string,int>("x", 13));    
-      testOneFunction("::main", argvList, debug, 18, results, useresults);
-    }
-
-    if (startNrInt<=6 || testAll) {
-      // ------------------------------ TESTCASE 6 -----------------------------------------
-      argvList[1]=srcdir+"tests/test6.C";
-      results.clear();  useresults.clear();
-      results.insert(pair<string,int>("x", 14));
-      results.insert(pair<string,int>("x", 25));
-      results.insert(pair<string,int>("z", 26));    
-      results.insert(pair<string,int>("z", 10));    
-      useresults.insert(pair<string,int>("x", 16));    
-      useresults.insert(pair<string,int>("z", 22));    
-      testOneFunction("::main", argvList, debug, 26, results,useresults);
-    }
-
-    if (startNrInt<=7 || testAll) {
-      // ------------------------------ TESTCASE 7 -----------------------------------------
-      argvList[1]=srcdir+"tests/test7.C";
-      results.clear();  useresults.clear();
-      results.insert(pair<string,int>("i", 6));
-      results.insert(pair<string,int>("i", 15));
-      useresults.insert(pair<string,int>("i", 8));    
-      useresults.insert(pair<string,int>("i", 14));    
-      testOneFunction("::main", argvList, debug, 16, results,useresults);
-    }
-
-    if (startNrInt<=8 || testAll) {
-      // ------------------------------ TESTCASE 8 -----------------------------------------
-      argvList[1]=srcdir+"tests/test8.C";
-      results.clear();  useresults.clear();
-      results.insert(pair<string,int>("x", 24));
-      results.insert(pair<string,int>("i", 12));
-      results.insert(pair<string,int>("i", 32));
-      useresults.insert(pair<string,int>("i", 15));    
-      useresults.insert(pair<string,int>("p", 26));    
-      useresults.insert(pair<string,int>("x", 28));    
-      testOneFunction("::main", argvList, debug, 31, results,useresults);
-    }
-
-    if (startNrInt<=9 || testAll) {
-      // ------------------------------ TESTCASE 9 -----------------------------------------
-      argvList[1]=srcdir+"tests/test9.C";
-      results.clear();  useresults.clear();
-      results.insert(pair<string,int>("array", 4));
-      results.insert(pair<string,int>("i", 12));
-      results.insert(pair<string,int>("i", 31));
-      useresults.insert(pair<string,int>("i", 15));    
-      useresults.insert(pair<string,int>("array", 21));    
-      testOneFunction("::main", argvList, debug, 30, results,useresults);
-    }
-
-    if (startNrInt<=10 || testAll) {
-      // ------------------------------ TESTCASE 10 -----------------------------------------
-      argvList[1]=srcdir+"tests/test10.C";
-      results.clear();  useresults.clear();
-      results.insert(pair<string,int>("z", 13));
-      results.insert(pair<string,int>("z", 22));
-      results.insert(pair<string,int>("res", 23));
-      testOneFunction("::main", argvList, debug, 25, results,useresults);
-      results.clear();  useresults.clear();
-      results.insert(pair<string,int>("x", 3));
-      results.insert(pair<string,int>("y", 4));
-      results.insert(pair<string,int>("z", 5));
-      testOneFunction("::f2", argvList, debug, 25, results,useresults);
-    }
-
-    if (startNrInt<=11 || testAll) {
-      // ------------------------------ TESTCASE 11 -----------------------------------------
-      argvList[1]=srcdir+"tests/test11.C";
-      results.clear();  useresults.clear();
-      results.insert(pair<string,int>("z", 19));
-      results.insert(pair<string,int>("z", 63));
-      results.insert(pair<string,int>("z", 73));
-      results.insert(pair<string,int>("p", 24));
-      results.insert(pair<string,int>("i", 28));
-      results.insert(pair<string,int>("i", 56));
-      results.insert(pair<string,int>("j", 41));
-      results.insert(pair<string,int>("j", 77));
-      results.insert(pair<string,int>("res", 42));
-      testOneFunction("::main", argvList, debug, 76, results,useresults);
-      results.clear();  useresults.clear();
-      testOneFunction("::f1", argvList, debug, 76, results,useresults);
-      results.clear();  useresults.clear();
-      results.insert(pair<string,int>("x", 7));
-      results.insert(pair<string,int>("y", 8));
-      results.insert(pair<string,int>("z", 9));
-      testOneFunction("::f2", argvList, debug, 76, results,useresults);
-    }
-
-    if (startNrInt<=13 || testAll) {
-      // ------------------------------ TESTCASE 13 -----------------------------------------
-      argvList[1]=srcdir+"tests/test13.C";
-      results.clear();  useresults.clear();
-      results.insert(pair<string,int>("::global", 7));
-      testOneFunction("::main", argvList, debug, 9, results,useresults);
-    }
-
-    if (startNrInt<=14 || testAll) {
-      // ------------------------------ TESTCASE 14 -----------------------------------------
-      argvList[1]=srcdir+"tests/test14.C";
-      results.clear();  useresults.clear();
-      results.insert(pair<string,int>("a", 12));
-      results.insert(pair<string,int>("b", 6));
-      testOneFunction("::main", argvList, debug, 14, results,useresults);
-    }
-
-    if (startNrInt<=15 || testAll) {
-      // ------------------------------ TESTCASE 15 -----------------------------------------
-      argvList[1]=srcdir+"tests/test15.C";
-      results.clear();  useresults.clear();
-      results.insert(pair<string,int>("i", 12));
-      results.insert(pair<string,int>("i", 26));
-      results.insert(pair<string,int>("index", 26));
-      results.insert(pair<string,int>("index", 8));
-      testOneFunction("::main", argvList, debug, 26, results,useresults);
-    }
-
-    if (startNrInt<=18 || testAll) {
-      // ------------------------------ TESTCASE 18 -----------------------------------------
-      argvList[1]=srcdir+"tests/test18.C";
-      results.clear();  useresults.clear();
-      results.insert(pair<string,int>("i", 12));
-      results.insert(pair<string,int>("i", 49));
-      results.insert(pair<string,int>("p", 8));
-      results.insert(pair<string,int>("p", 46));
-      results.insert(pair<string,int>("x", 24));
-      results.insert(pair<string,int>("z", 39));
-      results.insert(pair<string,int>("e", 41));
-      useresults.insert(pair<string,int>("i", 15));    
-      useresults.insert(pair<string,int>("x", 28));    
-      testOneFunction("::main", argvList, debug, 48, results,useresults);
-    }
-
-    if (startNrInt<=19 || testAll) {
-      // ------------------------------ TESTCASE 19 -----------------------------------------
-      argvList[1]=srcdir+"tests/test19.C";
-      results.clear();  useresults.clear();
-      results.insert(pair<string,int>("::global", 2));
-      results.insert(pair<string,int>("::global", 8));
-      results.insert(pair<string,int>("::global2", 28));
-      results.insert(pair<string,int>("a", 24));
-      testOneFunction("::main", argvList, debug, 30, results,useresults);
-      results.clear();  useresults.clear();
-      results.insert(pair<string,int>("::global", 8));
-      results.insert(pair<string,int>("::global2", 12));
-      testOneFunction("::setMe", argvList, debug, 30, results,useresults);
-    }
-
-    if (startNrInt<=20 || testAll) {
-      // ------------------------------ TESTCASE 1 -----------------------------------------
-      argvList[1]=srcdir+"tests/test20.C";
-      results.clear();      useresults.clear();
-      testOneFunction("::bar",argvList, debug, 5, results,useresults);
-    }
-
-    if (startNrInt<=21 || testAll) {
-      // ------------------------------ TESTCASE 1 -----------------------------------------
-      argvList[1]=srcdir+"tests/test21.C";
-      results.clear();      useresults.clear();
-      testOneFunction("::func",argvList, debug, 9, results,useresults);
-    }
-
-    if (startNrInt<=22 || testAll) {
-      // ------------------------------ TESTCASE 1 -----------------------------------------
-      argvList[1]=srcdir+"tests/test22.C";
-      results.clear();      useresults.clear();
-      results.insert(pair<string,int>("b", 7));
-      testOneFunction("::func",argvList, debug, 12, results,useresults);
-    }
-
-    if (startNrInt<=23 || testAll) {
-      // ------------------------------ TESTCASE 1 -----------------------------------------
-      argvList[1]=srcdir+"tests/test23.C";
-      results.clear();      useresults.clear();
-      results.insert(pair<string,int>("a",11));
-      testOneFunction("::func",argvList, debug, 30, results,useresults);
-    }
-#endif  
-  }
-
-  cout << ">> TEST END ... " << endl;
-  argvList.clear();
-  return 0;
-}

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/runTest.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/runTest.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/runTest.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/runTest.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,406 @@
+/****************************************** 
+ * Category: DFA
+ * Application to test the Def-Use Analysis
+ * created by tps in Feb 2007
+ *****************************************/
+
+#include "DefUseAnalysis.h"
+#include "LivenessAnalysis.h"
+#include <string>
+#include <iostream>
+using namespace std;
+
+void testOneFunction( std::string funcParamName, 
+		      vector<string> argvList,
+		      bool debug, int nrOfNodes, 
+		      multimap <string, int> results,
+		      multimap <string, int> useresults) {
+  cout << " \n\n------------------------------------------\nrunning ... " << argvList[1] << endl;
+  // Build the AST used by ROSE
+  SgProject* project = frontend(argvList);
+  // Call the Def-Use Analysis
+  DFAnalysis* defuse = new DefUseAnalysis(project);
+  int val = defuse->run(debug);
+  std::cerr << ">Analysis run is : " << (val ?  "failure" : "success" ) << " " << val << std::endl;
+  if (val==1) exit(1);
+
+  if (debug==false)
+    defuse->dfaToDOT();
+
+
+  LivenessAnalysis* liv = new LivenessAnalysis(debug,(DefUseAnalysis*)defuse);
+
+  std::vector <FilteredCFGNode < IsDFAFilter > > dfaFunctions;
+//std::list<SgNode*> vars = NodeQuery::querySubTree(project, V_SgFunctionDefinition); 
+//std::list<SgNode*>::const_iterator i = vars.begin();
+  NodeQuerySynthesizedAttributeType vars = NodeQuery::querySubTree(project, V_SgFunctionDefinition); 
+  NodeQuerySynthesizedAttributeType::const_iterator i = vars.begin();
+  bool abortme=false;
+  for (; i!=vars.end();++i) {
+    SgFunctionDefinition* func = isSgFunctionDefinition(*i);
+    std::string name = func->class_name();
+    string funcName = func->get_declaration()->get_qualified_name().str();
+    cerr << " .. running live analysis for func : " << funcName << endl;
+    FilteredCFGNode <IsDFAFilter> rem_source = liv->run(func,abortme);
+    if (rem_source.getNode()!=NULL)
+      dfaFunctions.push_back(rem_source);    
+    if (abortme)
+      break;
+  }
+  cerr << "Writing out to var.dot... " << endl;
+  std::ofstream f2("var.dot");
+  dfaToDot(f2, string("var"), dfaFunctions, 
+	   (DefUseAnalysis*)defuse, liv);     
+  f2.close();
+
+  if (abortme) {
+    cerr<<"ABORTING ." << endl;
+    exit(1);
+  }
+  std::cout << "Analysis test is success." << std::endl;
+}
+
+
+void runCurrentFile(vector<string> &argvList, bool debug, bool debug_map) {
+  // Build the AST used by ROSE
+  std::cout << ">>>> Starting ROSE frontend ... " << endl;
+  SgProject* project = frontend(argvList);
+  std::cout << ">>>> generate PDF " << endl;
+  generatePDF ( *project );
+  std::cout << ">>>> start def-use analysis ... " << endl;
+
+  // Call the Def-Use Analysis
+  DFAnalysis* defuse = new DefUseAnalysis(project);
+  int val = defuse->run(debug);
+  std::cout << "Analysis is : " << (val ?  "failure" : "success" ) << " " << val <<std::endl;
+  if (val==1) exit(1);
+  if (debug==false)
+    defuse->dfaToDOT();
+
+  LivenessAnalysis* liv = new LivenessAnalysis(true,(DefUseAnalysis*)defuse);
+  
+  //example usage
+  // testing
+  std::vector <FilteredCFGNode < IsDFAFilter > > dfaFunctions;
+  bool abortme=false;
+  NodeQuerySynthesizedAttributeType vars = NodeQuery::querySubTree(project, V_SgFunctionDefinition); 
+  NodeQuerySynthesizedAttributeType::const_iterator i = vars.begin();
+  for (; i!=vars.end();++i) {
+    SgFunctionDefinition* func = isSgFunctionDefinition(*i);
+    string funcName = func->get_declaration()->get_qualified_name().str();
+    cerr << " running live analysis for func : " << funcName << endl;
+    FilteredCFGNode <IsDFAFilter> rem_source = liv->run(func,abortme);
+    if (rem_source.getNode()!=NULL)
+      dfaFunctions.push_back(rem_source);
+    if (abortme)
+      break;
+  }   
+
+
+  std::ofstream f2("var.dot");
+  dfaToDot(f2, string("var"), dfaFunctions, 
+	   (DefUseAnalysis*)defuse, liv);     
+  f2.close();
+  if (abortme) {
+    cerr<<"ABORTING ." << endl;
+    exit(1);
+  }
+
+
+  delete project;
+  delete defuse;
+}
+
+void usage() {
+  cout << " Usage: " << endl;
+  cout << "   runTest all [startNr]   --- to test all testcases" << endl;
+  cout << "   runTest [file]          --- to test one file" << endl;
+  exit(1);
+}
+
+int strToInt(string str) {
+  int b;
+  std::stringstream ss(str);
+  ss >> b;
+  return b;
+}
+
+int main( int argc, char * argv[] )
+{
+  if (argc==1) {
+    usage();
+  }
+  string pass = argv[1];
+  if (pass=="--help") {
+    usage();
+  }
+  bool allTests=false;
+  if (pass=="all") {
+    allTests=true;
+  }
+
+  vector<string> argvList(argv, argv + argc);
+
+
+  if (allTests==false) {
+  // change here if you want debug
+    bool debug_map = false;
+    bool debug = false;
+    runCurrentFile(argvList, debug, debug_map);
+  }  
+  
+  if (allTests==true) {
+    bool debug =false;
+    string startNr = "";
+    if (argc>2)
+      startNr = argv[2];
+    bool testAll = false;
+    int startNrInt = 0;
+    if (startNr=="")
+      testAll=true;
+    else 
+      startNrInt = strToInt(startNr);
+    //cout << "start: " << startNrInt << "  all: " << testAll << endl;
+
+    argvList.resize(2);
+    argvList[0]=argv[0];
+    multimap <string, int> results;
+    multimap <string, int> useresults;
+
+    char* srcdirVar = getenv("SRCDIR");
+    ROSE_ASSERT (srcdirVar);
+    std::string srcdir = srcdirVar;
+    srcdir += "/";
+
+#if 1
+    cerr << " RUNNING VARIABLE ANALYSIS (DEFUSE) TESTS" <<endl;
+
+
+    if (startNrInt<=1 || testAll) {
+      // ------------------------------ TESTCASE 1 -----------------------------------------
+      argvList[1]=srcdir+"tests/test1.C";
+      results.clear();      useresults.clear();
+      results.insert(pair<string,int>("a", 8));
+      results.insert(pair<string,int>("a", 17));    
+      results.insert(pair<string,int>("c", 18));
+      testOneFunction("::main",argvList, debug, 21, results,useresults);
+    }
+
+    if (startNrInt<=2 || testAll) {
+      // ------------------------------ TESTCASE 2 -----------------------------------------
+      argvList[1]=srcdir+"tests/test2.C";
+      results.clear();      useresults.clear();
+      results.insert(pair<string,int>("a", 8));
+      results.insert(pair<string,int>("a", 17));    
+      results.insert(pair<string,int>("c", 18));
+      testOneFunction("::main",argvList, debug, 19, results,useresults);
+    }
+
+    if (startNrInt<=3 || testAll) {
+      // ------------------------------ TESTCASE 3 -----------------------------------------
+      argvList[1]=srcdir+"tests/test3.C";
+      results.clear();       useresults.clear();
+      results.insert(pair<string,int>("d", 15));
+      testOneFunction("::main", argvList, debug, 17, results,useresults);
+    }
+
+    if (startNrInt<=4 || testAll) {
+      // ------------------------------ TESTCASE 4 -----------------------------------------
+      argvList[1]=srcdir+"tests/test4.C";
+      results.clear();       useresults.clear();
+      results.insert(pair<string,int>("::globalvar", 12));
+      testOneFunction("::main", argvList, debug, 14, results, useresults);
+    }
+
+    if (startNrInt<=5 || testAll) {
+      // ------------------------------ TESTCASE 5 -----------------------------------------
+      argvList[1]=srcdir+"tests/test5.C";
+      results.clear();       useresults.clear();
+      results.insert(pair<string,int>("x", 10));
+      results.insert(pair<string,int>("y", 16));    
+      useresults.insert(pair<string,int>("x", 13));    
+      testOneFunction("::main", argvList, debug, 18, results, useresults);
+    }
+
+    if (startNrInt<=6 || testAll) {
+      // ------------------------------ TESTCASE 6 -----------------------------------------
+      argvList[1]=srcdir+"tests/test6.C";
+      results.clear();  useresults.clear();
+      results.insert(pair<string,int>("x", 14));
+      results.insert(pair<string,int>("x", 25));
+      results.insert(pair<string,int>("z", 26));    
+      results.insert(pair<string,int>("z", 10));    
+      useresults.insert(pair<string,int>("x", 16));    
+      useresults.insert(pair<string,int>("z", 22));    
+      testOneFunction("::main", argvList, debug, 26, results,useresults);
+    }
+
+    if (startNrInt<=7 || testAll) {
+      // ------------------------------ TESTCASE 7 -----------------------------------------
+      argvList[1]=srcdir+"tests/test7.C";
+      results.clear();  useresults.clear();
+      results.insert(pair<string,int>("i", 6));
+      results.insert(pair<string,int>("i", 15));
+      useresults.insert(pair<string,int>("i", 8));    
+      useresults.insert(pair<string,int>("i", 14));    
+      testOneFunction("::main", argvList, debug, 16, results,useresults);
+    }
+
+    if (startNrInt<=8 || testAll) {
+      // ------------------------------ TESTCASE 8 -----------------------------------------
+      argvList[1]=srcdir+"tests/test8.C";
+      results.clear();  useresults.clear();
+      results.insert(pair<string,int>("x", 24));
+      results.insert(pair<string,int>("i", 12));
+      results.insert(pair<string,int>("i", 32));
+      useresults.insert(pair<string,int>("i", 15));    
+      useresults.insert(pair<string,int>("p", 26));    
+      useresults.insert(pair<string,int>("x", 28));    
+      testOneFunction("::main", argvList, debug, 31, results,useresults);
+    }
+
+    if (startNrInt<=9 || testAll) {
+      // ------------------------------ TESTCASE 9 -----------------------------------------
+      argvList[1]=srcdir+"tests/test9.C";
+      results.clear();  useresults.clear();
+      results.insert(pair<string,int>("array", 4));
+      results.insert(pair<string,int>("i", 12));
+      results.insert(pair<string,int>("i", 31));
+      useresults.insert(pair<string,int>("i", 15));    
+      useresults.insert(pair<string,int>("array", 21));    
+      testOneFunction("::main", argvList, debug, 30, results,useresults);
+    }
+
+    if (startNrInt<=10 || testAll) {
+      // ------------------------------ TESTCASE 10 -----------------------------------------
+      argvList[1]=srcdir+"tests/test10.C";
+      results.clear();  useresults.clear();
+      results.insert(pair<string,int>("z", 13));
+      results.insert(pair<string,int>("z", 22));
+      results.insert(pair<string,int>("res", 23));
+      testOneFunction("::main", argvList, debug, 25, results,useresults);
+      results.clear();  useresults.clear();
+      results.insert(pair<string,int>("x", 3));
+      results.insert(pair<string,int>("y", 4));
+      results.insert(pair<string,int>("z", 5));
+      testOneFunction("::f2", argvList, debug, 25, results,useresults);
+    }
+
+    if (startNrInt<=11 || testAll) {
+      // ------------------------------ TESTCASE 11 -----------------------------------------
+      argvList[1]=srcdir+"tests/test11.C";
+      results.clear();  useresults.clear();
+      results.insert(pair<string,int>("z", 19));
+      results.insert(pair<string,int>("z", 63));
+      results.insert(pair<string,int>("z", 73));
+      results.insert(pair<string,int>("p", 24));
+      results.insert(pair<string,int>("i", 28));
+      results.insert(pair<string,int>("i", 56));
+      results.insert(pair<string,int>("j", 41));
+      results.insert(pair<string,int>("j", 77));
+      results.insert(pair<string,int>("res", 42));
+      testOneFunction("::main", argvList, debug, 76, results,useresults);
+      results.clear();  useresults.clear();
+      testOneFunction("::f1", argvList, debug, 76, results,useresults);
+      results.clear();  useresults.clear();
+      results.insert(pair<string,int>("x", 7));
+      results.insert(pair<string,int>("y", 8));
+      results.insert(pair<string,int>("z", 9));
+      testOneFunction("::f2", argvList, debug, 76, results,useresults);
+    }
+
+    if (startNrInt<=13 || testAll) {
+      // ------------------------------ TESTCASE 13 -----------------------------------------
+      argvList[1]=srcdir+"tests/test13.C";
+      results.clear();  useresults.clear();
+      results.insert(pair<string,int>("::global", 7));
+      testOneFunction("::main", argvList, debug, 9, results,useresults);
+    }
+
+    if (startNrInt<=14 || testAll) {
+      // ------------------------------ TESTCASE 14 -----------------------------------------
+      argvList[1]=srcdir+"tests/test14.C";
+      results.clear();  useresults.clear();
+      results.insert(pair<string,int>("a", 12));
+      results.insert(pair<string,int>("b", 6));
+      testOneFunction("::main", argvList, debug, 14, results,useresults);
+    }
+
+    if (startNrInt<=15 || testAll) {
+      // ------------------------------ TESTCASE 15 -----------------------------------------
+      argvList[1]=srcdir+"tests/test15.C";
+      results.clear();  useresults.clear();
+      results.insert(pair<string,int>("i", 12));
+      results.insert(pair<string,int>("i", 26));
+      results.insert(pair<string,int>("index", 26));
+      results.insert(pair<string,int>("index", 8));
+      testOneFunction("::main", argvList, debug, 26, results,useresults);
+    }
+
+    if (startNrInt<=18 || testAll) {
+      // ------------------------------ TESTCASE 18 -----------------------------------------
+      argvList[1]=srcdir+"tests/test18.C";
+      results.clear();  useresults.clear();
+      results.insert(pair<string,int>("i", 12));
+      results.insert(pair<string,int>("i", 49));
+      results.insert(pair<string,int>("p", 8));
+      results.insert(pair<string,int>("p", 46));
+      results.insert(pair<string,int>("x", 24));
+      results.insert(pair<string,int>("z", 39));
+      results.insert(pair<string,int>("e", 41));
+      useresults.insert(pair<string,int>("i", 15));    
+      useresults.insert(pair<string,int>("x", 28));    
+      testOneFunction("::main", argvList, debug, 48, results,useresults);
+    }
+
+    if (startNrInt<=19 || testAll) {
+      // ------------------------------ TESTCASE 19 -----------------------------------------
+      argvList[1]=srcdir+"tests/test19.C";
+      results.clear();  useresults.clear();
+      results.insert(pair<string,int>("::global", 2));
+      results.insert(pair<string,int>("::global", 8));
+      results.insert(pair<string,int>("::global2", 28));
+      results.insert(pair<string,int>("a", 24));
+      testOneFunction("::main", argvList, debug, 30, results,useresults);
+      results.clear();  useresults.clear();
+      results.insert(pair<string,int>("::global", 8));
+      results.insert(pair<string,int>("::global2", 12));
+      testOneFunction("::setMe", argvList, debug, 30, results,useresults);
+    }
+
+    if (startNrInt<=20 || testAll) {
+      // ------------------------------ TESTCASE 1 -----------------------------------------
+      argvList[1]=srcdir+"tests/test20.C";
+      results.clear();      useresults.clear();
+      testOneFunction("::bar",argvList, debug, 5, results,useresults);
+    }
+
+    if (startNrInt<=21 || testAll) {
+      // ------------------------------ TESTCASE 1 -----------------------------------------
+      argvList[1]=srcdir+"tests/test21.C";
+      results.clear();      useresults.clear();
+      testOneFunction("::func",argvList, debug, 9, results,useresults);
+    }
+
+    if (startNrInt<=22 || testAll) {
+      // ------------------------------ TESTCASE 1 -----------------------------------------
+      argvList[1]=srcdir+"tests/test22.C";
+      results.clear();      useresults.clear();
+      results.insert(pair<string,int>("b", 7));
+      testOneFunction("::func",argvList, debug, 12, results,useresults);
+    }
+
+    if (startNrInt<=23 || testAll) {
+      // ------------------------------ TESTCASE 1 -----------------------------------------
+      argvList[1]=srcdir+"tests/test23.C";
+      results.clear();      useresults.clear();
+      results.insert(pair<string,int>("a",11));
+      testOneFunction("::func",argvList, debug, 30, results,useresults);
+    }
+#endif  
+  }
+
+  cout << ">> TEST END ... " << endl;
+  argvList.clear();
+  return 0;
+}

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/test1.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/test1.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/test1.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,21 +0,0 @@
-
-int main()
-   {
-#if 0
-     int x = 42; // defined and live
-     int y = x; // line in, not live out
-     int g = 5;
-     x = y;
-     return x;
-#endif
-
-#if 1
-
-     int x;
-     for (int i=0; i<10;++i) {
-       x= 2;
-       int y=x+1;
-     }
-     x=5;
-#endif
-   }

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/test1.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/test1.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/test1.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/test1.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,21 @@
+
+int main()
+   {
+#if 0
+     int x = 42; // defined and live
+     int y = x; // line in, not live out
+     int g = 5;
+     x = y;
+     return x;
+#endif
+
+#if 1
+
+     int x;
+     for (int i=0; i<10;++i) {
+       x= 2;
+       int y=x+1;
+     }
+     x=5;
+#endif
+   }

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests)

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/mpi.c
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/mpi.c	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/mpi.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,120 +0,0 @@
-/******************************************************************************
-* FILE: mpl.ex1.c
-* DESCRIPTION: 
-*   In this simple example, the master task initiates numtasks-1 number of
-*   worker tasks.  It then distributes an equal portion of an array to each 
-*   worker task.  Each worker task receives its portion of the array, and 
-*   performs a simple value assignment to each of its elements. The value 
-*   assigned to each element is simply that element's index in the array+1.  
-*   Each worker task then sends its portion of the array back to the master 
-*   task.  As the master receives back each portion of the array, selected 
-*   elements are displayed. 
-* AUTHOR: Blaise Barney
-* LAST REVISED:  09/14/93 for latest API changes  Blaise Barney
-* LAST REVISED:  01/10/94 changed API to MPL      Stacy Pendell
-* CONVERTED TO MPI: 11/12/94 by                   Xianneng Shen
-****************************************************************************/
-
-typedef unsigned int size_t;
-#include <stdio.h>
-#include "mpi.h"
-#define	ARRAYSIZE	60000	
-#define MASTER		0	/* taskid of first process */
-
-MPI_Status status;
-main(int argc, char **argv) 
-{
-int	numtasks, 		/* total number of MPI process in partitiion */
-	numworkers,		/* number of worker tasks */
-	taskid,			/* task identifier */
-	dest,			/* destination task id to send message */
-	index, 			/* index into the array */
-	i, 			/* loop variable */
-       	arraymsg = 1, 		/* setting a message type */
-   	indexmsg = 2,		/* setting a message type */
-	source,			/* origin task id of message */
-	chunksize; 		/* for partitioning the array */
-float	data[ARRAYSIZE], 	/* the intial array */
-	result[ARRAYSIZE];	/* for holding results of array operations */
-
-/************************* initializations ***********************************
-* Find out how many tasks are in this partition and what my task id is.  Then
-* define the number of worker tasks and the array partition size as chunksize. 
-* Note:  For this example, the MP_PROCS environment variable should be set
-* to an odd number...to insure even distribution of the array to numtasks-1
-* worker tasks.
-******************************************************************************/
-MPI_Init(&argc, &argv);
-MPI_Comm_rank(MPI_COMM_WORLD, &taskid);
-MPI_Comm_size(MPI_COMM_WORLD, &numtasks);
-numworkers = numtasks-1;
-chunksize = (ARRAYSIZE / numworkers);
-
-/**************************** master task ************************************/
-if (taskid == MASTER) {
-  printf("\n*********** Starting MPI Example 1 ************\n");
-  printf("MASTER: number of worker tasks will be= %d\n",numworkers);
-  fflush(stdout);
-
-  /* Initialize the array */
-  for(i=0; i<ARRAYSIZE; i++) 
-    data[i] =  0.0;
-  index = 0;
-
-  /* Send each worker task its portion of the array */
-  for (dest=1; dest<= numworkers; dest++) {
-    printf("Sending to worker task= %d\n",dest);
-    fflush(stdout);
-		#pragma SliceTarget
-    MPI_Send(&index, 1, MPI_INT, dest, 0, MPI_COMM_WORLD);
-		#pragma SliceTarget
-    MPI_Send(&data[index], chunksize, MPI_FLOAT, dest, 0, MPI_COMM_WORLD);
-    index = index + chunksize;
-    }
-
-  /* Now wait to receive back the results from each worker task and print */
-  /* a few sample values */
-  for (i=1; i<= numworkers; i++) {
-    source = i;
-		#pragma SliceTarget
-    MPI_Recv(&index, 1, MPI_INT, source, 1, MPI_COMM_WORLD, &status);
-		#pragma SliceTarget
-    MPI_Recv(&result[index], chunksize, MPI_FLOAT, source, 1, MPI_COMM_WORLD, 
-          &status);
-
-    printf("---------------------------------------------------\n");
-    printf("MASTER: Sample results from worker task = %d\n",source);
-    printf("   result[%d]=%f\n", index, result[index]);
-    printf("   result[%d]=%f\n", index+100, result[index+100]);
-    printf("   result[%d]=%f\n\n", index+1000, result[index+1000]);
-    fflush(stdout);
-    }
-
-  printf("MASTER: All Done! \n");
-  }
-
-
-/**************************** worker task ************************************/
-if (taskid > MASTER) {
-  /* Receive my portion of array from the master task */
-  source = MASTER;
-	#pragma SliceTarget
-  MPI_Recv(&index, 1, MPI_INT, source, 0, MPI_COMM_WORLD, &status);
-	#pragma SliceTarget
-  MPI_Recv(&result[index], chunksize, MPI_FLOAT, source, 0, 
-          MPI_COMM_WORLD, &status);
-  /* Do a simple value assignment to each of my array elements */
-  for(i=index; i < index + chunksize; i++)
-    result[i] = i + 1;
-
-  /* Send my results back to the master task */
-
-	#pragma SliceTarget
-  MPI_Send(&index, 1, MPI_INT, MASTER, 1, MPI_COMM_WORLD);
-	#pragma SliceTarget
-  MPI_Send(&result[index], chunksize, MPI_FLOAT, MASTER, 1, MPI_COMM_WORLD);
-
-  }
-	#pragma SliceTarget
-  MPI_Finalize();
-}

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/mpi.c (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/mpi.c)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/mpi.c	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/mpi.c	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,120 @@
+/******************************************************************************
+* FILE: mpl.ex1.c
+* DESCRIPTION: 
+*   In this simple example, the master task initiates numtasks-1 number of
+*   worker tasks.  It then distributes an equal portion of an array to each 
+*   worker task.  Each worker task receives its portion of the array, and 
+*   performs a simple value assignment to each of its elements. The value 
+*   assigned to each element is simply that element's index in the array+1.  
+*   Each worker task then sends its portion of the array back to the master 
+*   task.  As the master receives back each portion of the array, selected 
+*   elements are displayed. 
+* AUTHOR: Blaise Barney
+* LAST REVISED:  09/14/93 for latest API changes  Blaise Barney
+* LAST REVISED:  01/10/94 changed API to MPL      Stacy Pendell
+* CONVERTED TO MPI: 11/12/94 by                   Xianneng Shen
+****************************************************************************/
+
+typedef unsigned int size_t;
+#include <stdio.h>
+#include "mpi.h"
+#define	ARRAYSIZE	60000	
+#define MASTER		0	/* taskid of first process */
+
+MPI_Status status;
+main(int argc, char **argv) 
+{
+int	numtasks, 		/* total number of MPI process in partitiion */
+	numworkers,		/* number of worker tasks */
+	taskid,			/* task identifier */
+	dest,			/* destination task id to send message */
+	index, 			/* index into the array */
+	i, 			/* loop variable */
+       	arraymsg = 1, 		/* setting a message type */
+   	indexmsg = 2,		/* setting a message type */
+	source,			/* origin task id of message */
+	chunksize; 		/* for partitioning the array */
+float	data[ARRAYSIZE], 	/* the intial array */
+	result[ARRAYSIZE];	/* for holding results of array operations */
+
+/************************* initializations ***********************************
+* Find out how many tasks are in this partition and what my task id is.  Then
+* define the number of worker tasks and the array partition size as chunksize. 
+* Note:  For this example, the MP_PROCS environment variable should be set
+* to an odd number...to insure even distribution of the array to numtasks-1
+* worker tasks.
+******************************************************************************/
+MPI_Init(&argc, &argv);
+MPI_Comm_rank(MPI_COMM_WORLD, &taskid);
+MPI_Comm_size(MPI_COMM_WORLD, &numtasks);
+numworkers = numtasks-1;
+chunksize = (ARRAYSIZE / numworkers);
+
+/**************************** master task ************************************/
+if (taskid == MASTER) {
+  printf("\n*********** Starting MPI Example 1 ************\n");
+  printf("MASTER: number of worker tasks will be= %d\n",numworkers);
+  fflush(stdout);
+
+  /* Initialize the array */
+  for(i=0; i<ARRAYSIZE; i++) 
+    data[i] =  0.0;
+  index = 0;
+
+  /* Send each worker task its portion of the array */
+  for (dest=1; dest<= numworkers; dest++) {
+    printf("Sending to worker task= %d\n",dest);
+    fflush(stdout);
+		#pragma SliceTarget
+    MPI_Send(&index, 1, MPI_INT, dest, 0, MPI_COMM_WORLD);
+		#pragma SliceTarget
+    MPI_Send(&data[index], chunksize, MPI_FLOAT, dest, 0, MPI_COMM_WORLD);
+    index = index + chunksize;
+    }
+
+  /* Now wait to receive back the results from each worker task and print */
+  /* a few sample values */
+  for (i=1; i<= numworkers; i++) {
+    source = i;
+		#pragma SliceTarget
+    MPI_Recv(&index, 1, MPI_INT, source, 1, MPI_COMM_WORLD, &status);
+		#pragma SliceTarget
+    MPI_Recv(&result[index], chunksize, MPI_FLOAT, source, 1, MPI_COMM_WORLD, 
+          &status);
+
+    printf("---------------------------------------------------\n");
+    printf("MASTER: Sample results from worker task = %d\n",source);
+    printf("   result[%d]=%f\n", index, result[index]);
+    printf("   result[%d]=%f\n", index+100, result[index+100]);
+    printf("   result[%d]=%f\n\n", index+1000, result[index+1000]);
+    fflush(stdout);
+    }
+
+  printf("MASTER: All Done! \n");
+  }
+
+
+/**************************** worker task ************************************/
+if (taskid > MASTER) {
+  /* Receive my portion of array from the master task */
+  source = MASTER;
+	#pragma SliceTarget
+  MPI_Recv(&index, 1, MPI_INT, source, 0, MPI_COMM_WORLD, &status);
+	#pragma SliceTarget
+  MPI_Recv(&result[index], chunksize, MPI_FLOAT, source, 0, 
+          MPI_COMM_WORLD, &status);
+  /* Do a simple value assignment to each of my array elements */
+  for(i=index; i < index + chunksize; i++)
+    result[i] = i + 1;
+
+  /* Send my results back to the master task */
+
+	#pragma SliceTarget
+  MPI_Send(&index, 1, MPI_INT, MASTER, 1, MPI_COMM_WORLD);
+	#pragma SliceTarget
+  MPI_Send(&result[index], chunksize, MPI_FLOAT, MASTER, 1, MPI_COMM_WORLD);
+
+  }
+	#pragma SliceTarget
+  MPI_Finalize();
+}

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,7 +0,0 @@
-
-int main(int argc, char* argv) {
-  int a=2;
-  if (true) { a=4; }
-  int c=4;
-}
-

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,7 @@
+
+int main(int argc, char* argv) {
+  int a=2;
+  if (true) { a=4; }
+  int c=4;
+}
+

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.output
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.output	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.output	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,3061 +0,0 @@
->>>> Starting ROSE frontend ... 
- >> Class name: SgFile
-
- >>> Using Information relative to other declaration: 
-
- >> File-Name: /home/panas2/development/dataflow/tests/test1.c
-Inside of propagateHiddenListData (node = 0xb7ef5008 = SgFile) 
-Frontend Warnings only: errorCode = 2 
->>>> generate PDF 
->>>> start def-use analysis ... 
-START: DefUse Analysis True
-START: Finding global variables
- Amount of global variables : 0
- -----------------------------------------------------------------*
-
-
-FINISH: Finding global variables
-
- **************** MAP ************************** 
-START: Traversal over Functions
-Warning: can't locate an associated SgStatement from astNode = 0x9875458 = SgTypeInt parentNode = 0x9875458 = SgTypeInt 
-Warning: can't locate an associated SgStatement from astNode = 0x9881070 = SgPointerType parentNode = 0x9881070 = SgPointerType 
- Found function ::main(int, char *)
-Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-
-
-------------------------------------------------------------------
-current Node: 0xb7e16008  previous Node : 0
-
-
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FUNCTION %%%%%%
-
- found global vars: 0 funEntry true
- Current Node: 0xb7e16008 changed: true
- Current Node: 0xb7e16008 unhandled: false
-
-!! Worklist :  - <SgInitializedName> argc :0
-
-
-------------------------------------------------------------------
-current Node: 0x98465c8  previous Node : 0xb7e16008
- **********  INITNAME. 0x98465c8
- **********  INITNAME. use  def true
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x98465c8 : SgInitializedName : argc
- ---- JUSTCOPY. 0x98465c8
-
- **************** MAP ************************** 
-1: -1 var: argc
-  ----- IS USE. CHANGED TABLE ? false
- ---- JUSTCOPY. 0x98465c8
-
- **************** MAP ************************** 
-1: -1 var: argc
- ---- JUSTCOPY. 0x98465c8
-
- **************** MAP ************************** 
-1: -1 var: argc
-  ----- Definition. Is value contained ?  false
-  ----- NEW Definition. Adding: argc nrInEdges: 1
-  ----- changed table (one incoming) entry to 0x98465c8
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
- Current Node: 0x98465c8 changed: true
- Current Node: 0x98465c8 unhandled: false
-
-!! Worklist :  - <SgInitializedName> argv :0
-
-
-------------------------------------------------------------------
-current Node: 0x9846620  previous Node : 0x98465c8
- **********  INITNAME. 0x9846620
- **********  INITNAME. use  def true
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x9846620 : SgInitializedName : argv
- ---- JUSTCOPY. 0x9846620
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x9846620
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
- ---- JUSTCOPY. 0x9846620
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-  ----- Definition. Is value contained ?  false
-  ----- NEW Definition. Adding: argv nrInEdges: 1
-  ----- changed table (one incoming) entry to 0x9846620
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x9846620 changed: true
- Current Node: 0x9846620 unhandled: false
-
-!! Worklist :  - <SgFunctionParameterList>  :2
-
-
-------------------------------------------------------------------
-current Node: 0xb7e625ac  previous Node : 0x9846620
- ********** UNHANDLED.  This is an unhandled node SgFunctionParameterList
- ---- JUSTCOPY. 0xb7e625ac
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0xb7e625ac
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 4 var: SgFunctionParameterList
- Current Node: 0xb7e625ac changed: false
- Current Node: 0xb7e625ac unhandled: true
-
-!! Worklist :  - <SgInitializedName> a :0
-
-
-------------------------------------------------------------------
-current Node: 0x9846678  previous Node : 0xb7e625ac
- **********  INITNAME. 0x9846678
- **********  INITNAME. use  def true
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x9846678 : SgInitializedName : a
- ---- JUSTCOPY. 0x9846678
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-4: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x9846678
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x9846678
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  false
-  ----- NEW Definition. Adding: a nrInEdges: 1
-  ----- changed table (one incoming) entry to 0x9846678
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x9846678 changed: true
- Current Node: 0x9846678 unhandled: false
-
-!! Worklist :  - <SgIntVal> 2 :0
-
-
-------------------------------------------------------------------
-current Node: 0x9901000  previous Node : 0x9846678
- ********** UNHANDLED.  This is an unhandled node SgIntVal
- ---- JUSTCOPY. 0x9901000
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-5: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9901000
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 6 var: SgIntVal
-5: 4 var: SgFunctionParameterList
- Current Node: 0x9901000 changed: false
- Current Node: 0x9901000 unhandled: true
-
-!! Worklist :  - <SgAssignInitializer> 2 :1
-
-
-------------------------------------------------------------------
-current Node: 0x990db28  previous Node : 0x9901000
- **********  ASSIGNINITIALIZER 
- **********  ASSIGNINITIALIZER: 0x990db28
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x990db28 : SgAssignInitializer : a
- ---- JUSTCOPY. 0x990db28
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x990db28
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x990db28
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  true
-  ----- Definition EXISTS : a nrInEdges: 1
-  ----- changed table (one incoming)  true  dont_replace: false
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-6: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x990db28 changed: true
- Current Node: 0x990db28 unhandled: false
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int a = 2; :1
-
-
-------------------------------------------------------------------
-current Node: 0xb7dd4008  previous Node : 0x990db28
- ********** UNHANDLED.  This is an unhandled node SgVariableDeclaration
- ---- JUSTCOPY. 0xb7dd4008
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-6: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0xb7dd4008
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 8 var: SgVariableDeclaration
-7: 4 var: SgFunctionParameterList
- Current Node: 0xb7dd4008 changed: false
- Current Node: 0xb7dd4008 unhandled: true
-
-!! Worklist :  - <SgBoolValExp> true :0
-
-
-------------------------------------------------------------------
-current Node: 0x9939c58  previous Node : 0xb7dd4008
- ********** UNHANDLED.  This is an unhandled node SgBoolValExp
- ---- JUSTCOPY. 0x9939c58
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-6: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-8: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9939c58
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 9 var: SgBoolValExp
-7: 8 var: SgVariableDeclaration
-8: 4 var: SgFunctionParameterList
- Current Node: 0x9939c58 changed: false
- Current Node: 0x9939c58 unhandled: true
-
-!! Worklist :  - <SgExprStatement> true; :1
-
-
-------------------------------------------------------------------
-current Node: 0x99457e0  previous Node : 0x9939c58
- ********** UNHANDLED.  This is an unhandled node SgExprStatement
- ---- JUSTCOPY. 0x99457e0
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-6: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-8: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x99457e0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 9 var: SgBoolValExp
-7: 10 var: SgExprStatement
-8: 8 var: SgVariableDeclaration
-9: 4 var: SgFunctionParameterList
- Current Node: 0x99457e0 changed: false
- Current Node: 0x99457e0 unhandled: true
-
-!! Worklist :  - <SgIfStmt> if(true) {a = 4;}els... :1
-
-
-------------------------------------------------------------------
-current Node: 0x991a6d8  previous Node : 0x99457e0
- ********** UNHANDLED.  This is an unhandled node SgIfStmt
- ---- JUSTCOPY. 0x991a6d8
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-6: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-8: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x991a6d8
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 11 var: SgIfStmt
-7: 9 var: SgBoolValExp
-8: 10 var: SgExprStatement
-9: 8 var: SgVariableDeclaration
-10: 4 var: SgFunctionParameterList
- Current Node: 0x991a6d8 changed: false
- Current Node: 0x991a6d8 unhandled: true
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVarRefExp> a :0 - <SgInitializedName> c :0
-
-
-------------------------------------------------------------------
-current Node: 0x994f540  previous Node : 0x991a6d8
- **********  VARREFEXP. 0x994f540 .. a
- nr for that node ( a) : 5
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x994f540 : SgVarRefExp : a
- ---- JUSTCOPY. 0x994f540
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-6: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-8: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x994f540
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 11 var: SgIfStmt
-7: 9 var: SgBoolValExp
-8: 10 var: SgExprStatement
-9: 12 var: a
-10: 8 var: SgVariableDeclaration
-11: 4 var: SgFunctionParameterList
- Current Node: 0x994f540 changed: true
- Current Node: 0x994f540 unhandled: false
-
-!! Worklist :  - <SgInitializedName> c :0 - <SgIntVal> 4 :0
-
-
-------------------------------------------------------------------
-current Node: 0x98466d0  previous Node : 0x9945808
- **********  INITNAME. 0x98466d0
- **********  INITNAME. use  def true
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x98466d0 : SgInitializedName : c
- ---- JUSTCOPY. 0x98466d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-8: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x98466d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 7 var: SgAssignInitializer
-7: 11 var: SgIfStmt
-8: 9 var: SgBoolValExp
-9: 10 var: SgExprStatement
-10: 12 var: a
-11: 8 var: SgVariableDeclaration
-12: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x98466d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 7 var: SgAssignInitializer
-7: 11 var: SgIfStmt
-8: 9 var: SgBoolValExp
-9: 10 var: SgExprStatement
-10: 12 var: a
-11: 8 var: SgVariableDeclaration
-12: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  false
-  ----- NEW Definition. Adding: c nrInEdges: 2
-  ----- changed table (multi incoming) entry to 0x98466d0 .. otherNode: 0x991a6d8
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-8: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x98466d0 changed: true
- Current Node: 0x98466d0 unhandled: false
-
-!! Worklist :  - <SgIntVal> 4 :0 - <SgIntVal> 4 :0
-
-
-------------------------------------------------------------------
-current Node: 0x9901034  previous Node : 0x994f540
- ********** UNHANDLED.  This is an unhandled node SgIntVal
- ---- JUSTCOPY. 0x9901034
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-8: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9901034
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 7 var: SgAssignInitializer
-8: 11 var: SgIfStmt
-9: 9 var: SgBoolValExp
-10: 10 var: SgExprStatement
-11: 12 var: a
-12: 8 var: SgVariableDeclaration
-13: 4 var: SgFunctionParameterList
- Current Node: 0x9901034 changed: false
- Current Node: 0x9901034 unhandled: true
-
-!! Worklist :  - <SgIntVal> 4 :0Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgAssignOp> a = 4 :2
-
-
-------------------------------------------------------------------
-current Node: 0x9901068  previous Node : 0x98466d0
- ********** UNHANDLED.  This is an unhandled node SgIntVal
- ---- JUSTCOPY. 0x9901068
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9901068
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 11 var: SgIfStmt
-10: 9 var: SgBoolValExp
-11: 10 var: SgExprStatement
-12: 12 var: a
-13: 8 var: SgVariableDeclaration
-14: 4 var: SgFunctionParameterList
- Current Node: 0x9901068 changed: false
- Current Node: 0x9901068 unhandled: true
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgAssignOp> a = 4 :2 - <SgAssignInitializer> 4 :1
-
-
-------------------------------------------------------------------
-current Node: 0x995a1a0  previous Node : 0x9901034
- **********  BINARY OP. 0x995a1a0
- **********  BINARY OP IS_VAR_REF_EXP. 
- BINARY OP: a  name: 0x9846678  varRefExp: 0x994f540
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x995a1a0 : SgAssignOp : a
- ---- JUSTCOPY. 0x995a1a0
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-15: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x995a1a0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 11 var: SgIfStmt
-10: 9 var: SgBoolValExp
-11: 10 var: SgExprStatement
-12: 12 var: a
-13: 16 var: SgAssignOp
-14: 8 var: SgVariableDeclaration
-15: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x995a1a0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 11 var: SgIfStmt
-10: 9 var: SgBoolValExp
-11: 10 var: SgExprStatement
-12: 12 var: a
-13: 16 var: SgAssignOp
-14: 8 var: SgVariableDeclaration
-15: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  true
-  ----- Definition EXISTS : a nrInEdges: 1
-  ----- changed table (one incoming)  true  dont_replace: false
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-15: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x995a1a0 changed: true
- Current Node: 0x995a1a0 unhandled: false
-
-!! Worklist :  - <SgAssignInitializer> 4 :1Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgExprStatement> a = 4; :1
-
-
-------------------------------------------------------------------
-current Node: 0x990db5c  previous Node : 0x9901068
- **********  ASSIGNINITIALIZER 
- **********  ASSIGNINITIALIZER: 0x990db5c
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x990db5c : SgAssignInitializer : c
- ---- JUSTCOPY. 0x990db5c
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-10: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-15: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-16: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x990db5c
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgIfStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 12 var: a
-14: 16 var: SgAssignOp
-15: 8 var: SgVariableDeclaration
-16: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x990db5c
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgIfStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 12 var: a
-14: 16 var: SgAssignOp
-15: 8 var: SgVariableDeclaration
-16: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  true
-  ----- Definition EXISTS : c nrInEdges: 1
-  ----- changed table (one incoming)  true  dont_replace: false
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-15: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-16: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x990db5c changed: true
- Current Node: 0x990db5c unhandled: false
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgExprStatement> a = 4; :1Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int c = 4; :1
-
-
-------------------------------------------------------------------
-current Node: 0x9945808  previous Node : 0x995a1a0
- ********** UNHANDLED.  This is an unhandled node SgExprStatement
- ---- JUSTCOPY. 0x9945808
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9945808
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgIfStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 4 var: SgFunctionParameterList
- Current Node: 0x9945808 changed: false
- Current Node: 0x9945808 unhandled: true
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int c = 4; :1 - <SgInitializedName> c :0
-
-
-------------------------------------------------------------------
-current Node: 0xb7dd4114  previous Node : 0x990db5c
- ********** UNHANDLED.  This is an unhandled node SgVariableDeclaration
- ---- JUSTCOPY. 0xb7dd4114
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0xb7dd4114
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgIfStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 4 var: SgFunctionParameterList
- Current Node: 0xb7dd4114 changed: false
- Current Node: 0xb7dd4114 unhandled: true
-
-!! Worklist :  - <SgInitializedName> c :0 - <SgIntVal> 0 :0
-
-
-------------------------------------------------------------------
-current Node: 0x98466d0  previous Node : 0x9945808
- **********  INITNAME. 0x98466d0
- **********  INITNAME. use  def true
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x98466d0 : SgInitializedName : c
- ---- JUSTCOPY. 0x98466d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x98466d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgIfStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x98466d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgIfStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  false
-  ----- NEW Definition. Adding: c nrInEdges: 2
-  ----- changed table (multi incoming) entry to 0x98466d0 .. otherNode: 0x991a6d8
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x98466d0 changed: true
- Current Node: 0x98466d0 unhandled: false
-
-!! Worklist :  - <SgIntVal> 0 :0 - <SgIntVal> 4 :0
-
-
-------------------------------------------------------------------
-current Node: 0x990109c  previous Node : 0xb7dd4114
- ********** UNHANDLED.  This is an unhandled node SgIntVal
- ---- JUSTCOPY. 0x990109c
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 20 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-9: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-11: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-15: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-16: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-17: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-18: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x990109c
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 20 var: SgIntVal
-9: 7 var: SgAssignInitializer
-10: 17 var: SgAssignInitializer
-11: 11 var: SgIfStmt
-12: 9 var: SgBoolValExp
-13: 10 var: SgExprStatement
-14: 18 var: SgExprStatement
-15: 12 var: a
-16: 16 var: SgAssignOp
-17: 8 var: SgVariableDeclaration
-18: 19 var: SgVariableDeclaration
-19: 4 var: SgFunctionParameterList
- Current Node: 0x990109c changed: false
- Current Node: 0x990109c unhandled: true
-
-!! Worklist :  - <SgIntVal> 4 :0 - <SgReturnStmt> return 0; :1
-
-
-------------------------------------------------------------------
-current Node: 0x9901068  previous Node : 0x98466d0
- ********** UNHANDLED.  This is an unhandled node SgIntVal
- ---- JUSTCOPY. 0x9901068
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 20 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-9: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-11: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-15: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-16: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-17: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-18: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9901068
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 20 var: SgIntVal
-9: 7 var: SgAssignInitializer
-10: 17 var: SgAssignInitializer
-11: 11 var: SgIfStmt
-12: 9 var: SgBoolValExp
-13: 10 var: SgExprStatement
-14: 18 var: SgExprStatement
-15: 12 var: a
-16: 16 var: SgAssignOp
-17: 8 var: SgVariableDeclaration
-18: 19 var: SgVariableDeclaration
-19: 4 var: SgFunctionParameterList
- Current Node: 0x9901068 changed: false
- Current Node: 0x9901068 unhandled: true
-
-!! Worklist :  - <SgReturnStmt> return 0; :1 - <SgAssignInitializer> 4 :1
-
-
-------------------------------------------------------------------
-current Node: 0x9966e78  previous Node : 0x990109c
- ********** UNHANDLED.  This is an unhandled node SgReturnStmt
- ---- JUSTCOPY. 0x9966e78
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 20 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-9: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-11: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-15: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-16: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-17: 21 var: SgReturnStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-19: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-20: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9966e78
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 20 var: SgIntVal
-9: 7 var: SgAssignInitializer
-10: 17 var: SgAssignInitializer
-11: 11 var: SgIfStmt
-12: 9 var: SgBoolValExp
-13: 10 var: SgExprStatement
-14: 18 var: SgExprStatement
-15: 12 var: a
-16: 16 var: SgAssignOp
-17: 21 var: SgReturnStmt
-18: 8 var: SgVariableDeclaration
-19: 19 var: SgVariableDeclaration
-20: 4 var: SgFunctionParameterList
- Current Node: 0x9966e78 changed: false
- Current Node: 0x9966e78 unhandled: true
-
-!! Worklist :  - <SgAssignInitializer> 4 :1 - <SgFunctionDefinition> int main(int argc,ch... :2
-
-
-------------------------------------------------------------------
-current Node: 0x990db5c  previous Node : 0x9901068
- **********  ASSIGNINITIALIZER 
- **********  ASSIGNINITIALIZER: 0x990db5c
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x990db5c : SgAssignInitializer : c
- ---- JUSTCOPY. 0x990db5c
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 20 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-9: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-11: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-15: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-16: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-17: 21 var: SgReturnStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-19: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-20: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x990db5c
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 20 var: SgIntVal
-9: 7 var: SgAssignInitializer
-10: 17 var: SgAssignInitializer
-11: 11 var: SgIfStmt
-12: 9 var: SgBoolValExp
-13: 10 var: SgExprStatement
-14: 18 var: SgExprStatement
-15: 12 var: a
-16: 16 var: SgAssignOp
-17: 21 var: SgReturnStmt
-18: 8 var: SgVariableDeclaration
-19: 19 var: SgVariableDeclaration
-20: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x990db5c
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 20 var: SgIntVal
-9: 7 var: SgAssignInitializer
-10: 17 var: SgAssignInitializer
-11: 11 var: SgIfStmt
-12: 9 var: SgBoolValExp
-13: 10 var: SgExprStatement
-14: 18 var: SgExprStatement
-15: 12 var: a
-16: 16 var: SgAssignOp
-17: 21 var: SgReturnStmt
-18: 8 var: SgVariableDeclaration
-19: 19 var: SgVariableDeclaration
-20: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  true
-  ----- Definition EXISTS : c nrInEdges: 1
-  ----- changed table (one incoming)  true  dont_replace: false
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 20 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-9: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-11: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-15: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-16: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-17: 21 var: SgReturnStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-19: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-20: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x990db5c changed: true
- Current Node: 0x990db5c unhandled: false
-
-!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :2Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int c = 4; :1
-
-
-------------------------------------------------------------------
-current Node: 0xb7e16008  previous Node : 0x9966e78
- found global vars: 0 funEntry false
- ********** UNHANDLED.  This is an unhandled node SgFunctionDefinition
- ---- JUSTCOPY. 0xb7e16008
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 20 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-9: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-11: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-15: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-16: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-17: 21 var: SgReturnStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-19: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-20: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-21: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0xb7e16008
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 20 var: SgIntVal
-9: 7 var: SgAssignInitializer
-10: 17 var: SgAssignInitializer
-11: 11 var: SgIfStmt
-12: 9 var: SgBoolValExp
-13: 10 var: SgExprStatement
-14: 18 var: SgExprStatement
-15: 12 var: a
-16: 16 var: SgAssignOp
-17: 21 var: SgReturnStmt
-18: 8 var: SgVariableDeclaration
-19: 19 var: SgVariableDeclaration
-20: 1 var: SgFunctionDefinition
-21: 4 var: SgFunctionParameterList
- Current Node: 0xb7e16008 changed: false
- Current Node: 0xb7e16008 unhandled: true
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int c = 4; :1
-
-
-------------------------------------------------------------------
-current Node: 0xb7dd4114  previous Node : 0x990db5c
- ********** UNHANDLED.  This is an unhandled node SgVariableDeclaration
- ---- JUSTCOPY. 0xb7dd4114
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 20 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-9: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-11: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-15: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-16: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-17: 21 var: SgReturnStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-19: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-20: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-21: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0xb7dd4114
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 20 var: SgIntVal
-9: 7 var: SgAssignInitializer
-10: 17 var: SgAssignInitializer
-11: 11 var: SgIfStmt
-12: 9 var: SgBoolValExp
-13: 10 var: SgExprStatement
-14: 18 var: SgExprStatement
-15: 12 var: a
-16: 16 var: SgAssignOp
-17: 21 var: SgReturnStmt
-18: 8 var: SgVariableDeclaration
-19: 19 var: SgVariableDeclaration
-20: 1 var: SgFunctionDefinition
-21: 4 var: SgFunctionParameterList
- Current Node: 0xb7dd4114 changed: false
- Current Node: 0xb7dd4114 unhandled: true
-
-!! Worklist :  - <SgIntVal> 0 :0
-
-
-------------------------------------------------------------------
-current Node: 0x990109c  previous Node : 0xb7dd4114
- ********** UNHANDLED.  This is an unhandled node SgIntVal
- ---- JUSTCOPY. 0x990109c
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 20 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-9: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-11: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-15: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-16: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-17: 21 var: SgReturnStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-19: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-20: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-21: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x990109c
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 20 var: SgIntVal
-9: 7 var: SgAssignInitializer
-10: 17 var: SgAssignInitializer
-11: 11 var: SgIfStmt
-12: 9 var: SgBoolValExp
-13: 10 var: SgExprStatement
-14: 18 var: SgExprStatement
-15: 12 var: a
-16: 16 var: SgAssignOp
-17: 21 var: SgReturnStmt
-18: 8 var: SgVariableDeclaration
-19: 19 var: SgVariableDeclaration
-20: 1 var: SgFunctionDefinition
-21: 4 var: SgFunctionParameterList
- Current Node: 0x990109c changed: false
- Current Node: 0x990109c unhandled: true
-
-!! Worklist :  - <SgReturnStmt> return 0; :1
-
-
-------------------------------------------------------------------
-current Node: 0x9966e78  previous Node : 0x990109c
- ********** UNHANDLED.  This is an unhandled node SgReturnStmt
- ---- JUSTCOPY. 0x9966e78
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 20 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-9: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-11: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-15: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-16: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-17: 21 var: SgReturnStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-18: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-19: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-20: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-21: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9966e78
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 20 var: SgIntVal
-9: 7 var: SgAssignInitializer
-10: 17 var: SgAssignInitializer
-11: 11 var: SgIfStmt
-12: 9 var: SgBoolValExp
-13: 10 var: SgExprStatement
-14: 18 var: SgExprStatement
-15: 12 var: a
-16: 16 var: SgAssignOp
-17: 21 var: SgReturnStmt
-18: 8 var: SgVariableDeclaration
-19: 19 var: SgVariableDeclaration
-20: 1 var: SgFunctionDefinition
-21: 4 var: SgFunctionParameterList
- Current Node: 0x9966e78 changed: false
- Current Node: 0x9966e78 unhandled: true
-
-!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :2
-
-
-------------------------------------------------------------------
-current Node: 0xb7e16008  previous Node : 0x9966e78
- found global vars: 0 funEntry false
- ********** UNHANDLED.  This is an unhandled node SgFunctionDefinition
- ---- JUSTCOPY. 0xb7e16008
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 20 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-9: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-11: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-15: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-16: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-17: 21 var: SgReturnStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-18: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-19: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-20: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-21: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0xb7e16008
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 20 var: SgIntVal
-9: 7 var: SgAssignInitializer
-10: 17 var: SgAssignInitializer
-11: 11 var: SgIfStmt
-12: 9 var: SgBoolValExp
-13: 10 var: SgExprStatement
-14: 18 var: SgExprStatement
-15: 12 var: a
-16: 16 var: SgAssignOp
-17: 21 var: SgReturnStmt
-18: 8 var: SgVariableDeclaration
-19: 19 var: SgVariableDeclaration
-20: 1 var: SgFunctionDefinition
-21: 4 var: SgFunctionParameterList
- Current Node: 0xb7e16008 changed: false
- Current Node: 0xb7e16008 unhandled: true
-
-!! Worklist : 
- Elements in Table: 21
- Exiting function ::main(int, char *)
-
-Nr of nodes visited 29  of nodes : 21
-
-!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :0 - <SgInitializedName> argc :0 - <SgInitializedName> argv :0 - <SgFunctionParameterList>  :2 - <SgInitializedName> a :0 - <SgIntVal> 2 :0 - <SgAssignInitializer> 2 :1Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int a = 2; :1 - <SgBoolValExp> true :0 - <SgExprStatement> true; :1 - <SgIfStmt> if(true) {a = 4;}els... :1Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVarRefExp> a :0 - <SgInitializedName> c :0 - <SgIntVal> 4 :0 - <SgIntVal> 4 :0Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgAssignOp> a = 4 :2 - <SgAssignInitializer> 4 :1Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgExprStatement> a = 4; :1Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int c = 4; :1 - <SgInitializedName> c :0 - <SgIntVal> 0 :0 - <SgIntVal> 4 :0 - <SgReturnStmt> return 0; :1 - <SgAssignInitializer> 4 :1 - <SgFunctionDefinition> int main(int argc,ch... :2Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int c = 4; :1 - <SgIntVal> 0 :0 - <SgReturnStmt> return 0; :1 - <SgFunctionDefinition> int main(int argc,ch... :2
-Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-FINISH: Traversal over Functions
-
-
->>>>> Time for dfa-test: 0.17 sec
->>>>> Total CFG nodes: 21  --  #CFG nodes visited: 29
-FINISH: DefUse Analysis True
-Analysis is : success
-  DEF>> Vector entries for argc ( 0x98465c8 ) : 1
-  DEF>> Vector entries for argv ( 0x9846620 ) : 1
-  DEF>> Vector entries for a ( 0x9846678 ) : 1
-  DEF>> Vector entries for c ( 0x98466d0 ) : 1
-
-DEFMAP
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 20 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-9: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-11: 11 var: SgIfStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-15: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-16: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-17: 21 var: SgReturnStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-18: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-19: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-20: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-21: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-
-USEMAP
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 20 var: SgIntVal
-9: 7 var: SgAssignInitializer
-10: 17 var: SgAssignInitializer
-11: 11 var: SgIfStmt
-12: 9 var: SgBoolValExp
-13: 10 var: SgExprStatement
-14: 18 var: SgExprStatement
-15: 12 var: a
-16: 16 var: SgAssignOp
-17: 21 var: SgReturnStmt
-18: 8 var: SgVariableDeclaration
-19: 19 var: SgVariableDeclaration
-20: 1 var: SgFunctionDefinition
-21: 4 var: SgFunctionParameterList

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.output (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.output)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.output	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test1.output	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,3061 @@
+>>>> Starting ROSE frontend ... 
+ >> Class name: SgFile
+
+ >>> Using Information relative to other declaration: 
+
+ >> File-Name: /home/panas2/development/dataflow/tests/test1.c
+Inside of propagateHiddenListData (node = 0xb7ef5008 = SgFile) 
+Frontend Warnings only: errorCode = 2 
+>>>> generate PDF 
+>>>> start def-use analysis ... 
+START: DefUse Analysis True
+START: Finding global variables
+ Amount of global variables : 0
+ -----------------------------------------------------------------*
+
+
+FINISH: Finding global variables
+
+ **************** MAP ************************** 
+START: Traversal over Functions
+Warning: can't locate an associated SgStatement from astNode = 0x9875458 = SgTypeInt parentNode = 0x9875458 = SgTypeInt 
+Warning: can't locate an associated SgStatement from astNode = 0x9881070 = SgPointerType parentNode = 0x9881070 = SgPointerType 
+ Found function ::main(int, char *)
+Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+
+
+------------------------------------------------------------------
+current Node: 0xb7e16008  previous Node : 0
+
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FUNCTION %%%%%%
+
+ found global vars: 0 funEntry true
+ Current Node: 0xb7e16008 changed: true
+ Current Node: 0xb7e16008 unhandled: false
+
+!! Worklist :  - <SgInitializedName> argc :0
+
+
+------------------------------------------------------------------
+current Node: 0x98465c8  previous Node : 0xb7e16008
+ **********  INITNAME. 0x98465c8
+ **********  INITNAME. use  def true
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x98465c8 : SgInitializedName : argc
+ ---- JUSTCOPY. 0x98465c8
+
+ **************** MAP ************************** 
+1: -1 var: argc
+  ----- IS USE. CHANGED TABLE ? false
+ ---- JUSTCOPY. 0x98465c8
+
+ **************** MAP ************************** 
+1: -1 var: argc
+ ---- JUSTCOPY. 0x98465c8
+
+ **************** MAP ************************** 
+1: -1 var: argc
+  ----- Definition. Is value contained ?  false
+  ----- NEW Definition. Adding: argc nrInEdges: 1
+  ----- changed table (one incoming) entry to 0x98465c8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+ Current Node: 0x98465c8 changed: true
+ Current Node: 0x98465c8 unhandled: false
+
+!! Worklist :  - <SgInitializedName> argv :0
+
+
+------------------------------------------------------------------
+current Node: 0x9846620  previous Node : 0x98465c8
+ **********  INITNAME. 0x9846620
+ **********  INITNAME. use  def true
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x9846620 : SgInitializedName : argv
+ ---- JUSTCOPY. 0x9846620
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x9846620
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+ ---- JUSTCOPY. 0x9846620
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+  ----- Definition. Is value contained ?  false
+  ----- NEW Definition. Adding: argv nrInEdges: 1
+  ----- changed table (one incoming) entry to 0x9846620
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x9846620 changed: true
+ Current Node: 0x9846620 unhandled: false
+
+!! Worklist :  - <SgFunctionParameterList>  :2
+
+
+------------------------------------------------------------------
+current Node: 0xb7e625ac  previous Node : 0x9846620
+ ********** UNHANDLED.  This is an unhandled node SgFunctionParameterList
+ ---- JUSTCOPY. 0xb7e625ac
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0xb7e625ac
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 4 var: SgFunctionParameterList
+ Current Node: 0xb7e625ac changed: false
+ Current Node: 0xb7e625ac unhandled: true
+
+!! Worklist :  - <SgInitializedName> a :0
+
+
+------------------------------------------------------------------
+current Node: 0x9846678  previous Node : 0xb7e625ac
+ **********  INITNAME. 0x9846678
+ **********  INITNAME. use  def true
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x9846678 : SgInitializedName : a
+ ---- JUSTCOPY. 0x9846678
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+4: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x9846678
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x9846678
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  false
+  ----- NEW Definition. Adding: a nrInEdges: 1
+  ----- changed table (one incoming) entry to 0x9846678
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x9846678 changed: true
+ Current Node: 0x9846678 unhandled: false
+
+!! Worklist :  - <SgIntVal> 2 :0
+
+
+------------------------------------------------------------------
+current Node: 0x9901000  previous Node : 0x9846678
+ ********** UNHANDLED.  This is an unhandled node SgIntVal
+ ---- JUSTCOPY. 0x9901000
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+5: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9901000
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 6 var: SgIntVal
+5: 4 var: SgFunctionParameterList
+ Current Node: 0x9901000 changed: false
+ Current Node: 0x9901000 unhandled: true
+
+!! Worklist :  - <SgAssignInitializer> 2 :1
+
+
+------------------------------------------------------------------
+current Node: 0x990db28  previous Node : 0x9901000
+ **********  ASSIGNINITIALIZER 
+ **********  ASSIGNINITIALIZER: 0x990db28
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x990db28 : SgAssignInitializer : a
+ ---- JUSTCOPY. 0x990db28
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x990db28
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x990db28
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  true
+  ----- Definition EXISTS : a nrInEdges: 1
+  ----- changed table (one incoming)  true  dont_replace: false
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+6: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x990db28 changed: true
+ Current Node: 0x990db28 unhandled: false
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int a = 2; :1
+
+
+------------------------------------------------------------------
+current Node: 0xb7dd4008  previous Node : 0x990db28
+ ********** UNHANDLED.  This is an unhandled node SgVariableDeclaration
+ ---- JUSTCOPY. 0xb7dd4008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+6: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0xb7dd4008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 8 var: SgVariableDeclaration
+7: 4 var: SgFunctionParameterList
+ Current Node: 0xb7dd4008 changed: false
+ Current Node: 0xb7dd4008 unhandled: true
+
+!! Worklist :  - <SgBoolValExp> true :0
+
+
+------------------------------------------------------------------
+current Node: 0x9939c58  previous Node : 0xb7dd4008
+ ********** UNHANDLED.  This is an unhandled node SgBoolValExp
+ ---- JUSTCOPY. 0x9939c58
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+6: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+8: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9939c58
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 9 var: SgBoolValExp
+7: 8 var: SgVariableDeclaration
+8: 4 var: SgFunctionParameterList
+ Current Node: 0x9939c58 changed: false
+ Current Node: 0x9939c58 unhandled: true
+
+!! Worklist :  - <SgExprStatement> true; :1
+
+
+------------------------------------------------------------------
+current Node: 0x99457e0  previous Node : 0x9939c58
+ ********** UNHANDLED.  This is an unhandled node SgExprStatement
+ ---- JUSTCOPY. 0x99457e0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+6: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+8: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x99457e0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 9 var: SgBoolValExp
+7: 10 var: SgExprStatement
+8: 8 var: SgVariableDeclaration
+9: 4 var: SgFunctionParameterList
+ Current Node: 0x99457e0 changed: false
+ Current Node: 0x99457e0 unhandled: true
+
+!! Worklist :  - <SgIfStmt> if(true) {a = 4;}els... :1
+
+
+------------------------------------------------------------------
+current Node: 0x991a6d8  previous Node : 0x99457e0
+ ********** UNHANDLED.  This is an unhandled node SgIfStmt
+ ---- JUSTCOPY. 0x991a6d8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+6: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+8: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x991a6d8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 11 var: SgIfStmt
+7: 9 var: SgBoolValExp
+8: 10 var: SgExprStatement
+9: 8 var: SgVariableDeclaration
+10: 4 var: SgFunctionParameterList
+ Current Node: 0x991a6d8 changed: false
+ Current Node: 0x991a6d8 unhandled: true
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVarRefExp> a :0 - <SgInitializedName> c :0
+
+
+------------------------------------------------------------------
+current Node: 0x994f540  previous Node : 0x991a6d8
+ **********  VARREFEXP. 0x994f540 .. a
+ nr for that node ( a) : 5
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x994f540 : SgVarRefExp : a
+ ---- JUSTCOPY. 0x994f540
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+6: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+8: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x994f540
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 11 var: SgIfStmt
+7: 9 var: SgBoolValExp
+8: 10 var: SgExprStatement
+9: 12 var: a
+10: 8 var: SgVariableDeclaration
+11: 4 var: SgFunctionParameterList
+ Current Node: 0x994f540 changed: true
+ Current Node: 0x994f540 unhandled: false
+
+!! Worklist :  - <SgInitializedName> c :0 - <SgIntVal> 4 :0
+
+
+------------------------------------------------------------------
+current Node: 0x98466d0  previous Node : 0x9945808
+ **********  INITNAME. 0x98466d0
+ **********  INITNAME. use  def true
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x98466d0 : SgInitializedName : c
+ ---- JUSTCOPY. 0x98466d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+8: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x98466d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 7 var: SgAssignInitializer
+7: 11 var: SgIfStmt
+8: 9 var: SgBoolValExp
+9: 10 var: SgExprStatement
+10: 12 var: a
+11: 8 var: SgVariableDeclaration
+12: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x98466d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 7 var: SgAssignInitializer
+7: 11 var: SgIfStmt
+8: 9 var: SgBoolValExp
+9: 10 var: SgExprStatement
+10: 12 var: a
+11: 8 var: SgVariableDeclaration
+12: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  false
+  ----- NEW Definition. Adding: c nrInEdges: 2
+  ----- changed table (multi incoming) entry to 0x98466d0 .. otherNode: 0x991a6d8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+8: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x98466d0 changed: true
+ Current Node: 0x98466d0 unhandled: false
+
+!! Worklist :  - <SgIntVal> 4 :0 - <SgIntVal> 4 :0
+
+
+------------------------------------------------------------------
+current Node: 0x9901034  previous Node : 0x994f540
+ ********** UNHANDLED.  This is an unhandled node SgIntVal
+ ---- JUSTCOPY. 0x9901034
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+8: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9901034
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 7 var: SgAssignInitializer
+8: 11 var: SgIfStmt
+9: 9 var: SgBoolValExp
+10: 10 var: SgExprStatement
+11: 12 var: a
+12: 8 var: SgVariableDeclaration
+13: 4 var: SgFunctionParameterList
+ Current Node: 0x9901034 changed: false
+ Current Node: 0x9901034 unhandled: true
+
+!! Worklist :  - <SgIntVal> 4 :0Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgAssignOp> a = 4 :2
+
+
+------------------------------------------------------------------
+current Node: 0x9901068  previous Node : 0x98466d0
+ ********** UNHANDLED.  This is an unhandled node SgIntVal
+ ---- JUSTCOPY. 0x9901068
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9901068
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 11 var: SgIfStmt
+10: 9 var: SgBoolValExp
+11: 10 var: SgExprStatement
+12: 12 var: a
+13: 8 var: SgVariableDeclaration
+14: 4 var: SgFunctionParameterList
+ Current Node: 0x9901068 changed: false
+ Current Node: 0x9901068 unhandled: true
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgAssignOp> a = 4 :2 - <SgAssignInitializer> 4 :1
+
+
+------------------------------------------------------------------
+current Node: 0x995a1a0  previous Node : 0x9901034
+ **********  BINARY OP. 0x995a1a0
+ **********  BINARY OP IS_VAR_REF_EXP. 
+ BINARY OP: a  name: 0x9846678  varRefExp: 0x994f540
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x995a1a0 : SgAssignOp : a
+ ---- JUSTCOPY. 0x995a1a0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+15: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x995a1a0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 11 var: SgIfStmt
+10: 9 var: SgBoolValExp
+11: 10 var: SgExprStatement
+12: 12 var: a
+13: 16 var: SgAssignOp
+14: 8 var: SgVariableDeclaration
+15: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x995a1a0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 11 var: SgIfStmt
+10: 9 var: SgBoolValExp
+11: 10 var: SgExprStatement
+12: 12 var: a
+13: 16 var: SgAssignOp
+14: 8 var: SgVariableDeclaration
+15: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  true
+  ----- Definition EXISTS : a nrInEdges: 1
+  ----- changed table (one incoming)  true  dont_replace: false
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+15: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x995a1a0 changed: true
+ Current Node: 0x995a1a0 unhandled: false
+
+!! Worklist :  - <SgAssignInitializer> 4 :1Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgExprStatement> a = 4; :1
+
+
+------------------------------------------------------------------
+current Node: 0x990db5c  previous Node : 0x9901068
+ **********  ASSIGNINITIALIZER 
+ **********  ASSIGNINITIALIZER: 0x990db5c
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x990db5c : SgAssignInitializer : c
+ ---- JUSTCOPY. 0x990db5c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+10: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+15: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+16: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x990db5c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgIfStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 12 var: a
+14: 16 var: SgAssignOp
+15: 8 var: SgVariableDeclaration
+16: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x990db5c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgIfStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 12 var: a
+14: 16 var: SgAssignOp
+15: 8 var: SgVariableDeclaration
+16: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  true
+  ----- Definition EXISTS : c nrInEdges: 1
+  ----- changed table (one incoming)  true  dont_replace: false
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+15: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+16: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x990db5c changed: true
+ Current Node: 0x990db5c unhandled: false
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgExprStatement> a = 4; :1Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int c = 4; :1
+
+
+------------------------------------------------------------------
+current Node: 0x9945808  previous Node : 0x995a1a0
+ ********** UNHANDLED.  This is an unhandled node SgExprStatement
+ ---- JUSTCOPY. 0x9945808
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9945808
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgIfStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 4 var: SgFunctionParameterList
+ Current Node: 0x9945808 changed: false
+ Current Node: 0x9945808 unhandled: true
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int c = 4; :1 - <SgInitializedName> c :0
+
+
+------------------------------------------------------------------
+current Node: 0xb7dd4114  previous Node : 0x990db5c
+ ********** UNHANDLED.  This is an unhandled node SgVariableDeclaration
+ ---- JUSTCOPY. 0xb7dd4114
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0xb7dd4114
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgIfStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 4 var: SgFunctionParameterList
+ Current Node: 0xb7dd4114 changed: false
+ Current Node: 0xb7dd4114 unhandled: true
+
+!! Worklist :  - <SgInitializedName> c :0 - <SgIntVal> 0 :0
+
+
+------------------------------------------------------------------
+current Node: 0x98466d0  previous Node : 0x9945808
+ **********  INITNAME. 0x98466d0
+ **********  INITNAME. use  def true
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x98466d0 : SgInitializedName : c
+ ---- JUSTCOPY. 0x98466d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x98466d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgIfStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x98466d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgIfStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  false
+  ----- NEW Definition. Adding: c nrInEdges: 2
+  ----- changed table (multi incoming) entry to 0x98466d0 .. otherNode: 0x991a6d8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x98466d0 changed: true
+ Current Node: 0x98466d0 unhandled: false
+
+!! Worklist :  - <SgIntVal> 0 :0 - <SgIntVal> 4 :0
+
+
+------------------------------------------------------------------
+current Node: 0x990109c  previous Node : 0xb7dd4114
+ ********** UNHANDLED.  This is an unhandled node SgIntVal
+ ---- JUSTCOPY. 0x990109c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 20 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+9: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+11: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+15: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+16: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+17: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+18: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x990109c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 20 var: SgIntVal
+9: 7 var: SgAssignInitializer
+10: 17 var: SgAssignInitializer
+11: 11 var: SgIfStmt
+12: 9 var: SgBoolValExp
+13: 10 var: SgExprStatement
+14: 18 var: SgExprStatement
+15: 12 var: a
+16: 16 var: SgAssignOp
+17: 8 var: SgVariableDeclaration
+18: 19 var: SgVariableDeclaration
+19: 4 var: SgFunctionParameterList
+ Current Node: 0x990109c changed: false
+ Current Node: 0x990109c unhandled: true
+
+!! Worklist :  - <SgIntVal> 4 :0 - <SgReturnStmt> return 0; :1
+
+
+------------------------------------------------------------------
+current Node: 0x9901068  previous Node : 0x98466d0
+ ********** UNHANDLED.  This is an unhandled node SgIntVal
+ ---- JUSTCOPY. 0x9901068
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 20 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+9: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+11: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+15: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+16: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+17: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+18: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9901068
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 20 var: SgIntVal
+9: 7 var: SgAssignInitializer
+10: 17 var: SgAssignInitializer
+11: 11 var: SgIfStmt
+12: 9 var: SgBoolValExp
+13: 10 var: SgExprStatement
+14: 18 var: SgExprStatement
+15: 12 var: a
+16: 16 var: SgAssignOp
+17: 8 var: SgVariableDeclaration
+18: 19 var: SgVariableDeclaration
+19: 4 var: SgFunctionParameterList
+ Current Node: 0x9901068 changed: false
+ Current Node: 0x9901068 unhandled: true
+
+!! Worklist :  - <SgReturnStmt> return 0; :1 - <SgAssignInitializer> 4 :1
+
+
+------------------------------------------------------------------
+current Node: 0x9966e78  previous Node : 0x990109c
+ ********** UNHANDLED.  This is an unhandled node SgReturnStmt
+ ---- JUSTCOPY. 0x9966e78
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 20 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+9: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+11: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+15: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+16: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+17: 21 var: SgReturnStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+19: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+20: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9966e78
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 20 var: SgIntVal
+9: 7 var: SgAssignInitializer
+10: 17 var: SgAssignInitializer
+11: 11 var: SgIfStmt
+12: 9 var: SgBoolValExp
+13: 10 var: SgExprStatement
+14: 18 var: SgExprStatement
+15: 12 var: a
+16: 16 var: SgAssignOp
+17: 21 var: SgReturnStmt
+18: 8 var: SgVariableDeclaration
+19: 19 var: SgVariableDeclaration
+20: 4 var: SgFunctionParameterList
+ Current Node: 0x9966e78 changed: false
+ Current Node: 0x9966e78 unhandled: true
+
+!! Worklist :  - <SgAssignInitializer> 4 :1 - <SgFunctionDefinition> int main(int argc,ch... :2
+
+
+------------------------------------------------------------------
+current Node: 0x990db5c  previous Node : 0x9901068
+ **********  ASSIGNINITIALIZER 
+ **********  ASSIGNINITIALIZER: 0x990db5c
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x990db5c : SgAssignInitializer : c
+ ---- JUSTCOPY. 0x990db5c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 20 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+9: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+11: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+15: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+16: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+17: 21 var: SgReturnStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+19: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+20: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x990db5c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 20 var: SgIntVal
+9: 7 var: SgAssignInitializer
+10: 17 var: SgAssignInitializer
+11: 11 var: SgIfStmt
+12: 9 var: SgBoolValExp
+13: 10 var: SgExprStatement
+14: 18 var: SgExprStatement
+15: 12 var: a
+16: 16 var: SgAssignOp
+17: 21 var: SgReturnStmt
+18: 8 var: SgVariableDeclaration
+19: 19 var: SgVariableDeclaration
+20: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x990db5c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 20 var: SgIntVal
+9: 7 var: SgAssignInitializer
+10: 17 var: SgAssignInitializer
+11: 11 var: SgIfStmt
+12: 9 var: SgBoolValExp
+13: 10 var: SgExprStatement
+14: 18 var: SgExprStatement
+15: 12 var: a
+16: 16 var: SgAssignOp
+17: 21 var: SgReturnStmt
+18: 8 var: SgVariableDeclaration
+19: 19 var: SgVariableDeclaration
+20: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  true
+  ----- Definition EXISTS : c nrInEdges: 1
+  ----- changed table (one incoming)  true  dont_replace: false
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 20 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+9: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+11: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+15: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+16: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+17: 21 var: SgReturnStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+19: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+20: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x990db5c changed: true
+ Current Node: 0x990db5c unhandled: false
+
+!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :2Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int c = 4; :1
+
+
+------------------------------------------------------------------
+current Node: 0xb7e16008  previous Node : 0x9966e78
+ found global vars: 0 funEntry false
+ ********** UNHANDLED.  This is an unhandled node SgFunctionDefinition
+ ---- JUSTCOPY. 0xb7e16008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 20 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+9: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+11: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+15: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+16: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+17: 21 var: SgReturnStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+19: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+20: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+21: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0xb7e16008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 20 var: SgIntVal
+9: 7 var: SgAssignInitializer
+10: 17 var: SgAssignInitializer
+11: 11 var: SgIfStmt
+12: 9 var: SgBoolValExp
+13: 10 var: SgExprStatement
+14: 18 var: SgExprStatement
+15: 12 var: a
+16: 16 var: SgAssignOp
+17: 21 var: SgReturnStmt
+18: 8 var: SgVariableDeclaration
+19: 19 var: SgVariableDeclaration
+20: 1 var: SgFunctionDefinition
+21: 4 var: SgFunctionParameterList
+ Current Node: 0xb7e16008 changed: false
+ Current Node: 0xb7e16008 unhandled: true
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int c = 4; :1
+
+
+------------------------------------------------------------------
+current Node: 0xb7dd4114  previous Node : 0x990db5c
+ ********** UNHANDLED.  This is an unhandled node SgVariableDeclaration
+ ---- JUSTCOPY. 0xb7dd4114
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 20 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+9: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+11: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+15: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+16: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+17: 21 var: SgReturnStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+19: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+20: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+21: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0xb7dd4114
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 20 var: SgIntVal
+9: 7 var: SgAssignInitializer
+10: 17 var: SgAssignInitializer
+11: 11 var: SgIfStmt
+12: 9 var: SgBoolValExp
+13: 10 var: SgExprStatement
+14: 18 var: SgExprStatement
+15: 12 var: a
+16: 16 var: SgAssignOp
+17: 21 var: SgReturnStmt
+18: 8 var: SgVariableDeclaration
+19: 19 var: SgVariableDeclaration
+20: 1 var: SgFunctionDefinition
+21: 4 var: SgFunctionParameterList
+ Current Node: 0xb7dd4114 changed: false
+ Current Node: 0xb7dd4114 unhandled: true
+
+!! Worklist :  - <SgIntVal> 0 :0
+
+
+------------------------------------------------------------------
+current Node: 0x990109c  previous Node : 0xb7dd4114
+ ********** UNHANDLED.  This is an unhandled node SgIntVal
+ ---- JUSTCOPY. 0x990109c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 20 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+9: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+11: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+15: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+16: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+17: 21 var: SgReturnStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+19: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+20: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+21: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x990109c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 20 var: SgIntVal
+9: 7 var: SgAssignInitializer
+10: 17 var: SgAssignInitializer
+11: 11 var: SgIfStmt
+12: 9 var: SgBoolValExp
+13: 10 var: SgExprStatement
+14: 18 var: SgExprStatement
+15: 12 var: a
+16: 16 var: SgAssignOp
+17: 21 var: SgReturnStmt
+18: 8 var: SgVariableDeclaration
+19: 19 var: SgVariableDeclaration
+20: 1 var: SgFunctionDefinition
+21: 4 var: SgFunctionParameterList
+ Current Node: 0x990109c changed: false
+ Current Node: 0x990109c unhandled: true
+
+!! Worklist :  - <SgReturnStmt> return 0; :1
+
+
+------------------------------------------------------------------
+current Node: 0x9966e78  previous Node : 0x990109c
+ ********** UNHANDLED.  This is an unhandled node SgReturnStmt
+ ---- JUSTCOPY. 0x9966e78
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 20 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+9: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+11: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+15: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+16: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+17: 21 var: SgReturnStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+18: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+19: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+20: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+21: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9966e78
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 20 var: SgIntVal
+9: 7 var: SgAssignInitializer
+10: 17 var: SgAssignInitializer
+11: 11 var: SgIfStmt
+12: 9 var: SgBoolValExp
+13: 10 var: SgExprStatement
+14: 18 var: SgExprStatement
+15: 12 var: a
+16: 16 var: SgAssignOp
+17: 21 var: SgReturnStmt
+18: 8 var: SgVariableDeclaration
+19: 19 var: SgVariableDeclaration
+20: 1 var: SgFunctionDefinition
+21: 4 var: SgFunctionParameterList
+ Current Node: 0x9966e78 changed: false
+ Current Node: 0x9966e78 unhandled: true
+
+!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :2
+
+
+------------------------------------------------------------------
+current Node: 0xb7e16008  previous Node : 0x9966e78
+ found global vars: 0 funEntry false
+ ********** UNHANDLED.  This is an unhandled node SgFunctionDefinition
+ ---- JUSTCOPY. 0xb7e16008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 20 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+9: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+11: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+15: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+16: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+17: 21 var: SgReturnStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+18: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+19: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+20: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+21: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0xb7e16008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 20 var: SgIntVal
+9: 7 var: SgAssignInitializer
+10: 17 var: SgAssignInitializer
+11: 11 var: SgIfStmt
+12: 9 var: SgBoolValExp
+13: 10 var: SgExprStatement
+14: 18 var: SgExprStatement
+15: 12 var: a
+16: 16 var: SgAssignOp
+17: 21 var: SgReturnStmt
+18: 8 var: SgVariableDeclaration
+19: 19 var: SgVariableDeclaration
+20: 1 var: SgFunctionDefinition
+21: 4 var: SgFunctionParameterList
+ Current Node: 0xb7e16008 changed: false
+ Current Node: 0xb7e16008 unhandled: true
+
+!! Worklist : 
+ Elements in Table: 21
+ Exiting function ::main(int, char *)
+
+Nr of nodes visited 29  of nodes : 21
+
+!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :0 - <SgInitializedName> argc :0 - <SgInitializedName> argv :0 - <SgFunctionParameterList>  :2 - <SgInitializedName> a :0 - <SgIntVal> 2 :0 - <SgAssignInitializer> 2 :1Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int a = 2; :1 - <SgBoolValExp> true :0 - <SgExprStatement> true; :1 - <SgIfStmt> if(true) {a = 4;}els... :1Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVarRefExp> a :0 - <SgInitializedName> c :0 - <SgIntVal> 4 :0 - <SgIntVal> 4 :0Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgAssignOp> a = 4 :2 - <SgAssignInitializer> 4 :1Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgExprStatement> a = 4; :1Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int c = 4; :1 - <SgInitializedName> c :0 - <SgIntVal> 0 :0 - <SgIntVal> 4 :0 - <SgReturnStmt> return 0; :1 - <SgAssignInitializer> 4 :1 - <SgFunctionDefinition> int main(int argc,ch... :2Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int c = 4; :1 - <SgIntVal> 0 :0 - <SgReturnStmt> return 0; :1 - <SgFunctionDefinition> int main(int argc,ch... :2
+Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x98e29d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+FINISH: Traversal over Functions
+
+
+>>>>> Time for dfa-test: 0.17 sec
+>>>>> Total CFG nodes: 21  --  #CFG nodes visited: 29
+FINISH: DefUse Analysis True
+Analysis is : success
+  DEF>> Vector entries for argc ( 0x98465c8 ) : 1
+  DEF>> Vector entries for argv ( 0x9846620 ) : 1
+  DEF>> Vector entries for a ( 0x9846678 ) : 1
+  DEF>> Vector entries for c ( 0x98466d0 ) : 1
+
+DEFMAP
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 20 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+9: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+11: 11 var: SgIfStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+15: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+16: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+17: 21 var: SgReturnStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+18: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+19: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+20: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+21: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+
+USEMAP
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 20 var: SgIntVal
+9: 7 var: SgAssignInitializer
+10: 17 var: SgAssignInitializer
+11: 11 var: SgIfStmt
+12: 9 var: SgBoolValExp
+13: 10 var: SgExprStatement
+14: 18 var: SgExprStatement
+15: 12 var: a
+16: 16 var: SgAssignOp
+17: 21 var: SgReturnStmt
+18: 8 var: SgVariableDeclaration
+19: 19 var: SgVariableDeclaration
+20: 1 var: SgFunctionDefinition
+21: 4 var: SgFunctionParameterList

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test10.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test10.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test10.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,7 +0,0 @@
-int f2(int *x, int y, int z) { return 2;}
-
-int main()
-{
-  int z = 1;
-  int res = f2(&z, 5, z);
-} 

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test10.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test10.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test10.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test10.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,7 @@
+int f2(int *x, int y, int z) { return 2;}
+
+int main()
+{
+  int z = 1;
+  int res = f2(&z, 5, z);
+} 

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test11.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test11.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test11.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,15 +0,0 @@
-int f1() {return 1;}
-int f2(int *x, int y, int z) { return 2;}
-
-int main()
-{
-  int z = f1();
-  int* p = &z;
-  for (int i=0;i<10;i++) {
-    for (int j=i; j<10; j++) {
-       z = f2(&z, 5, z);
-       *p = f2(&z, 5, z);
-    }
-  }
-  int res = *p; 
-} 

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test11.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test11.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test11.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test11.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,15 @@
+int f1() {return 1;}
+int f2(int *x, int y, int z) { return 2;}
+
+int main()
+{
+  int z = f1();
+  int* p = &z;
+  for (int i=0;i<10;i++) {
+    for (int j=i; j<10; j++) {
+       z = f2(&z, 5, z);
+       *p = f2(&z, 5, z);
+    }
+  }
+  int res = *p; 
+} 

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test12.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test12.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test12.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,23 +0,0 @@
-#include <stdio.h>
-
-struct {
-  int struct_x;
-} my_struct;
-
-class A {
- public:
-    A();
-  int class_x;
-
-};
-
-int main()
-{
-  int i=0;
-  A* a = new A();
-  a->class_x = 5;
-  my_struct.struct_x = 2;
-
-  printf("Print with only text\n");
-}
-

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test12.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test12.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test12.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test12.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,23 @@
+#include <stdio.h>
+
+struct {
+  int struct_x;
+} my_struct;
+
+class A {
+ public:
+    A();
+  int class_x;
+
+};
+
+int main()
+{
+  int i=0;
+  A* a = new A();
+  a->class_x = 5;
+  my_struct.struct_x = 2;
+
+  printf("Print with only text\n");
+}
+

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test13.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test13.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test13.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,6 +0,0 @@
-int global;
-int main()
-{
-  global=1;
-  return 0;
-}

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test13.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test13.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test13.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test13.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,6 @@
+int global;
+int main()
+{
+  global=1;
+  return 0;
+}

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test14.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test14.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test14.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,7 +0,0 @@
-
-#define foo 100
-
-int main() {
-  int a,b;
-  a = (foo + b);
-}

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test14.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test14.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test14.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test14.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,7 @@
+
+#define foo 100
+
+int main() {
+  int a,b;
+  a = (foo + b);
+}

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test15.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test15.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test15.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,9 +0,0 @@
-
-int f1(int* x, int*r) {};
-
-int main() {
-  int index,i=0;
-  while (i) {
-    f1(&index,&i);
-  }
-}

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test15.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test15.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test15.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test15.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,9 @@
+
+int f1(int* x, int*r) {};
+
+int main() {
+  int index,i=0;
+  while (i) {
+    f1(&index,&i);
+  }
+}

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test16.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test16.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test16.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,13 +0,0 @@
-
-#include <stdio.h>
-#include "mpi.h"
-
-#define HAND 5
-
-int main() {
-  int index,i=0;
-  while (i) {
-    MPI_Send(&index, 1, MPI_INT, 0, 0, MPI_COMM_WORLD);
-    //printf("Hellow world", &index, &HAND);
-  }
-}

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test16.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test16.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test16.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test16.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,13 @@
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define HAND 5
+
+int main() {
+  int index,i=0;
+  while (i) {
+    MPI_Send(&index, 1, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    //printf("Hellow world", &index, &HAND);
+  }
+}

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test17.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test17.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test17.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,63 +0,0 @@
-typedef unsigned int size_t;
-#include "mpi.h"
-#define	ARRAYSIZE	60000	
-#define MASTER		0	/* taskid of first process */
-
-MPI_Status status;
-main(int argc, char **argv) 
-{
-	int	numtasks, 		/* total number of MPI process in partitiion */
-			numworkers,		/* number of worker tasks */
-			taskid,			/* task identifier */
-			dest,			/* destination task id to send message */
-			index, 			/* index into the array */
-			i, 			/* loop variable */
-			source,			/* origin task id of message */
-			chunksize; 		/* for partitioning the array */
-	float	data[ARRAYSIZE], 	/* the intial array */
-				result[ARRAYSIZE];	/* for holding results of array operations */
-
-	MPI_Init(&argc, &argv);
-	MPI_Comm_rank(MPI_COMM_WORLD, &taskid);
-	MPI_Comm_size(MPI_COMM_WORLD, &numtasks);
-	numworkers = numtasks-1;
-	chunksize = (ARRAYSIZE / numworkers);
-
-	if (taskid == MASTER) {
-
-		for(i=0; i<ARRAYSIZE; i++) 
-			data[i] =  0.0;
-		index = 0;
-
-		for (dest=1; dest<= numworkers; dest++) {
-			MPI_Send(&index, 1, MPI_INT, dest, 0, MPI_COMM_WORLD);
-			MPI_Send(&data[index], chunksize, MPI_FLOAT, dest, 0, MPI_COMM_WORLD);
-			index = index + chunksize;
-		}
-
-		for (i=1; i<= numworkers; i++) {
-			source = i;
-			MPI_Recv(&index, 1, MPI_INT, source, 1, MPI_COMM_WORLD, &status);
-			MPI_Recv(&result[index], chunksize, MPI_FLOAT, source, 1, MPI_COMM_WORLD, 
-					&status);
-
-		}
-
-	}
-
-
-	if (taskid > MASTER) {
-		source = MASTER;
-		MPI_Recv(&index, 1, MPI_INT, source, 0, MPI_COMM_WORLD, &status);
-		MPI_Recv(&result[index], chunksize, MPI_FLOAT, source, 0, 
-				MPI_COMM_WORLD, &status);
-		for(i=index; i < index + chunksize; i++)
-			result[i] = i + 1;
-
-
-		MPI_Send(&index, 1, MPI_INT, MASTER, 1, MPI_COMM_WORLD);
-		MPI_Send(&result[index], chunksize, MPI_FLOAT, MASTER, 1, MPI_COMM_WORLD);
-
-	}
-	MPI_Finalize();
-}

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test17.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test17.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test17.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test17.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,63 @@
+typedef unsigned int size_t;
+#include "mpi.h"
+#define	ARRAYSIZE	60000	
+#define MASTER		0	/* taskid of first process */
+
+MPI_Status status;
+main(int argc, char **argv) 
+{
+	int	numtasks, 		/* total number of MPI process in partitiion */
+			numworkers,		/* number of worker tasks */
+			taskid,			/* task identifier */
+			dest,			/* destination task id to send message */
+			index, 			/* index into the array */
+			i, 			/* loop variable */
+			source,			/* origin task id of message */
+			chunksize; 		/* for partitioning the array */
+	float	data[ARRAYSIZE], 	/* the intial array */
+				result[ARRAYSIZE];	/* for holding results of array operations */
+
+	MPI_Init(&argc, &argv);
+	MPI_Comm_rank(MPI_COMM_WORLD, &taskid);
+	MPI_Comm_size(MPI_COMM_WORLD, &numtasks);
+	numworkers = numtasks-1;
+	chunksize = (ARRAYSIZE / numworkers);
+
+	if (taskid == MASTER) {
+
+		for(i=0; i<ARRAYSIZE; i++) 
+			data[i] =  0.0;
+		index = 0;
+
+		for (dest=1; dest<= numworkers; dest++) {
+			MPI_Send(&index, 1, MPI_INT, dest, 0, MPI_COMM_WORLD);
+			MPI_Send(&data[index], chunksize, MPI_FLOAT, dest, 0, MPI_COMM_WORLD);
+			index = index + chunksize;
+		}
+
+		for (i=1; i<= numworkers; i++) {
+			source = i;
+			MPI_Recv(&index, 1, MPI_INT, source, 1, MPI_COMM_WORLD, &status);
+			MPI_Recv(&result[index], chunksize, MPI_FLOAT, source, 1, MPI_COMM_WORLD, 
+					&status);
+
+		}
+
+	}
+
+
+	if (taskid > MASTER) {
+		source = MASTER;
+		MPI_Recv(&index, 1, MPI_INT, source, 0, MPI_COMM_WORLD, &status);
+		MPI_Recv(&result[index], chunksize, MPI_FLOAT, source, 0, 
+				MPI_COMM_WORLD, &status);
+		for(i=index; i < index + chunksize; i++)
+			result[i] = i + 1;
+
+
+		MPI_Send(&index, 1, MPI_INT, MASTER, 1, MPI_COMM_WORLD);
+		MPI_Send(&result[index], chunksize, MPI_FLOAT, MASTER, 1, MPI_COMM_WORLD);
+
+	}
+	MPI_Finalize();
+}

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test18.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test18.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test18.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,16 +0,0 @@
-
-int main()
-{
-  int i=0;
-  int* p;
- for (i=0;i<10;i++)
- {
-   int x = i;
-   *p = x;
-   *p = i;
-   int z = *p;
-   //++p;
-   int e;
-   p = &i;
- }
-} 

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test18.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test18.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test18.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test18.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,16 @@
+
+int main()
+{
+  int i=0;
+  int* p;
+ for (i=0;i<10;i++)
+ {
+   int x = i;
+   *p = x;
+   *p = i;
+   int z = *p;
+   //++p;
+   int e;
+   p = &i;
+ }
+} 

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test19.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test19.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test19.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,16 +0,0 @@
-int global;
-int global2=3;
-void setMe()
-{
-  global=1;
-  global2=3;
-}
-
-main()
-{
-  int a;
-  setMe();
-  a=global;
-  global2=0;
-  
-}

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test19.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test19.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test19.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test19.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,16 @@
+int global;
+int global2=3;
+void setMe()
+{
+  global=1;
+  global2=3;
+}
+
+main()
+{
+  int a;
+  setMe();
+  a=global;
+  global2=0;
+  
+}

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,6 +0,0 @@
-int main(int argc, char **argv) {
-  int a=2;
-  while (true) { a=4; }
-  int c=4;
-}
-

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,6 @@
+int main(int argc, char **argv) {
+  int a=2;
+  while (true) { a=4; }
+  int c=4;
+}
+

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.output
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.output	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.output	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,4823 +0,0 @@
->>>> Starting ROSE frontend ... 
- >> Class name: SgFile
-
- >>> Using Information relative to other declaration: 
-
- >> File-Name: /home/panas2/development/dataflow/tests/test2.c
-Inside of propagateHiddenListData (node = 0xb7f37008 = SgFile) 
-Frontend Warnings only: errorCode = 2 
->>>> generate PDF 
->>>> start def-use analysis ... 
-START: DefUse Analysis True
-START: Finding global variables
- Amount of global variables : 0
- -----------------------------------------------------------------*
-
-
-FINISH: Finding global variables
-
- **************** MAP ************************** 
-START: Traversal over Functions
-Warning: can't locate an associated SgStatement from astNode = 0x9833458 = SgTypeInt parentNode = 0x9833458 = SgTypeInt 
-Warning: can't locate an associated SgStatement from astNode = 0x983f640 = SgPointerType parentNode = 0x983f640 = SgPointerType 
- Found function ::main(int, char **)
-Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-
-
-------------------------------------------------------------------
-current Node: 0xb7e58008  previous Node : 0
-
-
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FUNCTION %%%%%%
-
- found global vars: 0 funEntry true
- Current Node: 0xb7e58008 changed: true
- Current Node: 0xb7e58008 unhandled: false
-
-!! Worklist :  - <SgInitializedName> argc :0
-
-
-------------------------------------------------------------------
-current Node: 0x98045c8  previous Node : 0xb7e58008
- **********  INITNAME. 0x98045c8
- **********  INITNAME. use  def true
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x98045c8 : SgInitializedName : argc
- ---- JUSTCOPY. 0x98045c8
-
- **************** MAP ************************** 
-1: -1 var: argc
-  ----- IS USE. CHANGED TABLE ? false
- ---- JUSTCOPY. 0x98045c8
-
- **************** MAP ************************** 
-1: -1 var: argc
- ---- JUSTCOPY. 0x98045c8
-
- **************** MAP ************************** 
-1: -1 var: argc
-  ----- Definition. Is value contained ?  false
-  ----- NEW Definition. Adding: argc nrInEdges: 1
-  ----- changed table (one incoming) entry to 0x98045c8
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
- Current Node: 0x98045c8 changed: true
- Current Node: 0x98045c8 unhandled: false
-
-!! Worklist :  - <SgInitializedName> argv :0
-
-
-------------------------------------------------------------------
-current Node: 0x9804620  previous Node : 0x98045c8
- **********  INITNAME. 0x9804620
- **********  INITNAME. use  def true
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x9804620 : SgInitializedName : argv
- ---- JUSTCOPY. 0x9804620
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x9804620
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
- ---- JUSTCOPY. 0x9804620
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-  ----- Definition. Is value contained ?  false
-  ----- NEW Definition. Adding: argv nrInEdges: 1
-  ----- changed table (one incoming) entry to 0x9804620
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x9804620 changed: true
- Current Node: 0x9804620 unhandled: false
-
-!! Worklist :  - <SgFunctionParameterList>  :2
-
-
-------------------------------------------------------------------
-current Node: 0xb7ea45ac  previous Node : 0x9804620
- ********** UNHANDLED.  This is an unhandled node SgFunctionParameterList
- ---- JUSTCOPY. 0xb7ea45ac
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0xb7ea45ac
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 4 var: SgFunctionParameterList
- Current Node: 0xb7ea45ac changed: false
- Current Node: 0xb7ea45ac unhandled: true
-
-!! Worklist :  - <SgInitializedName> a :0
-
-
-------------------------------------------------------------------
-current Node: 0x9804678  previous Node : 0xb7ea45ac
- **********  INITNAME. 0x9804678
- **********  INITNAME. use  def true
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x9804678 : SgInitializedName : a
- ---- JUSTCOPY. 0x9804678
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-4: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x9804678
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x9804678
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  false
-  ----- NEW Definition. Adding: a nrInEdges: 1
-  ----- changed table (one incoming) entry to 0x9804678
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x9804678 changed: true
- Current Node: 0x9804678 unhandled: false
-
-!! Worklist :  - <SgIntVal> 2 :0
-
-
-------------------------------------------------------------------
-current Node: 0x98bf000  previous Node : 0x9804678
- ********** UNHANDLED.  This is an unhandled node SgIntVal
- ---- JUSTCOPY. 0x98bf000
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-5: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x98bf000
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 6 var: SgIntVal
-5: 4 var: SgFunctionParameterList
- Current Node: 0x98bf000 changed: false
- Current Node: 0x98bf000 unhandled: true
-
-!! Worklist :  - <SgAssignInitializer> 2 :1
-
-
-------------------------------------------------------------------
-current Node: 0x98cbb28  previous Node : 0x98bf000
- **********  ASSIGNINITIALIZER 
- **********  ASSIGNINITIALIZER: 0x98cbb28
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x98cbb28 : SgAssignInitializer : a
- ---- JUSTCOPY. 0x98cbb28
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x98cbb28
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x98cbb28
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  true
-  ----- Definition EXISTS : a nrInEdges: 1
-  ----- changed table (one incoming)  true  dont_replace: false
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-6: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x98cbb28 changed: true
- Current Node: 0x98cbb28 unhandled: false
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int a = 2; :1
-
-
-------------------------------------------------------------------
-current Node: 0xb7e16008  previous Node : 0x98cbb28
- ********** UNHANDLED.  This is an unhandled node SgVariableDeclaration
- ---- JUSTCOPY. 0xb7e16008
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-6: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0xb7e16008
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 8 var: SgVariableDeclaration
-7: 4 var: SgFunctionParameterList
- Current Node: 0xb7e16008 changed: false
- Current Node: 0xb7e16008 unhandled: true
-
-!! Worklist :  - <SgBoolValExp> true :0
-
-
-------------------------------------------------------------------
-current Node: 0x98f6cb8  previous Node : 0xb7e16008
- ********** UNHANDLED.  This is an unhandled node SgBoolValExp
- ---- JUSTCOPY. 0x98f6cb8
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-6: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-8: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x98f6cb8
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 9 var: SgBoolValExp
-7: 8 var: SgVariableDeclaration
-8: 4 var: SgFunctionParameterList
- Current Node: 0x98f6cb8 changed: false
- Current Node: 0x98f6cb8 unhandled: true
-
-!! Worklist :  - <SgExprStatement> true; :1
-
-
-------------------------------------------------------------------
-current Node: 0x9902840  previous Node : 0x98f6cb8
- ********** UNHANDLED.  This is an unhandled node SgExprStatement
- ---- JUSTCOPY. 0x9902840
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-6: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-8: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9902840
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 9 var: SgBoolValExp
-7: 10 var: SgExprStatement
-8: 8 var: SgVariableDeclaration
-9: 4 var: SgFunctionParameterList
- Current Node: 0x9902840 changed: false
- Current Node: 0x9902840 unhandled: true
-
-!! Worklist :  - <SgWhileStmt> while(true){a = 4;} :1
-
-
-------------------------------------------------------------------
-current Node: 0x98d86d8  previous Node : 0x9902840
- ********** UNHANDLED.  This is an unhandled node SgWhileStmt
- ---- JUSTCOPY. 0x98d86d8
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-6: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-8: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x98d86d8
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 11 var: SgWhileStmt
-7: 9 var: SgBoolValExp
-8: 10 var: SgExprStatement
-9: 8 var: SgVariableDeclaration
-10: 4 var: SgFunctionParameterList
- Current Node: 0x98d86d8 changed: false
- Current Node: 0x98d86d8 unhandled: true
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVarRefExp> a :0 - <SgInitializedName> c :0
-
-
-------------------------------------------------------------------
-current Node: 0x990c5a0  previous Node : 0x98d86d8
- **********  VARREFEXP. 0x990c5a0 .. a
- nr for that node ( a) : 5
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x990c5a0 : SgVarRefExp : a
- ---- JUSTCOPY. 0x990c5a0
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-6: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-8: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x990c5a0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 11 var: SgWhileStmt
-7: 9 var: SgBoolValExp
-8: 10 var: SgExprStatement
-9: 12 var: a
-10: 8 var: SgVariableDeclaration
-11: 4 var: SgFunctionParameterList
- Current Node: 0x990c5a0 changed: true
- Current Node: 0x990c5a0 unhandled: false
-
-!! Worklist :  - <SgInitializedName> c :0 - <SgIntVal> 4 :0
-
-
-------------------------------------------------------------------
-current Node: 0x98046d0  previous Node : 0x98d86d8
- **********  INITNAME. 0x98046d0
- **********  INITNAME. use  def true
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x98046d0 : SgInitializedName : c
- ---- JUSTCOPY. 0x98046d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-8: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x98046d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 7 var: SgAssignInitializer
-7: 11 var: SgWhileStmt
-8: 9 var: SgBoolValExp
-9: 10 var: SgExprStatement
-10: 12 var: a
-11: 8 var: SgVariableDeclaration
-12: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x98046d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 7 var: SgAssignInitializer
-7: 11 var: SgWhileStmt
-8: 9 var: SgBoolValExp
-9: 10 var: SgExprStatement
-10: 12 var: a
-11: 8 var: SgVariableDeclaration
-12: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  false
-  ----- NEW Definition. Adding: c nrInEdges: 1
-  ----- changed table (one incoming) entry to 0x98046d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-8: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x98046d0 changed: true
- Current Node: 0x98046d0 unhandled: false
-
-!! Worklist :  - <SgIntVal> 4 :0 - <SgIntVal> 4 :0
-
-
-------------------------------------------------------------------
-current Node: 0x98bf034  previous Node : 0x990c5a0
- ********** UNHANDLED.  This is an unhandled node SgIntVal
- ---- JUSTCOPY. 0x98bf034
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-8: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x98bf034
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 7 var: SgAssignInitializer
-8: 11 var: SgWhileStmt
-9: 9 var: SgBoolValExp
-10: 10 var: SgExprStatement
-11: 12 var: a
-12: 8 var: SgVariableDeclaration
-13: 4 var: SgFunctionParameterList
- Current Node: 0x98bf034 changed: false
- Current Node: 0x98bf034 unhandled: true
-
-!! Worklist :  - <SgIntVal> 4 :0Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgAssignOp> a = 4 :2
-
-
-------------------------------------------------------------------
-current Node: 0x98bf068  previous Node : 0x98046d0
- ********** UNHANDLED.  This is an unhandled node SgIntVal
- ---- JUSTCOPY. 0x98bf068
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x98bf068
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 11 var: SgWhileStmt
-10: 9 var: SgBoolValExp
-11: 10 var: SgExprStatement
-12: 12 var: a
-13: 8 var: SgVariableDeclaration
-14: 4 var: SgFunctionParameterList
- Current Node: 0x98bf068 changed: false
- Current Node: 0x98bf068 unhandled: true
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgAssignOp> a = 4 :2 - <SgAssignInitializer> 4 :1
-
-
-------------------------------------------------------------------
-current Node: 0x9917200  previous Node : 0x98bf034
- **********  BINARY OP. 0x9917200
- **********  BINARY OP IS_VAR_REF_EXP. 
- BINARY OP: a  name: 0x9804678  varRefExp: 0x990c5a0
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x9917200 : SgAssignOp : a
- ---- JUSTCOPY. 0x9917200
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-15: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x9917200
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 11 var: SgWhileStmt
-10: 9 var: SgBoolValExp
-11: 10 var: SgExprStatement
-12: 12 var: a
-13: 16 var: SgAssignOp
-14: 8 var: SgVariableDeclaration
-15: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x9917200
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 11 var: SgWhileStmt
-10: 9 var: SgBoolValExp
-11: 10 var: SgExprStatement
-12: 12 var: a
-13: 16 var: SgAssignOp
-14: 8 var: SgVariableDeclaration
-15: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  true
-  ----- Definition EXISTS : a nrInEdges: 1
-  ----- changed table (one incoming)  true  dont_replace: false
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-10: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-15: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x9917200 changed: true
- Current Node: 0x9917200 unhandled: false
-
-!! Worklist :  - <SgAssignInitializer> 4 :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgExprStatement> a = 4; :1
-
-
-------------------------------------------------------------------
-current Node: 0x98cbb5c  previous Node : 0x98bf068
- **********  ASSIGNINITIALIZER 
- **********  ASSIGNINITIALIZER: 0x98cbb5c
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x98cbb5c : SgAssignInitializer : c
- ---- JUSTCOPY. 0x98cbb5c
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-15: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-16: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x98cbb5c
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 12 var: a
-14: 16 var: SgAssignOp
-15: 8 var: SgVariableDeclaration
-16: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x98cbb5c
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 12 var: a
-14: 16 var: SgAssignOp
-15: 8 var: SgVariableDeclaration
-16: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  true
-  ----- Definition EXISTS : c nrInEdges: 1
-  ----- changed table (one incoming)  true  dont_replace: false
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-14: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-15: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-16: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x98cbb5c changed: true
- Current Node: 0x98cbb5c unhandled: false
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgExprStatement> a = 4; :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int c = 4; :1
-
-
-------------------------------------------------------------------
-current Node: 0x9902868  previous Node : 0x9917200
- ********** UNHANDLED.  This is an unhandled node SgExprStatement
- ---- JUSTCOPY. 0x9902868
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9902868
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 4 var: SgFunctionParameterList
- Current Node: 0x9902868 changed: false
- Current Node: 0x9902868 unhandled: true
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int c = 4; :1 - <SgBoolValExp> true :0
-
-
-------------------------------------------------------------------
-current Node: 0xb7e16114  previous Node : 0x98cbb5c
- ********** UNHANDLED.  This is an unhandled node SgVariableDeclaration
- ---- JUSTCOPY. 0xb7e16114
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0xb7e16114
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 4 var: SgFunctionParameterList
- Current Node: 0xb7e16114 changed: false
- Current Node: 0xb7e16114 unhandled: true
-
-!! Worklist :  - <SgBoolValExp> true :0 - <SgFunctionDefinition> int main(int argc,ch... :2
-
-
-------------------------------------------------------------------
-current Node: 0x98f6cb8  previous Node : 0xb7e16008
- ********** UNHANDLED.  This is an unhandled node SgBoolValExp
- ---- JUSTCOPY. 0x98f6cb8
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x98f6cb8
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 4 var: SgFunctionParameterList
- Current Node: 0x98f6cb8 changed: false
- Current Node: 0x98f6cb8 unhandled: true
-
-!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :2 - <SgExprStatement> true; :1
-
-
-------------------------------------------------------------------
-current Node: 0xb7e58008  previous Node : 0xb7e16114
- found global vars: 0 funEntry false
- ********** UNHANDLED.  This is an unhandled node SgFunctionDefinition
- ---- JUSTCOPY. 0xb7e58008
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0xb7e58008
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- Current Node: 0xb7e58008 changed: false
- Current Node: 0xb7e58008 unhandled: true
-
-!! Worklist :  - <SgExprStatement> true; :1
-
-
-------------------------------------------------------------------
-current Node: 0x9902840  previous Node : 0x98f6cb8
- ********** UNHANDLED.  This is an unhandled node SgExprStatement
- ---- JUSTCOPY. 0x9902840
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9902840
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- Current Node: 0x9902840 changed: false
- Current Node: 0x9902840 unhandled: true
-
-!! Worklist :  - <SgWhileStmt> while(true){a = 4;} :1
-
-
-------------------------------------------------------------------
-current Node: 0x98d86d8  previous Node : 0x9902840
- ********** UNHANDLED.  This is an unhandled node SgWhileStmt
- ---- JUSTCOPY. 0x98d86d8
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x98d86d8
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- Current Node: 0x98d86d8 changed: false
- Current Node: 0x98d86d8 unhandled: true
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVarRefExp> a :0 - <SgInitializedName> c :0
-
-
-------------------------------------------------------------------
-current Node: 0x990c5a0  previous Node : 0x98d86d8
- **********  VARREFEXP. 0x990c5a0 .. a
- nr for that node ( a) : 5
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x990c5a0 : SgVarRefExp : a
- ---- JUSTCOPY. 0x990c5a0
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x990c5a0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- Current Node: 0x990c5a0 changed: true
- Current Node: 0x990c5a0 unhandled: false
-
-!! Worklist :  - <SgInitializedName> c :0 - <SgIntVal> 4 :0
-
-
-------------------------------------------------------------------
-current Node: 0x98046d0  previous Node : 0x98d86d8
- **********  INITNAME. 0x98046d0
- **********  INITNAME. use  def true
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x98046d0 : SgInitializedName : c
- ---- JUSTCOPY. 0x98046d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x98046d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x98046d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  false
-  ----- NEW Definition. Adding: c nrInEdges: 1
-  ----- changed table (one incoming) entry to 0x98046d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x98046d0 changed: true
- Current Node: 0x98046d0 unhandled: false
-
-!! Worklist :  - <SgIntVal> 4 :0 - <SgIntVal> 4 :0
-
-
-------------------------------------------------------------------
-current Node: 0x98bf034  previous Node : 0x990c5a0
- ********** UNHANDLED.  This is an unhandled node SgIntVal
- ---- JUSTCOPY. 0x98bf034
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x98bf034
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- Current Node: 0x98bf034 changed: false
- Current Node: 0x98bf034 unhandled: true
-
-!! Worklist :  - <SgIntVal> 4 :0Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgAssignOp> a = 4 :2
-
-
-------------------------------------------------------------------
-current Node: 0x98bf068  previous Node : 0x98046d0
- ********** UNHANDLED.  This is an unhandled node SgIntVal
- ---- JUSTCOPY. 0x98bf068
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x98bf068
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- Current Node: 0x98bf068 changed: false
- Current Node: 0x98bf068 unhandled: true
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgAssignOp> a = 4 :2 - <SgAssignInitializer> 4 :1
-
-
-------------------------------------------------------------------
-current Node: 0x9917200  previous Node : 0x98bf034
- **********  BINARY OP. 0x9917200
- **********  BINARY OP IS_VAR_REF_EXP. 
- BINARY OP: a  name: 0x9804678  varRefExp: 0x990c5a0
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x9917200 : SgAssignOp : a
- ---- JUSTCOPY. 0x9917200
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x9917200
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x9917200
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  true
-  ----- Definition EXISTS : a nrInEdges: 1
-  ----- changed table (one incoming)  true  dont_replace: false
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x9917200 changed: true
- Current Node: 0x9917200 unhandled: false
-
-!! Worklist :  - <SgAssignInitializer> 4 :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgExprStatement> a = 4; :1
-
-
-------------------------------------------------------------------
-current Node: 0x98cbb5c  previous Node : 0x98bf068
- **********  ASSIGNINITIALIZER 
- **********  ASSIGNINITIALIZER: 0x98cbb5c
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x98cbb5c : SgAssignInitializer : c
- ---- JUSTCOPY. 0x98cbb5c
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x98cbb5c
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x98cbb5c
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  true
-  ----- Definition EXISTS : c nrInEdges: 1
-  ----- changed table (one incoming)  true  dont_replace: false
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x98cbb5c changed: true
- Current Node: 0x98cbb5c unhandled: false
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgExprStatement> a = 4; :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int c = 4; :1
-
-
-------------------------------------------------------------------
-current Node: 0x9902868  previous Node : 0x9917200
- ********** UNHANDLED.  This is an unhandled node SgExprStatement
- ---- JUSTCOPY. 0x9902868
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9902868
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- Current Node: 0x9902868 changed: false
- Current Node: 0x9902868 unhandled: true
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int c = 4; :1 - <SgBoolValExp> true :0
-
-
-------------------------------------------------------------------
-current Node: 0xb7e16114  previous Node : 0x98cbb5c
- ********** UNHANDLED.  This is an unhandled node SgVariableDeclaration
- ---- JUSTCOPY. 0xb7e16114
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0xb7e16114
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- Current Node: 0xb7e16114 changed: false
- Current Node: 0xb7e16114 unhandled: true
-
-!! Worklist :  - <SgBoolValExp> true :0 - <SgFunctionDefinition> int main(int argc,ch... :2
-
-
-------------------------------------------------------------------
-current Node: 0x98f6cb8  previous Node : 0xb7e16008
- ********** UNHANDLED.  This is an unhandled node SgBoolValExp
- ---- JUSTCOPY. 0x98f6cb8
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x98f6cb8
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- Current Node: 0x98f6cb8 changed: false
- Current Node: 0x98f6cb8 unhandled: true
-
-!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :2 - <SgExprStatement> true; :1
-
-
-------------------------------------------------------------------
-current Node: 0xb7e58008  previous Node : 0xb7e16114
- found global vars: 0 funEntry false
- ********** UNHANDLED.  This is an unhandled node SgFunctionDefinition
- ---- JUSTCOPY. 0xb7e58008
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0xb7e58008
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- Current Node: 0xb7e58008 changed: false
- Current Node: 0xb7e58008 unhandled: true
-
-!! Worklist :  - <SgExprStatement> true; :1
-
-
-------------------------------------------------------------------
-current Node: 0x9902840  previous Node : 0x98f6cb8
- ********** UNHANDLED.  This is an unhandled node SgExprStatement
- ---- JUSTCOPY. 0x9902840
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9902840
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- Current Node: 0x9902840 changed: false
- Current Node: 0x9902840 unhandled: true
-
-!! Worklist :  - <SgWhileStmt> while(true){a = 4;} :1
-
-
-------------------------------------------------------------------
-current Node: 0x98d86d8  previous Node : 0x9902840
- ********** UNHANDLED.  This is an unhandled node SgWhileStmt
- ---- JUSTCOPY. 0x98d86d8
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x98d86d8
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- Current Node: 0x98d86d8 changed: false
- Current Node: 0x98d86d8 unhandled: true
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVarRefExp> a :0 - <SgInitializedName> c :0
-
-
-------------------------------------------------------------------
-current Node: 0x990c5a0  previous Node : 0x98d86d8
- **********  VARREFEXP. 0x990c5a0 .. a
- nr for that node ( a) : 5
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x990c5a0 : SgVarRefExp : a
- ---- JUSTCOPY. 0x990c5a0
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? false
- ---- JUSTCOPY. 0x990c5a0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- Current Node: 0x990c5a0 changed: false
- Current Node: 0x990c5a0 unhandled: false
-
-
-------------------------------------------------------------------
-current Node: 0x98046d0  previous Node : 0x98d86d8
- **********  INITNAME. 0x98046d0
- **********  INITNAME. use  def true
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x98046d0 : SgInitializedName : c
- ---- JUSTCOPY. 0x98046d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x98046d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x98046d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  false
-  ----- NEW Definition. Adding: c nrInEdges: 1
-  ----- changed table (one incoming) entry to 0x98046d0
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x98046d0 changed: true
- Current Node: 0x98046d0 unhandled: false
-
-!! Worklist :  - <SgIntVal> 4 :0
-
-
-------------------------------------------------------------------
-current Node: 0x98bf068  previous Node : 0x98046d0
- ********** UNHANDLED.  This is an unhandled node SgIntVal
- ---- JUSTCOPY. 0x98bf068
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x98bf068
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- Current Node: 0x98bf068 changed: false
- Current Node: 0x98bf068 unhandled: true
-
-!! Worklist :  - <SgAssignInitializer> 4 :1
-
-
-------------------------------------------------------------------
-current Node: 0x98cbb5c  previous Node : 0x98bf068
- **********  ASSIGNINITIALIZER 
- **********  ASSIGNINITIALIZER: 0x98cbb5c
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x98cbb5c : SgAssignInitializer : c
- ---- JUSTCOPY. 0x98cbb5c
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x98cbb5c
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x98cbb5c
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  true
-  ----- Definition EXISTS : c nrInEdges: 1
-  ----- changed table (one incoming)  true  dont_replace: false
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x98cbb5c changed: true
- Current Node: 0x98cbb5c unhandled: false
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int c = 4; :1
-
-
-------------------------------------------------------------------
-current Node: 0xb7e16114  previous Node : 0x98cbb5c
- ********** UNHANDLED.  This is an unhandled node SgVariableDeclaration
- ---- JUSTCOPY. 0xb7e16114
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0xb7e16114
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- Current Node: 0xb7e16114 changed: false
- Current Node: 0xb7e16114 unhandled: true
-
-!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :2
-
-
-------------------------------------------------------------------
-current Node: 0xb7e58008  previous Node : 0xb7e16114
- found global vars: 0 funEntry false
- ********** UNHANDLED.  This is an unhandled node SgFunctionDefinition
- ---- JUSTCOPY. 0xb7e58008
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0xb7e58008
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList
- Current Node: 0xb7e58008 changed: false
- Current Node: 0xb7e58008 unhandled: true
-
-!! Worklist : 
- Elements in Table: 19
- Exiting function ::main(int, char **)
-
-Nr of nodes visited 41  of nodes : 19
-
-!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :0 - <SgInitializedName> argc :0 - <SgInitializedName> argv :0 - <SgFunctionParameterList>  :2 - <SgInitializedName> a :0 - <SgIntVal> 2 :0 - <SgAssignInitializer> 2 :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int a = 2; :1 - <SgBoolValExp> true :0 - <SgExprStatement> true; :1 - <SgWhileStmt> while(true){a = 4;} :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVarRefExp> a :0 - <SgInitializedName> c :0 - <SgIntVal> 4 :0 - <SgIntVal> 4 :0Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgAssignOp> a = 4 :2 - <SgAssignInitializer> 4 :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgExprStatement> a = 4; :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int c = 4; :1 - <SgBoolValExp> true :0 - <SgFunctionDefinition> int main(int argc,ch... :2 - <SgExprStatement> true; :1 - <SgWhileStmt> while(true){a = 4;} :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVarRefExp> a :0 - <SgInitializedName> c :0 - <SgIntVal> 4 :0 - <SgIntVal> 4 :0Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgAssignOp> a = 4 :2 - <SgAssignInitializer> 4 :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgExprStatement> a = 4; :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int c = 4; :1 - <SgBoolValExp> true :0 - <SgFunctionDefinition> int main(int argc,ch... :2 - <SgExprStatement> true; :1 - <SgWhileStmt> while(true){a = 4;} :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVarRefExp> a :0 - <SgInitializedName> c :0 - <SgIntVal> 4 :0 - <SgAssignInitializer> 4 :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int c = 4; :1 - <SgFunctionDefinition> int main(int argc,ch... :2
-Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-FINISH: Traversal over Functions
-
-
->>>>> Time for dfa-test: 0.23 sec
->>>>> Total CFG nodes: 19  --  #CFG nodes visited: 41
-FINISH: DefUse Analysis True
-Analysis is : success
-  DEF>> Vector entries for argc ( 0x98045c8 ) : 1
-  DEF>> Vector entries for argv ( 0x9804620 ) : 1
-  DEF>> Vector entries for a ( 0x9804678 ) : 1
-  DEF>> Vector entries for c ( 0x98046d0 ) : 1
-
-DEFMAP
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-4: 13 var: c
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-5: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 5
-6: 14 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-7: 15 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 13
-8: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-9: 17 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-10: 11 var: SgWhileStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-11: 9 var: SgBoolValExp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-12: 10 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-13: 18 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-14: 12 var: a
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-15: 16 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 16
-16: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-17: 19 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-18: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:a ( 5 ) - SgNode 7
-  ..  initName:a ( 5 ) - SgNode 16
-  ..  initName:c ( 13 ) - SgNode 17
-19: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-
-USEMAP
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: a
-4: 13 var: c
-5: 6 var: SgIntVal
-6: 14 var: SgIntVal
-7: 15 var: SgIntVal
-8: 7 var: SgAssignInitializer
-9: 17 var: SgAssignInitializer
-10: 11 var: SgWhileStmt
-11: 9 var: SgBoolValExp
-12: 10 var: SgExprStatement
-13: 18 var: SgExprStatement
-14: 12 var: a
-15: 16 var: SgAssignOp
-16: 8 var: SgVariableDeclaration
-17: 19 var: SgVariableDeclaration
-18: 1 var: SgFunctionDefinition
-19: 4 var: SgFunctionParameterList

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.output (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.output)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.output	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test2.output	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,4823 @@
+>>>> Starting ROSE frontend ... 
+ >> Class name: SgFile
+
+ >>> Using Information relative to other declaration: 
+
+ >> File-Name: /home/panas2/development/dataflow/tests/test2.c
+Inside of propagateHiddenListData (node = 0xb7f37008 = SgFile) 
+Frontend Warnings only: errorCode = 2 
+>>>> generate PDF 
+>>>> start def-use analysis ... 
+START: DefUse Analysis True
+START: Finding global variables
+ Amount of global variables : 0
+ -----------------------------------------------------------------*
+
+
+FINISH: Finding global variables
+
+ **************** MAP ************************** 
+START: Traversal over Functions
+Warning: can't locate an associated SgStatement from astNode = 0x9833458 = SgTypeInt parentNode = 0x9833458 = SgTypeInt 
+Warning: can't locate an associated SgStatement from astNode = 0x983f640 = SgPointerType parentNode = 0x983f640 = SgPointerType 
+ Found function ::main(int, char **)
+Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+
+
+------------------------------------------------------------------
+current Node: 0xb7e58008  previous Node : 0
+
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FUNCTION %%%%%%
+
+ found global vars: 0 funEntry true
+ Current Node: 0xb7e58008 changed: true
+ Current Node: 0xb7e58008 unhandled: false
+
+!! Worklist :  - <SgInitializedName> argc :0
+
+
+------------------------------------------------------------------
+current Node: 0x98045c8  previous Node : 0xb7e58008
+ **********  INITNAME. 0x98045c8
+ **********  INITNAME. use  def true
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x98045c8 : SgInitializedName : argc
+ ---- JUSTCOPY. 0x98045c8
+
+ **************** MAP ************************** 
+1: -1 var: argc
+  ----- IS USE. CHANGED TABLE ? false
+ ---- JUSTCOPY. 0x98045c8
+
+ **************** MAP ************************** 
+1: -1 var: argc
+ ---- JUSTCOPY. 0x98045c8
+
+ **************** MAP ************************** 
+1: -1 var: argc
+  ----- Definition. Is value contained ?  false
+  ----- NEW Definition. Adding: argc nrInEdges: 1
+  ----- changed table (one incoming) entry to 0x98045c8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+ Current Node: 0x98045c8 changed: true
+ Current Node: 0x98045c8 unhandled: false
+
+!! Worklist :  - <SgInitializedName> argv :0
+
+
+------------------------------------------------------------------
+current Node: 0x9804620  previous Node : 0x98045c8
+ **********  INITNAME. 0x9804620
+ **********  INITNAME. use  def true
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x9804620 : SgInitializedName : argv
+ ---- JUSTCOPY. 0x9804620
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x9804620
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+ ---- JUSTCOPY. 0x9804620
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+  ----- Definition. Is value contained ?  false
+  ----- NEW Definition. Adding: argv nrInEdges: 1
+  ----- changed table (one incoming) entry to 0x9804620
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x9804620 changed: true
+ Current Node: 0x9804620 unhandled: false
+
+!! Worklist :  - <SgFunctionParameterList>  :2
+
+
+------------------------------------------------------------------
+current Node: 0xb7ea45ac  previous Node : 0x9804620
+ ********** UNHANDLED.  This is an unhandled node SgFunctionParameterList
+ ---- JUSTCOPY. 0xb7ea45ac
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0xb7ea45ac
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 4 var: SgFunctionParameterList
+ Current Node: 0xb7ea45ac changed: false
+ Current Node: 0xb7ea45ac unhandled: true
+
+!! Worklist :  - <SgInitializedName> a :0
+
+
+------------------------------------------------------------------
+current Node: 0x9804678  previous Node : 0xb7ea45ac
+ **********  INITNAME. 0x9804678
+ **********  INITNAME. use  def true
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x9804678 : SgInitializedName : a
+ ---- JUSTCOPY. 0x9804678
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+4: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x9804678
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x9804678
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  false
+  ----- NEW Definition. Adding: a nrInEdges: 1
+  ----- changed table (one incoming) entry to 0x9804678
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x9804678 changed: true
+ Current Node: 0x9804678 unhandled: false
+
+!! Worklist :  - <SgIntVal> 2 :0
+
+
+------------------------------------------------------------------
+current Node: 0x98bf000  previous Node : 0x9804678
+ ********** UNHANDLED.  This is an unhandled node SgIntVal
+ ---- JUSTCOPY. 0x98bf000
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+5: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x98bf000
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 6 var: SgIntVal
+5: 4 var: SgFunctionParameterList
+ Current Node: 0x98bf000 changed: false
+ Current Node: 0x98bf000 unhandled: true
+
+!! Worklist :  - <SgAssignInitializer> 2 :1
+
+
+------------------------------------------------------------------
+current Node: 0x98cbb28  previous Node : 0x98bf000
+ **********  ASSIGNINITIALIZER 
+ **********  ASSIGNINITIALIZER: 0x98cbb28
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x98cbb28 : SgAssignInitializer : a
+ ---- JUSTCOPY. 0x98cbb28
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x98cbb28
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x98cbb28
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  true
+  ----- Definition EXISTS : a nrInEdges: 1
+  ----- changed table (one incoming)  true  dont_replace: false
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+6: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x98cbb28 changed: true
+ Current Node: 0x98cbb28 unhandled: false
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int a = 2; :1
+
+
+------------------------------------------------------------------
+current Node: 0xb7e16008  previous Node : 0x98cbb28
+ ********** UNHANDLED.  This is an unhandled node SgVariableDeclaration
+ ---- JUSTCOPY. 0xb7e16008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+6: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0xb7e16008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 8 var: SgVariableDeclaration
+7: 4 var: SgFunctionParameterList
+ Current Node: 0xb7e16008 changed: false
+ Current Node: 0xb7e16008 unhandled: true
+
+!! Worklist :  - <SgBoolValExp> true :0
+
+
+------------------------------------------------------------------
+current Node: 0x98f6cb8  previous Node : 0xb7e16008
+ ********** UNHANDLED.  This is an unhandled node SgBoolValExp
+ ---- JUSTCOPY. 0x98f6cb8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+6: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+8: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x98f6cb8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 9 var: SgBoolValExp
+7: 8 var: SgVariableDeclaration
+8: 4 var: SgFunctionParameterList
+ Current Node: 0x98f6cb8 changed: false
+ Current Node: 0x98f6cb8 unhandled: true
+
+!! Worklist :  - <SgExprStatement> true; :1
+
+
+------------------------------------------------------------------
+current Node: 0x9902840  previous Node : 0x98f6cb8
+ ********** UNHANDLED.  This is an unhandled node SgExprStatement
+ ---- JUSTCOPY. 0x9902840
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+6: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+8: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9902840
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 9 var: SgBoolValExp
+7: 10 var: SgExprStatement
+8: 8 var: SgVariableDeclaration
+9: 4 var: SgFunctionParameterList
+ Current Node: 0x9902840 changed: false
+ Current Node: 0x9902840 unhandled: true
+
+!! Worklist :  - <SgWhileStmt> while(true){a = 4;} :1
+
+
+------------------------------------------------------------------
+current Node: 0x98d86d8  previous Node : 0x9902840
+ ********** UNHANDLED.  This is an unhandled node SgWhileStmt
+ ---- JUSTCOPY. 0x98d86d8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+6: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+8: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x98d86d8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 11 var: SgWhileStmt
+7: 9 var: SgBoolValExp
+8: 10 var: SgExprStatement
+9: 8 var: SgVariableDeclaration
+10: 4 var: SgFunctionParameterList
+ Current Node: 0x98d86d8 changed: false
+ Current Node: 0x98d86d8 unhandled: true
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVarRefExp> a :0 - <SgInitializedName> c :0
+
+
+------------------------------------------------------------------
+current Node: 0x990c5a0  previous Node : 0x98d86d8
+ **********  VARREFEXP. 0x990c5a0 .. a
+ nr for that node ( a) : 5
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x990c5a0 : SgVarRefExp : a
+ ---- JUSTCOPY. 0x990c5a0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+6: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+8: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x990c5a0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 11 var: SgWhileStmt
+7: 9 var: SgBoolValExp
+8: 10 var: SgExprStatement
+9: 12 var: a
+10: 8 var: SgVariableDeclaration
+11: 4 var: SgFunctionParameterList
+ Current Node: 0x990c5a0 changed: true
+ Current Node: 0x990c5a0 unhandled: false
+
+!! Worklist :  - <SgInitializedName> c :0 - <SgIntVal> 4 :0
+
+
+------------------------------------------------------------------
+current Node: 0x98046d0  previous Node : 0x98d86d8
+ **********  INITNAME. 0x98046d0
+ **********  INITNAME. use  def true
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x98046d0 : SgInitializedName : c
+ ---- JUSTCOPY. 0x98046d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+8: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x98046d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 7 var: SgAssignInitializer
+7: 11 var: SgWhileStmt
+8: 9 var: SgBoolValExp
+9: 10 var: SgExprStatement
+10: 12 var: a
+11: 8 var: SgVariableDeclaration
+12: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x98046d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 7 var: SgAssignInitializer
+7: 11 var: SgWhileStmt
+8: 9 var: SgBoolValExp
+9: 10 var: SgExprStatement
+10: 12 var: a
+11: 8 var: SgVariableDeclaration
+12: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  false
+  ----- NEW Definition. Adding: c nrInEdges: 1
+  ----- changed table (one incoming) entry to 0x98046d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+8: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x98046d0 changed: true
+ Current Node: 0x98046d0 unhandled: false
+
+!! Worklist :  - <SgIntVal> 4 :0 - <SgIntVal> 4 :0
+
+
+------------------------------------------------------------------
+current Node: 0x98bf034  previous Node : 0x990c5a0
+ ********** UNHANDLED.  This is an unhandled node SgIntVal
+ ---- JUSTCOPY. 0x98bf034
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+8: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x98bf034
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 7 var: SgAssignInitializer
+8: 11 var: SgWhileStmt
+9: 9 var: SgBoolValExp
+10: 10 var: SgExprStatement
+11: 12 var: a
+12: 8 var: SgVariableDeclaration
+13: 4 var: SgFunctionParameterList
+ Current Node: 0x98bf034 changed: false
+ Current Node: 0x98bf034 unhandled: true
+
+!! Worklist :  - <SgIntVal> 4 :0Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgAssignOp> a = 4 :2
+
+
+------------------------------------------------------------------
+current Node: 0x98bf068  previous Node : 0x98046d0
+ ********** UNHANDLED.  This is an unhandled node SgIntVal
+ ---- JUSTCOPY. 0x98bf068
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x98bf068
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 11 var: SgWhileStmt
+10: 9 var: SgBoolValExp
+11: 10 var: SgExprStatement
+12: 12 var: a
+13: 8 var: SgVariableDeclaration
+14: 4 var: SgFunctionParameterList
+ Current Node: 0x98bf068 changed: false
+ Current Node: 0x98bf068 unhandled: true
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgAssignOp> a = 4 :2 - <SgAssignInitializer> 4 :1
+
+
+------------------------------------------------------------------
+current Node: 0x9917200  previous Node : 0x98bf034
+ **********  BINARY OP. 0x9917200
+ **********  BINARY OP IS_VAR_REF_EXP. 
+ BINARY OP: a  name: 0x9804678  varRefExp: 0x990c5a0
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x9917200 : SgAssignOp : a
+ ---- JUSTCOPY. 0x9917200
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+15: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x9917200
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 11 var: SgWhileStmt
+10: 9 var: SgBoolValExp
+11: 10 var: SgExprStatement
+12: 12 var: a
+13: 16 var: SgAssignOp
+14: 8 var: SgVariableDeclaration
+15: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x9917200
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 11 var: SgWhileStmt
+10: 9 var: SgBoolValExp
+11: 10 var: SgExprStatement
+12: 12 var: a
+13: 16 var: SgAssignOp
+14: 8 var: SgVariableDeclaration
+15: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  true
+  ----- Definition EXISTS : a nrInEdges: 1
+  ----- changed table (one incoming)  true  dont_replace: false
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+10: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+15: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x9917200 changed: true
+ Current Node: 0x9917200 unhandled: false
+
+!! Worklist :  - <SgAssignInitializer> 4 :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgExprStatement> a = 4; :1
+
+
+------------------------------------------------------------------
+current Node: 0x98cbb5c  previous Node : 0x98bf068
+ **********  ASSIGNINITIALIZER 
+ **********  ASSIGNINITIALIZER: 0x98cbb5c
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x98cbb5c : SgAssignInitializer : c
+ ---- JUSTCOPY. 0x98cbb5c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+15: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+16: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x98cbb5c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 12 var: a
+14: 16 var: SgAssignOp
+15: 8 var: SgVariableDeclaration
+16: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x98cbb5c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 12 var: a
+14: 16 var: SgAssignOp
+15: 8 var: SgVariableDeclaration
+16: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  true
+  ----- Definition EXISTS : c nrInEdges: 1
+  ----- changed table (one incoming)  true  dont_replace: false
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+14: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+15: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+16: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x98cbb5c changed: true
+ Current Node: 0x98cbb5c unhandled: false
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgExprStatement> a = 4; :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int c = 4; :1
+
+
+------------------------------------------------------------------
+current Node: 0x9902868  previous Node : 0x9917200
+ ********** UNHANDLED.  This is an unhandled node SgExprStatement
+ ---- JUSTCOPY. 0x9902868
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9902868
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 4 var: SgFunctionParameterList
+ Current Node: 0x9902868 changed: false
+ Current Node: 0x9902868 unhandled: true
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int c = 4; :1 - <SgBoolValExp> true :0
+
+
+------------------------------------------------------------------
+current Node: 0xb7e16114  previous Node : 0x98cbb5c
+ ********** UNHANDLED.  This is an unhandled node SgVariableDeclaration
+ ---- JUSTCOPY. 0xb7e16114
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0xb7e16114
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 4 var: SgFunctionParameterList
+ Current Node: 0xb7e16114 changed: false
+ Current Node: 0xb7e16114 unhandled: true
+
+!! Worklist :  - <SgBoolValExp> true :0 - <SgFunctionDefinition> int main(int argc,ch... :2
+
+
+------------------------------------------------------------------
+current Node: 0x98f6cb8  previous Node : 0xb7e16008
+ ********** UNHANDLED.  This is an unhandled node SgBoolValExp
+ ---- JUSTCOPY. 0x98f6cb8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x98f6cb8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 4 var: SgFunctionParameterList
+ Current Node: 0x98f6cb8 changed: false
+ Current Node: 0x98f6cb8 unhandled: true
+
+!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :2 - <SgExprStatement> true; :1
+
+
+------------------------------------------------------------------
+current Node: 0xb7e58008  previous Node : 0xb7e16114
+ found global vars: 0 funEntry false
+ ********** UNHANDLED.  This is an unhandled node SgFunctionDefinition
+ ---- JUSTCOPY. 0xb7e58008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0xb7e58008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ Current Node: 0xb7e58008 changed: false
+ Current Node: 0xb7e58008 unhandled: true
+
+!! Worklist :  - <SgExprStatement> true; :1
+
+
+------------------------------------------------------------------
+current Node: 0x9902840  previous Node : 0x98f6cb8
+ ********** UNHANDLED.  This is an unhandled node SgExprStatement
+ ---- JUSTCOPY. 0x9902840
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9902840
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ Current Node: 0x9902840 changed: false
+ Current Node: 0x9902840 unhandled: true
+
+!! Worklist :  - <SgWhileStmt> while(true){a = 4;} :1
+
+
+------------------------------------------------------------------
+current Node: 0x98d86d8  previous Node : 0x9902840
+ ********** UNHANDLED.  This is an unhandled node SgWhileStmt
+ ---- JUSTCOPY. 0x98d86d8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x98d86d8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ Current Node: 0x98d86d8 changed: false
+ Current Node: 0x98d86d8 unhandled: true
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVarRefExp> a :0 - <SgInitializedName> c :0
+
+
+------------------------------------------------------------------
+current Node: 0x990c5a0  previous Node : 0x98d86d8
+ **********  VARREFEXP. 0x990c5a0 .. a
+ nr for that node ( a) : 5
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x990c5a0 : SgVarRefExp : a
+ ---- JUSTCOPY. 0x990c5a0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x990c5a0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ Current Node: 0x990c5a0 changed: true
+ Current Node: 0x990c5a0 unhandled: false
+
+!! Worklist :  - <SgInitializedName> c :0 - <SgIntVal> 4 :0
+
+
+------------------------------------------------------------------
+current Node: 0x98046d0  previous Node : 0x98d86d8
+ **********  INITNAME. 0x98046d0
+ **********  INITNAME. use  def true
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x98046d0 : SgInitializedName : c
+ ---- JUSTCOPY. 0x98046d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x98046d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x98046d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  false
+  ----- NEW Definition. Adding: c nrInEdges: 1
+  ----- changed table (one incoming) entry to 0x98046d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x98046d0 changed: true
+ Current Node: 0x98046d0 unhandled: false
+
+!! Worklist :  - <SgIntVal> 4 :0 - <SgIntVal> 4 :0
+
+
+------------------------------------------------------------------
+current Node: 0x98bf034  previous Node : 0x990c5a0
+ ********** UNHANDLED.  This is an unhandled node SgIntVal
+ ---- JUSTCOPY. 0x98bf034
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x98bf034
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ Current Node: 0x98bf034 changed: false
+ Current Node: 0x98bf034 unhandled: true
+
+!! Worklist :  - <SgIntVal> 4 :0Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgAssignOp> a = 4 :2
+
+
+------------------------------------------------------------------
+current Node: 0x98bf068  previous Node : 0x98046d0
+ ********** UNHANDLED.  This is an unhandled node SgIntVal
+ ---- JUSTCOPY. 0x98bf068
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x98bf068
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ Current Node: 0x98bf068 changed: false
+ Current Node: 0x98bf068 unhandled: true
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgAssignOp> a = 4 :2 - <SgAssignInitializer> 4 :1
+
+
+------------------------------------------------------------------
+current Node: 0x9917200  previous Node : 0x98bf034
+ **********  BINARY OP. 0x9917200
+ **********  BINARY OP IS_VAR_REF_EXP. 
+ BINARY OP: a  name: 0x9804678  varRefExp: 0x990c5a0
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x9917200 : SgAssignOp : a
+ ---- JUSTCOPY. 0x9917200
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x9917200
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x9917200
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  true
+  ----- Definition EXISTS : a nrInEdges: 1
+  ----- changed table (one incoming)  true  dont_replace: false
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x9917200 changed: true
+ Current Node: 0x9917200 unhandled: false
+
+!! Worklist :  - <SgAssignInitializer> 4 :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgExprStatement> a = 4; :1
+
+
+------------------------------------------------------------------
+current Node: 0x98cbb5c  previous Node : 0x98bf068
+ **********  ASSIGNINITIALIZER 
+ **********  ASSIGNINITIALIZER: 0x98cbb5c
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x98cbb5c : SgAssignInitializer : c
+ ---- JUSTCOPY. 0x98cbb5c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x98cbb5c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x98cbb5c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  true
+  ----- Definition EXISTS : c nrInEdges: 1
+  ----- changed table (one incoming)  true  dont_replace: false
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x98cbb5c changed: true
+ Current Node: 0x98cbb5c unhandled: false
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgExprStatement> a = 4; :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int c = 4; :1
+
+
+------------------------------------------------------------------
+current Node: 0x9902868  previous Node : 0x9917200
+ ********** UNHANDLED.  This is an unhandled node SgExprStatement
+ ---- JUSTCOPY. 0x9902868
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9902868
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ Current Node: 0x9902868 changed: false
+ Current Node: 0x9902868 unhandled: true
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int c = 4; :1 - <SgBoolValExp> true :0
+
+
+------------------------------------------------------------------
+current Node: 0xb7e16114  previous Node : 0x98cbb5c
+ ********** UNHANDLED.  This is an unhandled node SgVariableDeclaration
+ ---- JUSTCOPY. 0xb7e16114
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0xb7e16114
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ Current Node: 0xb7e16114 changed: false
+ Current Node: 0xb7e16114 unhandled: true
+
+!! Worklist :  - <SgBoolValExp> true :0 - <SgFunctionDefinition> int main(int argc,ch... :2
+
+
+------------------------------------------------------------------
+current Node: 0x98f6cb8  previous Node : 0xb7e16008
+ ********** UNHANDLED.  This is an unhandled node SgBoolValExp
+ ---- JUSTCOPY. 0x98f6cb8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x98f6cb8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ Current Node: 0x98f6cb8 changed: false
+ Current Node: 0x98f6cb8 unhandled: true
+
+!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :2 - <SgExprStatement> true; :1
+
+
+------------------------------------------------------------------
+current Node: 0xb7e58008  previous Node : 0xb7e16114
+ found global vars: 0 funEntry false
+ ********** UNHANDLED.  This is an unhandled node SgFunctionDefinition
+ ---- JUSTCOPY. 0xb7e58008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0xb7e58008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ Current Node: 0xb7e58008 changed: false
+ Current Node: 0xb7e58008 unhandled: true
+
+!! Worklist :  - <SgExprStatement> true; :1
+
+
+------------------------------------------------------------------
+current Node: 0x9902840  previous Node : 0x98f6cb8
+ ********** UNHANDLED.  This is an unhandled node SgExprStatement
+ ---- JUSTCOPY. 0x9902840
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9902840
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ Current Node: 0x9902840 changed: false
+ Current Node: 0x9902840 unhandled: true
+
+!! Worklist :  - <SgWhileStmt> while(true){a = 4;} :1
+
+
+------------------------------------------------------------------
+current Node: 0x98d86d8  previous Node : 0x9902840
+ ********** UNHANDLED.  This is an unhandled node SgWhileStmt
+ ---- JUSTCOPY. 0x98d86d8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x98d86d8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ Current Node: 0x98d86d8 changed: false
+ Current Node: 0x98d86d8 unhandled: true
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVarRefExp> a :0 - <SgInitializedName> c :0
+
+
+------------------------------------------------------------------
+current Node: 0x990c5a0  previous Node : 0x98d86d8
+ **********  VARREFEXP. 0x990c5a0 .. a
+ nr for that node ( a) : 5
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x990c5a0 : SgVarRefExp : a
+ ---- JUSTCOPY. 0x990c5a0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? false
+ ---- JUSTCOPY. 0x990c5a0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ Current Node: 0x990c5a0 changed: false
+ Current Node: 0x990c5a0 unhandled: false
+
+
+------------------------------------------------------------------
+current Node: 0x98046d0  previous Node : 0x98d86d8
+ **********  INITNAME. 0x98046d0
+ **********  INITNAME. use  def true
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x98046d0 : SgInitializedName : c
+ ---- JUSTCOPY. 0x98046d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x98046d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x98046d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  false
+  ----- NEW Definition. Adding: c nrInEdges: 1
+  ----- changed table (one incoming) entry to 0x98046d0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x98046d0 changed: true
+ Current Node: 0x98046d0 unhandled: false
+
+!! Worklist :  - <SgIntVal> 4 :0
+
+
+------------------------------------------------------------------
+current Node: 0x98bf068  previous Node : 0x98046d0
+ ********** UNHANDLED.  This is an unhandled node SgIntVal
+ ---- JUSTCOPY. 0x98bf068
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x98bf068
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ Current Node: 0x98bf068 changed: false
+ Current Node: 0x98bf068 unhandled: true
+
+!! Worklist :  - <SgAssignInitializer> 4 :1
+
+
+------------------------------------------------------------------
+current Node: 0x98cbb5c  previous Node : 0x98bf068
+ **********  ASSIGNINITIALIZER 
+ **********  ASSIGNINITIALIZER: 0x98cbb5c
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x98cbb5c : SgAssignInitializer : c
+ ---- JUSTCOPY. 0x98cbb5c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x98cbb5c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x98cbb5c
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  true
+  ----- Definition EXISTS : c nrInEdges: 1
+  ----- changed table (one incoming)  true  dont_replace: false
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x98cbb5c changed: true
+ Current Node: 0x98cbb5c unhandled: false
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int c = 4; :1
+
+
+------------------------------------------------------------------
+current Node: 0xb7e16114  previous Node : 0x98cbb5c
+ ********** UNHANDLED.  This is an unhandled node SgVariableDeclaration
+ ---- JUSTCOPY. 0xb7e16114
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0xb7e16114
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ Current Node: 0xb7e16114 changed: false
+ Current Node: 0xb7e16114 unhandled: true
+
+!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :2
+
+
+------------------------------------------------------------------
+current Node: 0xb7e58008  previous Node : 0xb7e16114
+ found global vars: 0 funEntry false
+ ********** UNHANDLED.  This is an unhandled node SgFunctionDefinition
+ ---- JUSTCOPY. 0xb7e58008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0xb7e58008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList
+ Current Node: 0xb7e58008 changed: false
+ Current Node: 0xb7e58008 unhandled: true
+
+!! Worklist : 
+ Elements in Table: 19
+ Exiting function ::main(int, char **)
+
+Nr of nodes visited 41  of nodes : 19
+
+!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :0 - <SgInitializedName> argc :0 - <SgInitializedName> argv :0 - <SgFunctionParameterList>  :2 - <SgInitializedName> a :0 - <SgIntVal> 2 :0 - <SgAssignInitializer> 2 :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int a = 2; :1 - <SgBoolValExp> true :0 - <SgExprStatement> true; :1 - <SgWhileStmt> while(true){a = 4;} :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVarRefExp> a :0 - <SgInitializedName> c :0 - <SgIntVal> 4 :0 - <SgIntVal> 4 :0Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgAssignOp> a = 4 :2 - <SgAssignInitializer> 4 :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgExprStatement> a = 4; :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int c = 4; :1 - <SgBoolValExp> true :0 - <SgFunctionDefinition> int main(int argc,ch... :2 - <SgExprStatement> true; :1 - <SgWhileStmt> while(true){a = 4;} :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVarRefExp> a :0 - <SgInitializedName> c :0 - <SgIntVal> 4 :0 - <SgIntVal> 4 :0Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgAssignOp> a = 4 :2 - <SgAssignInitializer> 4 :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgExprStatement> a = 4; :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int c = 4; :1 - <SgBoolValExp> true :0 - <SgFunctionDefinition> int main(int argc,ch... :2 - <SgExprStatement> true; :1 - <SgWhileStmt> while(true){a = 4;} :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVarRefExp> a :0 - <SgInitializedName> c :0 - <SgIntVal> 4 :0 - <SgAssignInitializer> 4 :1Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int c = 4; :1 - <SgFunctionDefinition> int main(int argc,ch... :2
+Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x98a09d0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+FINISH: Traversal over Functions
+
+
+>>>>> Time for dfa-test: 0.23 sec
+>>>>> Total CFG nodes: 19  --  #CFG nodes visited: 41
+FINISH: DefUse Analysis True
+Analysis is : success
+  DEF>> Vector entries for argc ( 0x98045c8 ) : 1
+  DEF>> Vector entries for argv ( 0x9804620 ) : 1
+  DEF>> Vector entries for a ( 0x9804678 ) : 1
+  DEF>> Vector entries for c ( 0x98046d0 ) : 1
+
+DEFMAP
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+4: 13 var: c
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+5: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 5
+6: 14 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+7: 15 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 13
+8: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+9: 17 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+10: 11 var: SgWhileStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+11: 9 var: SgBoolValExp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+12: 10 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+13: 18 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+14: 12 var: a
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+15: 16 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 16
+16: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+17: 19 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+18: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:a ( 5 ) - SgNode 7
+  ..  initName:a ( 5 ) - SgNode 16
+  ..  initName:c ( 13 ) - SgNode 17
+19: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+
+USEMAP
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: a
+4: 13 var: c
+5: 6 var: SgIntVal
+6: 14 var: SgIntVal
+7: 15 var: SgIntVal
+8: 7 var: SgAssignInitializer
+9: 17 var: SgAssignInitializer
+10: 11 var: SgWhileStmt
+11: 9 var: SgBoolValExp
+12: 10 var: SgExprStatement
+13: 18 var: SgExprStatement
+14: 12 var: a
+15: 16 var: SgAssignOp
+16: 8 var: SgVariableDeclaration
+17: 19 var: SgVariableDeclaration
+18: 1 var: SgFunctionDefinition
+19: 4 var: SgFunctionParameterList

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test20.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test20.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test20.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,5 +0,0 @@
-void bar(){
-  while(1); 
-}
-
-

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test20.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test20.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test20.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test20.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,5 @@
+void bar(){
+  while(1); 
+}
+
+

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test21.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test21.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test21.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,4 +0,0 @@
-void func()
-   {
-     for (; int b = 1; );
-   }

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test21.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test21.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test21.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test21.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,4 @@
+void func()
+   {
+     for (; int b = 1; );
+   }

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test22.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test22.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test22.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,6 +0,0 @@
-
-void func()
-   {
-     for (; int b = 1; );
-     do ; while (0); 
-   }

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test22.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test22.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test22.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test22.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,6 @@
+
+void func()
+   {
+     for (; int b = 1; );
+     do ; while (0); 
+   }

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test23.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test23.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test23.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,9 +0,0 @@
-void func()
-   {
-     for (; ;);
-     for (int a = 0; ;);
-
-     for (; ;) {
-       for (int a = 0; ;);
-     }
-   }

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test23.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test23.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test23.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test23.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,9 @@
+void func()
+   {
+     for (; ;);
+     for (int a = 0; ;);
+
+     for (; ;) {
+       for (int a = 0; ;);
+     }
+   }

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,6 +0,0 @@
-int main(int argc, char **argv) {
-  int d=2;
-  d++;
-  d = 5;
-}
-

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,6 @@
+int main(int argc, char **argv) {
+  int d=2;
+  d++;
+  d = 5;
+}
+

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.output
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.output	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.output	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,1378 +0,0 @@
->>>> Starting ROSE frontend ... 
- >> Class name: SgFile
-
- >>> Using Information relative to other declaration: 
-
- >> File-Name: /home/panas2/development/dataflow/tests/test3.c
-Inside of propagateHiddenListData (node = 0xb7ed4008 = SgFile) 
->>>> generate PDF 
->>>> start def-use analysis ... 
-START: DefUse Analysis True
-START: Finding global variables
- Amount of global variables : 0
- -----------------------------------------------------------------*
-
-
-FINISH: Finding global variables
-
- **************** MAP ************************** 
-START: Traversal over Functions
-Warning: can't locate an associated SgStatement from astNode = 0x9196238 = SgTypeInt parentNode = 0x9196238 = SgTypeInt 
-Warning: can't locate an associated SgStatement from astNode = 0x91a2420 = SgPointerType parentNode = 0x91a2420 = SgPointerType 
- Found function ::main(int, char **)
-Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-
-
-------------------------------------------------------------------
-current Node: 0xb7df5008  previous Node : 0
-
-
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FUNCTION %%%%%%
-
- found global vars: 0 funEntry true
- Current Node: 0xb7df5008 changed: true
- Current Node: 0xb7df5008 unhandled: false
-
-!! Worklist :  - <SgInitializedName> argc :0
-
-
-------------------------------------------------------------------
-current Node: 0x91673a8  previous Node : 0xb7df5008
- **********  INITNAME. 0x91673a8
- **********  INITNAME. use  def true
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x91673a8 : SgInitializedName : argc
- ---- JUSTCOPY. 0x91673a8
-
- **************** MAP ************************** 
-1: -1 var: argc
-  ----- IS USE. CHANGED TABLE ? false
- ---- JUSTCOPY. 0x91673a8
-
- **************** MAP ************************** 
-1: -1 var: argc
- ---- JUSTCOPY. 0x91673a8
-
- **************** MAP ************************** 
-1: -1 var: argc
-  ----- Definition. Is value contained ?  false
-  ----- NEW Definition. Adding: argc nrInEdges: 1
-  ----- changed table (one incoming) entry to 0x91673a8
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
- Current Node: 0x91673a8 changed: true
- Current Node: 0x91673a8 unhandled: false
-
-!! Worklist :  - <SgInitializedName> argv :0
-
-
-------------------------------------------------------------------
-current Node: 0x9167400  previous Node : 0x91673a8
- **********  INITNAME. 0x9167400
- **********  INITNAME. use  def true
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x9167400 : SgInitializedName : argv
- ---- JUSTCOPY. 0x9167400
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x9167400
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
- ---- JUSTCOPY. 0x9167400
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-  ----- Definition. Is value contained ?  false
-  ----- NEW Definition. Adding: argv nrInEdges: 1
-  ----- changed table (one incoming) entry to 0x9167400
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x9167400 changed: true
- Current Node: 0x9167400 unhandled: false
-
-!! Worklist :  - <SgFunctionParameterList>  :2
-
-
-------------------------------------------------------------------
-current Node: 0xb7e415ac  previous Node : 0x9167400
- ********** UNHANDLED.  This is an unhandled node SgFunctionParameterList
- ---- JUSTCOPY. 0xb7e415ac
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0xb7e415ac
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 4 var: SgFunctionParameterList
- Current Node: 0xb7e415ac changed: false
- Current Node: 0xb7e415ac unhandled: true
-
-!! Worklist :  - <SgInitializedName> d :0
-
-
-------------------------------------------------------------------
-current Node: 0x9167458  previous Node : 0xb7e415ac
- **********  INITNAME. 0x9167458
- **********  INITNAME. use  def true
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x9167458 : SgInitializedName : d
- ---- JUSTCOPY. 0x9167458
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-4: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x9167458
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x9167458
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  false
-  ----- NEW Definition. Adding: d nrInEdges: 1
-  ----- changed table (one incoming) entry to 0x9167458
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x9167458 changed: true
- Current Node: 0x9167458 unhandled: false
-
-!! Worklist :  - <SgIntVal> 2 :0
-
-
-------------------------------------------------------------------
-current Node: 0x9221de0  previous Node : 0x9167458
- ********** UNHANDLED.  This is an unhandled node SgIntVal
- ---- JUSTCOPY. 0x9221de0
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-5: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9221de0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 6 var: SgIntVal
-5: 4 var: SgFunctionParameterList
- Current Node: 0x9221de0 changed: false
- Current Node: 0x9221de0 unhandled: true
-
-!! Worklist :  - <SgAssignInitializer> 2 :1
-
-
-------------------------------------------------------------------
-current Node: 0x922e908  previous Node : 0x9221de0
- **********  ASSIGNINITIALIZER 
- **********  ASSIGNINITIALIZER: 0x922e908
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x922e908 : SgAssignInitializer : d
- ---- JUSTCOPY. 0x922e908
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-6: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x922e908
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x922e908
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  true
-  ----- Definition EXISTS : d nrInEdges: 1
-  ----- changed table (one incoming)  true  dont_replace: false
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-6: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x922e908 changed: true
- Current Node: 0x922e908 unhandled: false
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int d = 2; :1
-
-
-------------------------------------------------------------------
-current Node: 0xb7db3008  previous Node : 0x922e908
- ********** UNHANDLED.  This is an unhandled node SgVariableDeclaration
- ---- JUSTCOPY. 0xb7db3008
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-6: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-7: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0xb7db3008
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 8 var: SgVariableDeclaration
-7: 4 var: SgFunctionParameterList
- Current Node: 0xb7db3008 changed: false
- Current Node: 0xb7db3008 unhandled: true
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVarRefExp> d :0
-
-
-------------------------------------------------------------------
-current Node: 0x923b4b8  previous Node : 0xb7db3008
- **********  VARREFEXP. 0x923b4b8 .. d
- nr for that node ( d) : 5
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x923b4b8 : SgVarRefExp : d
- ---- JUSTCOPY. 0x923b4b8
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-6: 9 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-7: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-8: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x923b4b8
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 9 var: d
-7: 8 var: SgVariableDeclaration
-8: 4 var: SgFunctionParameterList
- Current Node: 0x923b4b8 changed: true
- Current Node: 0x923b4b8 unhandled: false
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgPlusPlusOp> d++ :1
-
-
-------------------------------------------------------------------
-current Node: 0x92460a0  previous Node : 0x923b4b8
- **********  UNARY OP. 0x92460a0
- UNARY OP: d  name: 0x9167458  varRefExp: 0x923b4b8
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x92460a0 : SgPlusPlusOp : d
- ---- JUSTCOPY. 0x92460a0
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-6: 9 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-7: 10 var: SgPlusPlusOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-8: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-9: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x92460a0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 9 var: d
-  ..  initName:d ( 5 ) - SgNode 9
-7: 10 var: SgPlusPlusOp
-  ..  initName:d ( 5 ) - SgNode 9
-8: 8 var: SgVariableDeclaration
-9: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x92460a0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 9 var: d
-  ..  initName:d ( 5 ) - SgNode 9
-7: 10 var: SgPlusPlusOp
-  ..  initName:d ( 5 ) - SgNode 9
-8: 8 var: SgVariableDeclaration
-9: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  true
-  ----- Definition EXISTS : d nrInEdges: 1
-  ----- changed table (one incoming)  true  dont_replace: false
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-6: 9 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-7: 10 var: SgPlusPlusOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-8: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-9: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x92460a0 changed: true
- Current Node: 0x92460a0 unhandled: false
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgExprStatement> d++; :1
-
-
-------------------------------------------------------------------
-current Node: 0x9252bc8  previous Node : 0x92460a0
- ********** UNHANDLED.  This is an unhandled node SgExprStatement
- ---- JUSTCOPY. 0x9252bc8
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-6: 9 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-7: 10 var: SgPlusPlusOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-8: 11 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-9: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-10: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9252bc8
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 9 var: d
-  ..  initName:d ( 5 ) - SgNode 9
-7: 10 var: SgPlusPlusOp
-8: 11 var: SgExprStatement
-9: 8 var: SgVariableDeclaration
-10: 4 var: SgFunctionParameterList
- Current Node: 0x9252bc8 changed: false
- Current Node: 0x9252bc8 unhandled: true
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVarRefExp> d :0
-
-
-------------------------------------------------------------------
-current Node: 0x923b4e4  previous Node : 0x9252bc8
- **********  VARREFEXP. 0x923b4e4 .. d
- nr for that node ( d) : 5
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x923b4e4 : SgVarRefExp : d
- ---- JUSTCOPY. 0x923b4e4
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-5: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-6: 9 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-7: 12 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-8: 10 var: SgPlusPlusOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-9: 11 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-10: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-11: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x923b4e4
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 6 var: SgIntVal
-5: 7 var: SgAssignInitializer
-6: 9 var: d
-  ..  initName:d ( 5 ) - SgNode 9
-7: 12 var: d
-8: 10 var: SgPlusPlusOp
-9: 11 var: SgExprStatement
-10: 8 var: SgVariableDeclaration
-11: 4 var: SgFunctionParameterList
- Current Node: 0x923b4e4 changed: true
- Current Node: 0x923b4e4 unhandled: false
-
-!! Worklist :  - <SgIntVal> 5 :0
-
-
-------------------------------------------------------------------
-current Node: 0x9221e14  previous Node : 0x923b4e4
- ********** UNHANDLED.  This is an unhandled node SgIntVal
- ---- JUSTCOPY. 0x9221e14
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-5: 13 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-6: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-7: 9 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-8: 12 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-9: 10 var: SgPlusPlusOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-10: 11 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-11: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-12: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9221e14
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 6 var: SgIntVal
-5: 13 var: SgIntVal
-6: 7 var: SgAssignInitializer
-7: 9 var: d
-  ..  initName:d ( 5 ) - SgNode 9
-8: 12 var: d
-9: 10 var: SgPlusPlusOp
-10: 11 var: SgExprStatement
-11: 8 var: SgVariableDeclaration
-12: 4 var: SgFunctionParameterList
- Current Node: 0x9221e14 changed: false
- Current Node: 0x9221e14 unhandled: true
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgAssignOp> d = 5 :2
-
-
-------------------------------------------------------------------
-current Node: 0x925c8b8  previous Node : 0x9221e14
- **********  BINARY OP. 0x925c8b8
- **********  BINARY OP IS_VAR_REF_EXP. 
- BINARY OP: d  name: 0x9167458  varRefExp: 0x923b4e4
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x925c8b8 : SgAssignOp : d
- ---- JUSTCOPY. 0x925c8b8
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-5: 13 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-6: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-7: 9 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-8: 12 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-9: 10 var: SgPlusPlusOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-10: 11 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-11: 14 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-12: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-13: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x925c8b8
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 6 var: SgIntVal
-5: 13 var: SgIntVal
-6: 7 var: SgAssignInitializer
-7: 9 var: d
-  ..  initName:d ( 5 ) - SgNode 9
-8: 12 var: d
-9: 10 var: SgPlusPlusOp
-10: 11 var: SgExprStatement
-11: 14 var: SgAssignOp
-12: 8 var: SgVariableDeclaration
-13: 4 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x925c8b8
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 6 var: SgIntVal
-5: 13 var: SgIntVal
-6: 7 var: SgAssignInitializer
-7: 9 var: d
-  ..  initName:d ( 5 ) - SgNode 9
-8: 12 var: d
-9: 10 var: SgPlusPlusOp
-10: 11 var: SgExprStatement
-11: 14 var: SgAssignOp
-12: 8 var: SgVariableDeclaration
-13: 4 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  true
-  ----- Definition EXISTS : d nrInEdges: 1
-  ----- changed table (one incoming)  true  dont_replace: false
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-5: 13 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-6: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-7: 9 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-8: 12 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-9: 10 var: SgPlusPlusOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-10: 11 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-11: 14 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-12: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-13: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- Current Node: 0x925c8b8 changed: true
- Current Node: 0x925c8b8 unhandled: false
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgExprStatement> d = 5; :1
-
-
-------------------------------------------------------------------
-current Node: 0x9252bf0  previous Node : 0x925c8b8
- ********** UNHANDLED.  This is an unhandled node SgExprStatement
- ---- JUSTCOPY. 0x9252bf0
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-5: 13 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-6: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-7: 9 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-8: 12 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-9: 10 var: SgPlusPlusOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-10: 11 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-11: 15 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-12: 14 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-13: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-14: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9252bf0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 6 var: SgIntVal
-5: 13 var: SgIntVal
-6: 7 var: SgAssignInitializer
-7: 9 var: d
-  ..  initName:d ( 5 ) - SgNode 9
-8: 12 var: d
-9: 10 var: SgPlusPlusOp
-10: 11 var: SgExprStatement
-11: 15 var: SgExprStatement
-12: 14 var: SgAssignOp
-13: 8 var: SgVariableDeclaration
-14: 4 var: SgFunctionParameterList
- Current Node: 0x9252bf0 changed: false
- Current Node: 0x9252bf0 unhandled: true
-
-!! Worklist :  - <SgIntVal> 0 :0
-
-
-------------------------------------------------------------------
-current Node: 0x9221e48  previous Node : 0x9252bf0
- ********** UNHANDLED.  This is an unhandled node SgIntVal
- ---- JUSTCOPY. 0x9221e48
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-5: 13 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-6: 16 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-7: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-8: 9 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-9: 12 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-10: 10 var: SgPlusPlusOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-11: 11 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-12: 15 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-13: 14 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-14: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-15: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x9221e48
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 6 var: SgIntVal
-5: 13 var: SgIntVal
-6: 16 var: SgIntVal
-7: 7 var: SgAssignInitializer
-8: 9 var: d
-  ..  initName:d ( 5 ) - SgNode 9
-9: 12 var: d
-10: 10 var: SgPlusPlusOp
-11: 11 var: SgExprStatement
-12: 15 var: SgExprStatement
-13: 14 var: SgAssignOp
-14: 8 var: SgVariableDeclaration
-15: 4 var: SgFunctionParameterList
- Current Node: 0x9221e48 changed: false
- Current Node: 0x9221e48 unhandled: true
-
-!! Worklist :  - <SgReturnStmt> return 0; :1
-
-
-------------------------------------------------------------------
-current Node: 0x92693e0  previous Node : 0x9221e48
- ********** UNHANDLED.  This is an unhandled node SgReturnStmt
- ---- JUSTCOPY. 0x92693e0
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-5: 13 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-6: 16 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-7: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-8: 9 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-9: 12 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-10: 10 var: SgPlusPlusOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-11: 11 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-12: 15 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-13: 14 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-14: 17 var: SgReturnStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-15: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-16: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0x92693e0
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 6 var: SgIntVal
-5: 13 var: SgIntVal
-6: 16 var: SgIntVal
-7: 7 var: SgAssignInitializer
-8: 9 var: d
-  ..  initName:d ( 5 ) - SgNode 9
-9: 12 var: d
-10: 10 var: SgPlusPlusOp
-11: 11 var: SgExprStatement
-12: 15 var: SgExprStatement
-13: 14 var: SgAssignOp
-14: 17 var: SgReturnStmt
-15: 8 var: SgVariableDeclaration
-16: 4 var: SgFunctionParameterList
- Current Node: 0x92693e0 changed: false
- Current Node: 0x92693e0 unhandled: true
-
-!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :2
-
-
-------------------------------------------------------------------
-current Node: 0xb7df5008  previous Node : 0x92693e0
- found global vars: 0 funEntry false
- ********** UNHANDLED.  This is an unhandled node SgFunctionDefinition
- ---- JUSTCOPY. 0xb7df5008
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-5: 13 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-6: 16 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-7: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-8: 9 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-9: 12 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-10: 10 var: SgPlusPlusOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-11: 11 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-12: 15 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-13: 14 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-14: 17 var: SgReturnStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-15: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-16: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-17: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
- ---- JUSTCOPY. 0xb7df5008
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 6 var: SgIntVal
-5: 13 var: SgIntVal
-6: 16 var: SgIntVal
-7: 7 var: SgAssignInitializer
-8: 9 var: d
-  ..  initName:d ( 5 ) - SgNode 9
-9: 12 var: d
-10: 10 var: SgPlusPlusOp
-11: 11 var: SgExprStatement
-12: 15 var: SgExprStatement
-13: 14 var: SgAssignOp
-14: 17 var: SgReturnStmt
-15: 8 var: SgVariableDeclaration
-16: 1 var: SgFunctionDefinition
-17: 4 var: SgFunctionParameterList
- Current Node: 0xb7df5008 changed: false
- Current Node: 0xb7df5008 unhandled: true
-
-!! Worklist : 
- Elements in Table: 17
- Exiting function ::main(int, char **)
-
-Nr of nodes visited 18  of nodes : 17
-
-!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :0 - <SgInitializedName> argc :0 - <SgInitializedName> argv :0 - <SgFunctionParameterList>  :2 - <SgInitializedName> d :0 - <SgIntVal> 2 :0 - <SgAssignInitializer> 2 :1Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVariableDeclaration> int d = 2; :1Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVarRefExp> d :0Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgPlusPlusOp> d++ :1Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgExprStatement> d++; :1Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVarRefExp> d :0 - <SgIntVal> 5 :0Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgAssignOp> d = 5 :2Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgExprStatement> d = 5; :1 - <SgIntVal> 0 :0 - <SgReturnStmt> return 0; :1 - <SgFunctionDefinition> int main(int argc,ch... :2
-Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-FINISH: Traversal over Functions
-
-
->>>>> Time for dfa-test: 0.08 sec
->>>>> Total CFG nodes: 17  --  #CFG nodes visited: 18
-FINISH: DefUse Analysis True
-Analysis is : success
-  DEF>> Vector entries for argc ( 0x91673a8 ) : 1
-  DEF>> Vector entries for argv ( 0x9167400 ) : 1
-  DEF>> Vector entries for d ( 0x9167458 ) : 1
-
-DEFMAP
-
- **************** MAP ************************** 
-1: 2 var: argc
-  ..  initName:argc ( 2 ) - SgNode 2
-2: 3 var: argv
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-3: 5 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-4: 6 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 5
-5: 13 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-6: 16 var: SgIntVal
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-7: 7 var: SgAssignInitializer
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-8: 9 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-9: 12 var: d
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-10: 10 var: SgPlusPlusOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-11: 11 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 10
-12: 15 var: SgExprStatement
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-13: 14 var: SgAssignOp
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-14: 17 var: SgReturnStmt
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-15: 8 var: SgVariableDeclaration
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 7
-16: 1 var: SgFunctionDefinition
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-  ..  initName:d ( 5 ) - SgNode 14
-17: 4 var: SgFunctionParameterList
-  ..  initName:argc ( 2 ) - SgNode 2
-  ..  initName:argv ( 3 ) - SgNode 3
-
-USEMAP
-
- **************** MAP ************************** 
-1: 2 var: argc
-2: 3 var: argv
-3: 5 var: d
-4: 6 var: SgIntVal
-5: 13 var: SgIntVal
-6: 16 var: SgIntVal
-7: 7 var: SgAssignInitializer
-8: 9 var: d
-  ..  initName:d ( 5 ) - SgNode 9
-9: 12 var: d
-10: 10 var: SgPlusPlusOp
-11: 11 var: SgExprStatement
-12: 15 var: SgExprStatement
-13: 14 var: SgAssignOp
-14: 17 var: SgReturnStmt
-15: 8 var: SgVariableDeclaration
-16: 1 var: SgFunctionDefinition
-17: 4 var: SgFunctionParameterList

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.output (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.output)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.output	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test3.output	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,1378 @@
+>>>> Starting ROSE frontend ... 
+ >> Class name: SgFile
+
+ >>> Using Information relative to other declaration: 
+
+ >> File-Name: /home/panas2/development/dataflow/tests/test3.c
+Inside of propagateHiddenListData (node = 0xb7ed4008 = SgFile) 
+>>>> generate PDF 
+>>>> start def-use analysis ... 
+START: DefUse Analysis True
+START: Finding global variables
+ Amount of global variables : 0
+ -----------------------------------------------------------------*
+
+
+FINISH: Finding global variables
+
+ **************** MAP ************************** 
+START: Traversal over Functions
+Warning: can't locate an associated SgStatement from astNode = 0x9196238 = SgTypeInt parentNode = 0x9196238 = SgTypeInt 
+Warning: can't locate an associated SgStatement from astNode = 0x91a2420 = SgPointerType parentNode = 0x91a2420 = SgPointerType 
+ Found function ::main(int, char **)
+Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+
+
+------------------------------------------------------------------
+current Node: 0xb7df5008  previous Node : 0
+
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FUNCTION %%%%%%
+
+ found global vars: 0 funEntry true
+ Current Node: 0xb7df5008 changed: true
+ Current Node: 0xb7df5008 unhandled: false
+
+!! Worklist :  - <SgInitializedName> argc :0
+
+
+------------------------------------------------------------------
+current Node: 0x91673a8  previous Node : 0xb7df5008
+ **********  INITNAME. 0x91673a8
+ **********  INITNAME. use  def true
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x91673a8 : SgInitializedName : argc
+ ---- JUSTCOPY. 0x91673a8
+
+ **************** MAP ************************** 
+1: -1 var: argc
+  ----- IS USE. CHANGED TABLE ? false
+ ---- JUSTCOPY. 0x91673a8
+
+ **************** MAP ************************** 
+1: -1 var: argc
+ ---- JUSTCOPY. 0x91673a8
+
+ **************** MAP ************************** 
+1: -1 var: argc
+  ----- Definition. Is value contained ?  false
+  ----- NEW Definition. Adding: argc nrInEdges: 1
+  ----- changed table (one incoming) entry to 0x91673a8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+ Current Node: 0x91673a8 changed: true
+ Current Node: 0x91673a8 unhandled: false
+
+!! Worklist :  - <SgInitializedName> argv :0
+
+
+------------------------------------------------------------------
+current Node: 0x9167400  previous Node : 0x91673a8
+ **********  INITNAME. 0x9167400
+ **********  INITNAME. use  def true
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x9167400 : SgInitializedName : argv
+ ---- JUSTCOPY. 0x9167400
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x9167400
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+ ---- JUSTCOPY. 0x9167400
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+  ----- Definition. Is value contained ?  false
+  ----- NEW Definition. Adding: argv nrInEdges: 1
+  ----- changed table (one incoming) entry to 0x9167400
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x9167400 changed: true
+ Current Node: 0x9167400 unhandled: false
+
+!! Worklist :  - <SgFunctionParameterList>  :2
+
+
+------------------------------------------------------------------
+current Node: 0xb7e415ac  previous Node : 0x9167400
+ ********** UNHANDLED.  This is an unhandled node SgFunctionParameterList
+ ---- JUSTCOPY. 0xb7e415ac
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0xb7e415ac
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 4 var: SgFunctionParameterList
+ Current Node: 0xb7e415ac changed: false
+ Current Node: 0xb7e415ac unhandled: true
+
+!! Worklist :  - <SgInitializedName> d :0
+
+
+------------------------------------------------------------------
+current Node: 0x9167458  previous Node : 0xb7e415ac
+ **********  INITNAME. 0x9167458
+ **********  INITNAME. use  def true
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x9167458 : SgInitializedName : d
+ ---- JUSTCOPY. 0x9167458
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+4: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x9167458
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x9167458
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  false
+  ----- NEW Definition. Adding: d nrInEdges: 1
+  ----- changed table (one incoming) entry to 0x9167458
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x9167458 changed: true
+ Current Node: 0x9167458 unhandled: false
+
+!! Worklist :  - <SgIntVal> 2 :0
+
+
+------------------------------------------------------------------
+current Node: 0x9221de0  previous Node : 0x9167458
+ ********** UNHANDLED.  This is an unhandled node SgIntVal
+ ---- JUSTCOPY. 0x9221de0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+5: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9221de0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 6 var: SgIntVal
+5: 4 var: SgFunctionParameterList
+ Current Node: 0x9221de0 changed: false
+ Current Node: 0x9221de0 unhandled: true
+
+!! Worklist :  - <SgAssignInitializer> 2 :1
+
+
+------------------------------------------------------------------
+current Node: 0x922e908  previous Node : 0x9221de0
+ **********  ASSIGNINITIALIZER 
+ **********  ASSIGNINITIALIZER: 0x922e908
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x922e908 : SgAssignInitializer : d
+ ---- JUSTCOPY. 0x922e908
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+6: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x922e908
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x922e908
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  true
+  ----- Definition EXISTS : d nrInEdges: 1
+  ----- changed table (one incoming)  true  dont_replace: false
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+6: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x922e908 changed: true
+ Current Node: 0x922e908 unhandled: false
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int d = 2; :1
+
+
+------------------------------------------------------------------
+current Node: 0xb7db3008  previous Node : 0x922e908
+ ********** UNHANDLED.  This is an unhandled node SgVariableDeclaration
+ ---- JUSTCOPY. 0xb7db3008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+6: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+7: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0xb7db3008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 8 var: SgVariableDeclaration
+7: 4 var: SgFunctionParameterList
+ Current Node: 0xb7db3008 changed: false
+ Current Node: 0xb7db3008 unhandled: true
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVarRefExp> d :0
+
+
+------------------------------------------------------------------
+current Node: 0x923b4b8  previous Node : 0xb7db3008
+ **********  VARREFEXP. 0x923b4b8 .. d
+ nr for that node ( d) : 5
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x923b4b8 : SgVarRefExp : d
+ ---- JUSTCOPY. 0x923b4b8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+6: 9 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+7: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+8: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x923b4b8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 9 var: d
+7: 8 var: SgVariableDeclaration
+8: 4 var: SgFunctionParameterList
+ Current Node: 0x923b4b8 changed: true
+ Current Node: 0x923b4b8 unhandled: false
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgPlusPlusOp> d++ :1
+
+
+------------------------------------------------------------------
+current Node: 0x92460a0  previous Node : 0x923b4b8
+ **********  UNARY OP. 0x92460a0
+ UNARY OP: d  name: 0x9167458  varRefExp: 0x923b4b8
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x92460a0 : SgPlusPlusOp : d
+ ---- JUSTCOPY. 0x92460a0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+6: 9 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+7: 10 var: SgPlusPlusOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+8: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+9: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x92460a0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 9 var: d
+  ..  initName:d ( 5 ) - SgNode 9
+7: 10 var: SgPlusPlusOp
+  ..  initName:d ( 5 ) - SgNode 9
+8: 8 var: SgVariableDeclaration
+9: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x92460a0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 9 var: d
+  ..  initName:d ( 5 ) - SgNode 9
+7: 10 var: SgPlusPlusOp
+  ..  initName:d ( 5 ) - SgNode 9
+8: 8 var: SgVariableDeclaration
+9: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  true
+  ----- Definition EXISTS : d nrInEdges: 1
+  ----- changed table (one incoming)  true  dont_replace: false
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+6: 9 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+7: 10 var: SgPlusPlusOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+8: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+9: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x92460a0 changed: true
+ Current Node: 0x92460a0 unhandled: false
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgExprStatement> d++; :1
+
+
+------------------------------------------------------------------
+current Node: 0x9252bc8  previous Node : 0x92460a0
+ ********** UNHANDLED.  This is an unhandled node SgExprStatement
+ ---- JUSTCOPY. 0x9252bc8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+6: 9 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+7: 10 var: SgPlusPlusOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+8: 11 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+9: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+10: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9252bc8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 9 var: d
+  ..  initName:d ( 5 ) - SgNode 9
+7: 10 var: SgPlusPlusOp
+8: 11 var: SgExprStatement
+9: 8 var: SgVariableDeclaration
+10: 4 var: SgFunctionParameterList
+ Current Node: 0x9252bc8 changed: false
+ Current Node: 0x9252bc8 unhandled: true
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVarRefExp> d :0
+
+
+------------------------------------------------------------------
+current Node: 0x923b4e4  previous Node : 0x9252bc8
+ **********  VARREFEXP. 0x923b4e4 .. d
+ nr for that node ( d) : 5
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x923b4e4 : SgVarRefExp : d
+ ---- JUSTCOPY. 0x923b4e4
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+5: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+6: 9 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+7: 12 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+8: 10 var: SgPlusPlusOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+9: 11 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+10: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+11: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x923b4e4
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 6 var: SgIntVal
+5: 7 var: SgAssignInitializer
+6: 9 var: d
+  ..  initName:d ( 5 ) - SgNode 9
+7: 12 var: d
+8: 10 var: SgPlusPlusOp
+9: 11 var: SgExprStatement
+10: 8 var: SgVariableDeclaration
+11: 4 var: SgFunctionParameterList
+ Current Node: 0x923b4e4 changed: true
+ Current Node: 0x923b4e4 unhandled: false
+
+!! Worklist :  - <SgIntVal> 5 :0
+
+
+------------------------------------------------------------------
+current Node: 0x9221e14  previous Node : 0x923b4e4
+ ********** UNHANDLED.  This is an unhandled node SgIntVal
+ ---- JUSTCOPY. 0x9221e14
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+5: 13 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+6: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+7: 9 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+8: 12 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+9: 10 var: SgPlusPlusOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+10: 11 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+11: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+12: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9221e14
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 6 var: SgIntVal
+5: 13 var: SgIntVal
+6: 7 var: SgAssignInitializer
+7: 9 var: d
+  ..  initName:d ( 5 ) - SgNode 9
+8: 12 var: d
+9: 10 var: SgPlusPlusOp
+10: 11 var: SgExprStatement
+11: 8 var: SgVariableDeclaration
+12: 4 var: SgFunctionParameterList
+ Current Node: 0x9221e14 changed: false
+ Current Node: 0x9221e14 unhandled: true
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgAssignOp> d = 5 :2
+
+
+------------------------------------------------------------------
+current Node: 0x925c8b8  previous Node : 0x9221e14
+ **********  BINARY OP. 0x925c8b8
+ **********  BINARY OP IS_VAR_REF_EXP. 
+ BINARY OP: d  name: 0x9167458  varRefExp: 0x923b4e4
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x925c8b8 : SgAssignOp : d
+ ---- JUSTCOPY. 0x925c8b8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+5: 13 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+6: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+7: 9 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+8: 12 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+9: 10 var: SgPlusPlusOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+10: 11 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+11: 14 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+12: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+13: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x925c8b8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 6 var: SgIntVal
+5: 13 var: SgIntVal
+6: 7 var: SgAssignInitializer
+7: 9 var: d
+  ..  initName:d ( 5 ) - SgNode 9
+8: 12 var: d
+9: 10 var: SgPlusPlusOp
+10: 11 var: SgExprStatement
+11: 14 var: SgAssignOp
+12: 8 var: SgVariableDeclaration
+13: 4 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x925c8b8
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 6 var: SgIntVal
+5: 13 var: SgIntVal
+6: 7 var: SgAssignInitializer
+7: 9 var: d
+  ..  initName:d ( 5 ) - SgNode 9
+8: 12 var: d
+9: 10 var: SgPlusPlusOp
+10: 11 var: SgExprStatement
+11: 14 var: SgAssignOp
+12: 8 var: SgVariableDeclaration
+13: 4 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  true
+  ----- Definition EXISTS : d nrInEdges: 1
+  ----- changed table (one incoming)  true  dont_replace: false
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+5: 13 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+6: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+7: 9 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+8: 12 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+9: 10 var: SgPlusPlusOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+10: 11 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+11: 14 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+12: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+13: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ Current Node: 0x925c8b8 changed: true
+ Current Node: 0x925c8b8 unhandled: false
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgExprStatement> d = 5; :1
+
+
+------------------------------------------------------------------
+current Node: 0x9252bf0  previous Node : 0x925c8b8
+ ********** UNHANDLED.  This is an unhandled node SgExprStatement
+ ---- JUSTCOPY. 0x9252bf0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+5: 13 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+6: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+7: 9 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+8: 12 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+9: 10 var: SgPlusPlusOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+10: 11 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+11: 15 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+12: 14 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+13: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+14: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9252bf0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 6 var: SgIntVal
+5: 13 var: SgIntVal
+6: 7 var: SgAssignInitializer
+7: 9 var: d
+  ..  initName:d ( 5 ) - SgNode 9
+8: 12 var: d
+9: 10 var: SgPlusPlusOp
+10: 11 var: SgExprStatement
+11: 15 var: SgExprStatement
+12: 14 var: SgAssignOp
+13: 8 var: SgVariableDeclaration
+14: 4 var: SgFunctionParameterList
+ Current Node: 0x9252bf0 changed: false
+ Current Node: 0x9252bf0 unhandled: true
+
+!! Worklist :  - <SgIntVal> 0 :0
+
+
+------------------------------------------------------------------
+current Node: 0x9221e48  previous Node : 0x9252bf0
+ ********** UNHANDLED.  This is an unhandled node SgIntVal
+ ---- JUSTCOPY. 0x9221e48
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+5: 13 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+6: 16 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+7: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+8: 9 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+9: 12 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+10: 10 var: SgPlusPlusOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+11: 11 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+12: 15 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+13: 14 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+14: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+15: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x9221e48
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 6 var: SgIntVal
+5: 13 var: SgIntVal
+6: 16 var: SgIntVal
+7: 7 var: SgAssignInitializer
+8: 9 var: d
+  ..  initName:d ( 5 ) - SgNode 9
+9: 12 var: d
+10: 10 var: SgPlusPlusOp
+11: 11 var: SgExprStatement
+12: 15 var: SgExprStatement
+13: 14 var: SgAssignOp
+14: 8 var: SgVariableDeclaration
+15: 4 var: SgFunctionParameterList
+ Current Node: 0x9221e48 changed: false
+ Current Node: 0x9221e48 unhandled: true
+
+!! Worklist :  - <SgReturnStmt> return 0; :1
+
+
+------------------------------------------------------------------
+current Node: 0x92693e0  previous Node : 0x9221e48
+ ********** UNHANDLED.  This is an unhandled node SgReturnStmt
+ ---- JUSTCOPY. 0x92693e0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+5: 13 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+6: 16 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+7: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+8: 9 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+9: 12 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+10: 10 var: SgPlusPlusOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+11: 11 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+12: 15 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+13: 14 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+14: 17 var: SgReturnStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+15: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+16: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0x92693e0
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 6 var: SgIntVal
+5: 13 var: SgIntVal
+6: 16 var: SgIntVal
+7: 7 var: SgAssignInitializer
+8: 9 var: d
+  ..  initName:d ( 5 ) - SgNode 9
+9: 12 var: d
+10: 10 var: SgPlusPlusOp
+11: 11 var: SgExprStatement
+12: 15 var: SgExprStatement
+13: 14 var: SgAssignOp
+14: 17 var: SgReturnStmt
+15: 8 var: SgVariableDeclaration
+16: 4 var: SgFunctionParameterList
+ Current Node: 0x92693e0 changed: false
+ Current Node: 0x92693e0 unhandled: true
+
+!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :2
+
+
+------------------------------------------------------------------
+current Node: 0xb7df5008  previous Node : 0x92693e0
+ found global vars: 0 funEntry false
+ ********** UNHANDLED.  This is an unhandled node SgFunctionDefinition
+ ---- JUSTCOPY. 0xb7df5008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+5: 13 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+6: 16 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+7: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+8: 9 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+9: 12 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+10: 10 var: SgPlusPlusOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+11: 11 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+12: 15 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+13: 14 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+14: 17 var: SgReturnStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+15: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+16: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+17: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+ ---- JUSTCOPY. 0xb7df5008
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 6 var: SgIntVal
+5: 13 var: SgIntVal
+6: 16 var: SgIntVal
+7: 7 var: SgAssignInitializer
+8: 9 var: d
+  ..  initName:d ( 5 ) - SgNode 9
+9: 12 var: d
+10: 10 var: SgPlusPlusOp
+11: 11 var: SgExprStatement
+12: 15 var: SgExprStatement
+13: 14 var: SgAssignOp
+14: 17 var: SgReturnStmt
+15: 8 var: SgVariableDeclaration
+16: 1 var: SgFunctionDefinition
+17: 4 var: SgFunctionParameterList
+ Current Node: 0xb7df5008 changed: false
+ Current Node: 0xb7df5008 unhandled: true
+
+!! Worklist : 
+ Elements in Table: 17
+ Exiting function ::main(int, char **)
+
+Nr of nodes visited 18  of nodes : 17
+
+!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :0 - <SgInitializedName> argc :0 - <SgInitializedName> argv :0 - <SgFunctionParameterList>  :2 - <SgInitializedName> d :0 - <SgIntVal> 2 :0 - <SgAssignInitializer> 2 :1Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVariableDeclaration> int d = 2; :1Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVarRefExp> d :0Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgPlusPlusOp> d++ :1Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgExprStatement> d++; :1Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVarRefExp> d :0 - <SgIntVal> 5 :0Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgAssignOp> d = 5 :2Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgExprStatement> d = 5; :1 - <SgIntVal> 0 :0 - <SgReturnStmt> return 0; :1 - <SgFunctionDefinition> int main(int argc,ch... :2
+Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0x92037b0 = SgBasicBlock for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+FINISH: Traversal over Functions
+
+
+>>>>> Time for dfa-test: 0.08 sec
+>>>>> Total CFG nodes: 17  --  #CFG nodes visited: 18
+FINISH: DefUse Analysis True
+Analysis is : success
+  DEF>> Vector entries for argc ( 0x91673a8 ) : 1
+  DEF>> Vector entries for argv ( 0x9167400 ) : 1
+  DEF>> Vector entries for d ( 0x9167458 ) : 1
+
+DEFMAP
+
+ **************** MAP ************************** 
+1: 2 var: argc
+  ..  initName:argc ( 2 ) - SgNode 2
+2: 3 var: argv
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+3: 5 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+4: 6 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 5
+5: 13 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+6: 16 var: SgIntVal
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+7: 7 var: SgAssignInitializer
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+8: 9 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+9: 12 var: d
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+10: 10 var: SgPlusPlusOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+11: 11 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 10
+12: 15 var: SgExprStatement
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+13: 14 var: SgAssignOp
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+14: 17 var: SgReturnStmt
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+15: 8 var: SgVariableDeclaration
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 7
+16: 1 var: SgFunctionDefinition
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+  ..  initName:d ( 5 ) - SgNode 14
+17: 4 var: SgFunctionParameterList
+  ..  initName:argc ( 2 ) - SgNode 2
+  ..  initName:argv ( 3 ) - SgNode 3
+
+USEMAP
+
+ **************** MAP ************************** 
+1: 2 var: argc
+2: 3 var: argv
+3: 5 var: d
+4: 6 var: SgIntVal
+5: 13 var: SgIntVal
+6: 16 var: SgIntVal
+7: 7 var: SgAssignInitializer
+8: 9 var: d
+  ..  initName:d ( 5 ) - SgNode 9
+9: 12 var: d
+10: 10 var: SgPlusPlusOp
+11: 11 var: SgExprStatement
+12: 15 var: SgExprStatement
+13: 14 var: SgAssignOp
+14: 17 var: SgReturnStmt
+15: 8 var: SgVariableDeclaration
+16: 1 var: SgFunctionDefinition
+17: 4 var: SgFunctionParameterList

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,8 +0,0 @@
-int globalvar = 5;
-
-int main(int argc, char **argv) {
-  //  globalvar++;
-  argc++;
-  globalvar = 5;
-}
-

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,8 @@
+int globalvar = 5;
+
+int main(int argc, char **argv) {
+  //  globalvar++;
+  argc++;
+  globalvar = 5;
+}
+

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.output
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.output	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.output	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,1014 +0,0 @@
->>>> Starting ROSE frontend ... 
- >> Class name: SgFile
-
- >>> Using Information relative to other declaration: 
-
- >> File-Name: /home/panas2/development/dataflow/tests/test4.c
-Inside of propagateHiddenListData (node = 0xb7f79008 = SgFile) 
->>>> generate PDF 
->>>> start def-use analysis ... 
-START: DefUse Analysis True
-START: Finding global variables
-1 : ::globalvar ( 0x99c23a8 ) 
- Amount of global variables : 1
- -----------------------------------------------------------------*
-
-
-FINISH: Finding global variables
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-START: Traversal over Functions
-Warning: can't locate an associated SgStatement from astNode = 0x99f1238 = SgTypeInt parentNode = 0x99f1238 = SgTypeInt 
-Warning: can't locate an associated SgStatement from astNode = 0x99fd420 = SgPointerType parentNode = 0x99fd420 = SgPointerType 
- Found function ::main(int, char **)
-Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-
-
-------------------------------------------------------------------
-current Node: 0xb7e1b008  previous Node : 0
-
-
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FUNCTION %%%%%%
-
- found global vars: 1 funEntry true
-
- >> %%%%% handling globalvar: ::globalvar
- Current Node: 0xb7e1b008 changed: true
- Current Node: 0xb7e1b008 unhandled: false
-
-!! Worklist :  - <SgInitializedName> argc :0
-
-
-------------------------------------------------------------------
-current Node: 0x99c2400  previous Node : 0xb7e1b008
- **********  INITNAME. 0x99c2400
- **********  INITNAME. use  def true
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x99c2400 : SgInitializedName : argc
- ---- JUSTCOPY. 0x99c2400
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-3: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x99c2400
-
- **************** MAP ************************** 
-1: 3 var: argc
- ---- JUSTCOPY. 0x99c2400
-
- **************** MAP ************************** 
-1: 3 var: argc
-  ----- Definition. Is value contained ?  false
-  ----- NEW Definition. Adding: argc nrInEdges: 1
-  ----- changed table (one incoming) entry to 0x99c2400
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-3: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 1
- Current Node: 0x99c2400 changed: true
- Current Node: 0x99c2400 unhandled: false
-
-!! Worklist :  - <SgInitializedName> argv :0
-
-
-------------------------------------------------------------------
-current Node: 0x99c2458  previous Node : 0x99c2400
- **********  INITNAME. 0x99c2458
- **********  INITNAME. use  def true
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x99c2458 : SgInitializedName : argv
- ---- JUSTCOPY. 0x99c2458
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-3: 4 var: argv
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-4: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x99c2458
-
- **************** MAP ************************** 
-1: 3 var: argc
-2: 4 var: argv
- ---- JUSTCOPY. 0x99c2458
-
- **************** MAP ************************** 
-1: 3 var: argc
-2: 4 var: argv
-  ----- Definition. Is value contained ?  false
-  ----- NEW Definition. Adding: argv nrInEdges: 1
-  ----- changed table (one incoming) entry to 0x99c2458
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-3: 4 var: argv
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-4: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 1
- Current Node: 0x99c2458 changed: true
- Current Node: 0x99c2458 unhandled: false
-
-!! Worklist :  - <SgFunctionParameterList>  :2
-
-
-------------------------------------------------------------------
-current Node: 0xb7ee65ac  previous Node : 0x99c2458
- ********** UNHANDLED.  This is an unhandled node SgFunctionParameterList
- ---- JUSTCOPY. 0xb7ee65ac
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-3: 4 var: argv
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-4: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-5: 5 var: SgFunctionParameterList
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
- ---- JUSTCOPY. 0xb7ee65ac
-
- **************** MAP ************************** 
-1: 3 var: argc
-2: 4 var: argv
-3: 5 var: SgFunctionParameterList
- Current Node: 0xb7ee65ac changed: false
- Current Node: 0xb7ee65ac unhandled: true
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVarRefExp> argc :0
-
-
-------------------------------------------------------------------
-current Node: 0x9a96488  previous Node : 0xb7ee65ac
- **********  VARREFEXP. 0x9a96488 .. argc
- nr for that node ( argc) : 3
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x9a96488 : SgVarRefExp : argc
- ---- JUSTCOPY. 0x9a96488
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-3: 4 var: argv
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-4: 6 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-5: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-6: 5 var: SgFunctionParameterList
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x9a96488
-
- **************** MAP ************************** 
-1: 3 var: argc
-2: 4 var: argv
-3: 6 var: argc
-4: 5 var: SgFunctionParameterList
- Current Node: 0x9a96488 changed: true
- Current Node: 0x9a96488 unhandled: false
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgPlusPlusOp> argc++ :1
-
-
-------------------------------------------------------------------
-current Node: 0x9aa1070  previous Node : 0x9a96488
- **********  UNARY OP. 0x9aa1070
- UNARY OP: argc  name: 0x99c2400  varRefExp: 0x9a96488
- ... check done. 
- isGlobalVar: false
-  ----- IS USE. 0x9aa1070 : SgPlusPlusOp : argc
- ---- JUSTCOPY. 0x9aa1070
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-3: 4 var: argv
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-4: 6 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-5: 7 var: SgPlusPlusOp
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-6: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-7: 5 var: SgFunctionParameterList
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x9aa1070
-
- **************** MAP ************************** 
-1: 3 var: argc
-2: 4 var: argv
-3: 6 var: argc
-  ..  initName:argc ( 3 ) - SgNode 6
-4: 7 var: SgPlusPlusOp
-  ..  initName:argc ( 3 ) - SgNode 6
-5: 5 var: SgFunctionParameterList
- ---- JUSTCOPY. 0x9aa1070
-
- **************** MAP ************************** 
-1: 3 var: argc
-2: 4 var: argv
-3: 6 var: argc
-  ..  initName:argc ( 3 ) - SgNode 6
-4: 7 var: SgPlusPlusOp
-  ..  initName:argc ( 3 ) - SgNode 6
-5: 5 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  true
-  ----- Definition EXISTS : argc nrInEdges: 1
-  ----- changed table (one incoming)  true  dont_replace: false
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-3: 4 var: argv
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-4: 6 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-5: 7 var: SgPlusPlusOp
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-6: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-7: 5 var: SgFunctionParameterList
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
- Current Node: 0x9aa1070 changed: true
- Current Node: 0x9aa1070 unhandled: false
-
-!! Worklist : Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgExprStatement> argc++; :1
-
-
-------------------------------------------------------------------
-current Node: 0x9aadb98  previous Node : 0x9aa1070
- ********** UNHANDLED.  This is an unhandled node SgExprStatement
- ---- JUSTCOPY. 0x9aadb98
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-3: 4 var: argv
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-4: 6 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-5: 7 var: SgPlusPlusOp
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-6: 8 var: SgExprStatement
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-7: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-8: 5 var: SgFunctionParameterList
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
- ---- JUSTCOPY. 0x9aadb98
-
- **************** MAP ************************** 
-1: 3 var: argc
-2: 4 var: argv
-3: 6 var: argc
-  ..  initName:argc ( 3 ) - SgNode 6
-4: 7 var: SgPlusPlusOp
-5: 8 var: SgExprStatement
-6: 5 var: SgFunctionParameterList
- Current Node: 0x9aadb98 changed: false
- Current Node: 0x9aadb98 unhandled: true
-
-!! Worklist :  - <SgVarRefExp> globalvar :0
-
-
-------------------------------------------------------------------
-current Node: 0x9a964b4  previous Node : 0x9aadb98
- **********  VARREFEXP. 0x9a964b4 .. ::globalvar
- nr for that node ( ::globalvar) : 1
- ... check done. 
- isGlobalVar: true
-  ----- IS USE. 0x9a964b4 : SgVarRefExp : ::globalvar
- ---- JUSTCOPY. 0x9a964b4
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-3: 4 var: argv
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-4: 6 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-5: 9 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-6: 7 var: SgPlusPlusOp
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-7: 8 var: SgExprStatement
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-8: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-9: 5 var: SgFunctionParameterList
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x9a964b4
-
- **************** MAP ************************** 
-1: 3 var: argc
-2: 4 var: argv
-3: 6 var: argc
-  ..  initName:argc ( 3 ) - SgNode 6
-4: 9 var: ::globalvar
-5: 7 var: SgPlusPlusOp
-6: 8 var: SgExprStatement
-7: 5 var: SgFunctionParameterList
- **********  GLOBALVAR :  true  initName: ::globalvar
- globalVariable is containd in MultiMap ? true
- globalVariable is containd in Map ? true
- Current Node: 0x9a964b4 changed: true
- Current Node: 0x9a964b4 unhandled: false
-
-!! Worklist :  - <SgIntVal> 5 :0
-
-
-------------------------------------------------------------------
-current Node: 0x9a587d4  previous Node : 0x9a964b4
- ********** UNHANDLED.  This is an unhandled node SgIntVal
- ---- JUSTCOPY. 0x9a587d4
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-3: 4 var: argv
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-4: 10 var: SgIntVal
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-5: 6 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-6: 9 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-7: 7 var: SgPlusPlusOp
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-8: 8 var: SgExprStatement
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-9: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-10: 5 var: SgFunctionParameterList
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
- ---- JUSTCOPY. 0x9a587d4
-
- **************** MAP ************************** 
-1: 3 var: argc
-2: 4 var: argv
-3: 10 var: SgIntVal
-4: 6 var: argc
-  ..  initName:argc ( 3 ) - SgNode 6
-5: 9 var: ::globalvar
-6: 7 var: SgPlusPlusOp
-7: 8 var: SgExprStatement
-8: 5 var: SgFunctionParameterList
- Current Node: 0x9a587d4 changed: false
- Current Node: 0x9a587d4 unhandled: true
-
-!! Worklist :  - <SgAssignOp> globalvar = 5 :2
-
-
-------------------------------------------------------------------
-current Node: 0x9ab78b8  previous Node : 0x9a587d4
- **********  BINARY OP. 0x9ab78b8
- **********  BINARY OP IS_VAR_REF_EXP. 
- BINARY OP: ::globalvar  name: 0x99c23a8  varRefExp: 0x9a964b4
- ... check done. 
- isGlobalVar: true
-  ----- IS USE. 0x9ab78b8 : SgAssignOp : ::globalvar
- ---- JUSTCOPY. 0x9ab78b8
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-3: 4 var: argv
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-4: 10 var: SgIntVal
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-5: 6 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-6: 9 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-7: 7 var: SgPlusPlusOp
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-8: 8 var: SgExprStatement
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-9: 11 var: SgAssignOp
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-10: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-11: 5 var: SgFunctionParameterList
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-  ----- IS USE. CHANGED TABLE ? true
- ---- JUSTCOPY. 0x9ab78b8
-
- **************** MAP ************************** 
-1: 3 var: argc
-2: 4 var: argv
-3: 10 var: SgIntVal
-4: 6 var: argc
-  ..  initName:argc ( 3 ) - SgNode 6
-5: 9 var: ::globalvar
-6: 7 var: SgPlusPlusOp
-7: 8 var: SgExprStatement
-8: 11 var: SgAssignOp
-9: 5 var: SgFunctionParameterList
- **********  GLOBALVAR :  true  initName: ::globalvar
- globalVariable is containd in MultiMap ? true
- globalVariable is containd in Map ? true
- ---- JUSTCOPY. 0x9ab78b8
-
- **************** MAP ************************** 
-1: 3 var: argc
-2: 4 var: argv
-3: 10 var: SgIntVal
-4: 6 var: argc
-  ..  initName:argc ( 3 ) - SgNode 6
-5: 9 var: ::globalvar
-6: 7 var: SgPlusPlusOp
-7: 8 var: SgExprStatement
-8: 11 var: SgAssignOp
-9: 5 var: SgFunctionParameterList
-  ----- Definition. Is value contained ?  true
-  ----- Definition EXISTS : ::globalvar nrInEdges: 1
-  ----- changed table (one incoming)  true  dont_replace: false
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-3: 4 var: argv
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-4: 10 var: SgIntVal
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-5: 6 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-6: 9 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-7: 7 var: SgPlusPlusOp
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-8: 8 var: SgExprStatement
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-9: 11 var: SgAssignOp
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-10: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-11: 5 var: SgFunctionParameterList
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
- Current Node: 0x9ab78b8 changed: true
- Current Node: 0x9ab78b8 unhandled: false
-
-!! Worklist :  - <SgExprStatement> globalvar = 5; :1
-
-
-------------------------------------------------------------------
-current Node: 0x9aadbc0  previous Node : 0x9ab78b8
- ********** UNHANDLED.  This is an unhandled node SgExprStatement
- ---- JUSTCOPY. 0x9aadbc0
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-3: 4 var: argv
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-4: 10 var: SgIntVal
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-5: 6 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-6: 9 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-7: 7 var: SgPlusPlusOp
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-8: 8 var: SgExprStatement
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-9: 12 var: SgExprStatement
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-10: 11 var: SgAssignOp
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-11: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-12: 5 var: SgFunctionParameterList
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
- ---- JUSTCOPY. 0x9aadbc0
-
- **************** MAP ************************** 
-1: 3 var: argc
-2: 4 var: argv
-3: 10 var: SgIntVal
-4: 6 var: argc
-  ..  initName:argc ( 3 ) - SgNode 6
-5: 9 var: ::globalvar
-6: 7 var: SgPlusPlusOp
-7: 8 var: SgExprStatement
-8: 12 var: SgExprStatement
-9: 11 var: SgAssignOp
-10: 5 var: SgFunctionParameterList
- Current Node: 0x9aadbc0 changed: false
- Current Node: 0x9aadbc0 unhandled: true
-
-!! Worklist :  - <SgIntVal> 0 :0
-
-
-------------------------------------------------------------------
-current Node: 0x9a58808  previous Node : 0x9aadbc0
- ********** UNHANDLED.  This is an unhandled node SgIntVal
- ---- JUSTCOPY. 0x9a58808
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-3: 4 var: argv
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-4: 10 var: SgIntVal
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-5: 13 var: SgIntVal
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-6: 6 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-7: 9 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-8: 7 var: SgPlusPlusOp
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-9: 8 var: SgExprStatement
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-10: 12 var: SgExprStatement
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-11: 11 var: SgAssignOp
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-12: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-13: 5 var: SgFunctionParameterList
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
- ---- JUSTCOPY. 0x9a58808
-
- **************** MAP ************************** 
-1: 3 var: argc
-2: 4 var: argv
-3: 10 var: SgIntVal
-4: 13 var: SgIntVal
-5: 6 var: argc
-  ..  initName:argc ( 3 ) - SgNode 6
-6: 9 var: ::globalvar
-7: 7 var: SgPlusPlusOp
-8: 8 var: SgExprStatement
-9: 12 var: SgExprStatement
-10: 11 var: SgAssignOp
-11: 5 var: SgFunctionParameterList
- Current Node: 0x9a58808 changed: false
- Current Node: 0x9a58808 unhandled: true
-
-!! Worklist :  - <SgReturnStmt> return 0; :1
-
-
-------------------------------------------------------------------
-current Node: 0x9ac43e0  previous Node : 0x9a58808
- ********** UNHANDLED.  This is an unhandled node SgReturnStmt
- ---- JUSTCOPY. 0x9ac43e0
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-3: 4 var: argv
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-4: 10 var: SgIntVal
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-5: 13 var: SgIntVal
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-6: 6 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-7: 9 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-8: 7 var: SgPlusPlusOp
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-9: 8 var: SgExprStatement
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-10: 12 var: SgExprStatement
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-11: 11 var: SgAssignOp
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-12: 14 var: SgReturnStmt
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-13: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-14: 5 var: SgFunctionParameterList
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
- ---- JUSTCOPY. 0x9ac43e0
-
- **************** MAP ************************** 
-1: 3 var: argc
-2: 4 var: argv
-3: 10 var: SgIntVal
-4: 13 var: SgIntVal
-5: 6 var: argc
-  ..  initName:argc ( 3 ) - SgNode 6
-6: 9 var: ::globalvar
-7: 7 var: SgPlusPlusOp
-8: 8 var: SgExprStatement
-9: 12 var: SgExprStatement
-10: 11 var: SgAssignOp
-11: 14 var: SgReturnStmt
-12: 5 var: SgFunctionParameterList
- Current Node: 0x9ac43e0 changed: false
- Current Node: 0x9ac43e0 unhandled: true
-
-!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :2
-
-
-------------------------------------------------------------------
-current Node: 0xb7e1b008  previous Node : 0x9ac43e0
- found global vars: 1 funEntry false
- ********** UNHANDLED.  This is an unhandled node SgFunctionDefinition
- ---- JUSTCOPY. 0xb7e1b008
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-3: 4 var: argv
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-4: 10 var: SgIntVal
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-5: 13 var: SgIntVal
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-6: 6 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-7: 9 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-8: 7 var: SgPlusPlusOp
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-9: 8 var: SgExprStatement
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-10: 12 var: SgExprStatement
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-11: 11 var: SgAssignOp
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-12: 14 var: SgReturnStmt
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-13: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-14: 5 var: SgFunctionParameterList
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
- ---- JUSTCOPY. 0xb7e1b008
-
- **************** MAP ************************** 
-1: 3 var: argc
-2: 4 var: argv
-3: 10 var: SgIntVal
-4: 13 var: SgIntVal
-5: 6 var: argc
-  ..  initName:argc ( 3 ) - SgNode 6
-6: 9 var: ::globalvar
-7: 7 var: SgPlusPlusOp
-8: 8 var: SgExprStatement
-9: 12 var: SgExprStatement
-10: 11 var: SgAssignOp
-11: 14 var: SgReturnStmt
-12: 2 var: SgFunctionDefinition
-13: 5 var: SgFunctionParameterList
- Current Node: 0xb7e1b008 changed: false
- Current Node: 0xb7e1b008 unhandled: true
-
-!! Worklist : 
- Elements in Table: 14
- Exiting function ::main(int, char **)
-
-Nr of nodes visited 14  of nodes : 14
-
-!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :0 - <SgInitializedName> argc :0 - <SgInitializedName> argv :0 - <SgFunctionParameterList>  :2Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgVarRefExp> argc :0Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgPlusPlusOp> argc++ :1Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
- - <SgExprStatement> argc++; :1 - <SgVarRefExp> globalvar :0 - <SgIntVal> 5 :0 - <SgAssignOp> globalvar = 5 :2 - <SgExprStatement> globalvar = 5; :1 - <SgIntVal> 0 :0 - <SgReturnStmt> return 0; :1 - <SgFunctionDefinition> int main(int argc,ch... :2
-Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
-FINISH: Traversal over Functions
-
-
->>>>> Time for dfa-test: 0.07 sec
->>>>> Total CFG nodes: 14  --  #CFG nodes visited: 14
-FINISH: DefUse Analysis True
-Analysis is : success
-  DEF>> Vector entries for ::globalvar ( 0x99c23a8 ) : 2
-  DEF>> Vector entries for argc ( 0x99c2400 ) : 1
-  DEF>> Vector entries for argv ( 0x99c2458 ) : 1
-
-DEFMAP
-
- **************** MAP ************************** 
-1: 1 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-2: 3 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-3: 4 var: argv
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-4: 10 var: SgIntVal
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-5: 13 var: SgIntVal
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-6: 6 var: argc
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-7: 9 var: ::globalvar
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-8: 7 var: SgPlusPlusOp
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-9: 8 var: SgExprStatement
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-10: 12 var: SgExprStatement
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-11: 11 var: SgAssignOp
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-12: 14 var: SgReturnStmt
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-13: 2 var: SgFunctionDefinition
-  ..  initName:::globalvar ( 1 ) - SgNode 11
-  ..  initName:argc ( 3 ) - SgNode 7
-  ..  initName:argv ( 4 ) - SgNode 4
-14: 5 var: SgFunctionParameterList
-  ..  initName:::globalvar ( 1 ) - SgNode 1
-  ..  initName:argc ( 3 ) - SgNode 3
-  ..  initName:argv ( 4 ) - SgNode 4
-
-USEMAP
-
- **************** MAP ************************** 
-1: 3 var: argc
-2: 4 var: argv
-3: 10 var: SgIntVal
-4: 13 var: SgIntVal
-5: 6 var: argc
-  ..  initName:argc ( 3 ) - SgNode 6
-6: 9 var: ::globalvar
-7: 7 var: SgPlusPlusOp
-8: 8 var: SgExprStatement
-9: 12 var: SgExprStatement
-10: 11 var: SgAssignOp
-11: 14 var: SgReturnStmt
-12: 2 var: SgFunctionDefinition
-13: 5 var: SgFunctionParameterList

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.output (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.output)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.output	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test4.output	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,1014 @@
+>>>> Starting ROSE frontend ... 
+ >> Class name: SgFile
+
+ >>> Using Information relative to other declaration: 
+
+ >> File-Name: /home/panas2/development/dataflow/tests/test4.c
+Inside of propagateHiddenListData (node = 0xb7f79008 = SgFile) 
+>>>> generate PDF 
+>>>> start def-use analysis ... 
+START: DefUse Analysis True
+START: Finding global variables
+1 : ::globalvar ( 0x99c23a8 ) 
+ Amount of global variables : 1
+ -----------------------------------------------------------------*
+
+
+FINISH: Finding global variables
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+START: Traversal over Functions
+Warning: can't locate an associated SgStatement from astNode = 0x99f1238 = SgTypeInt parentNode = 0x99f1238 = SgTypeInt 
+Warning: can't locate an associated SgStatement from astNode = 0x99fd420 = SgPointerType parentNode = 0x99fd420 = SgPointerType 
+ Found function ::main(int, char **)
+Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+
+
+------------------------------------------------------------------
+current Node: 0xb7e1b008  previous Node : 0
+
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FUNCTION %%%%%%
+
+ found global vars: 1 funEntry true
+
+ >> %%%%% handling globalvar: ::globalvar
+ Current Node: 0xb7e1b008 changed: true
+ Current Node: 0xb7e1b008 unhandled: false
+
+!! Worklist :  - <SgInitializedName> argc :0
+
+
+------------------------------------------------------------------
+current Node: 0x99c2400  previous Node : 0xb7e1b008
+ **********  INITNAME. 0x99c2400
+ **********  INITNAME. use  def true
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x99c2400 : SgInitializedName : argc
+ ---- JUSTCOPY. 0x99c2400
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+3: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x99c2400
+
+ **************** MAP ************************** 
+1: 3 var: argc
+ ---- JUSTCOPY. 0x99c2400
+
+ **************** MAP ************************** 
+1: 3 var: argc
+  ----- Definition. Is value contained ?  false
+  ----- NEW Definition. Adding: argc nrInEdges: 1
+  ----- changed table (one incoming) entry to 0x99c2400
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+3: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+ Current Node: 0x99c2400 changed: true
+ Current Node: 0x99c2400 unhandled: false
+
+!! Worklist :  - <SgInitializedName> argv :0
+
+
+------------------------------------------------------------------
+current Node: 0x99c2458  previous Node : 0x99c2400
+ **********  INITNAME. 0x99c2458
+ **********  INITNAME. use  def true
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x99c2458 : SgInitializedName : argv
+ ---- JUSTCOPY. 0x99c2458
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+3: 4 var: argv
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+4: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x99c2458
+
+ **************** MAP ************************** 
+1: 3 var: argc
+2: 4 var: argv
+ ---- JUSTCOPY. 0x99c2458
+
+ **************** MAP ************************** 
+1: 3 var: argc
+2: 4 var: argv
+  ----- Definition. Is value contained ?  false
+  ----- NEW Definition. Adding: argv nrInEdges: 1
+  ----- changed table (one incoming) entry to 0x99c2458
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+3: 4 var: argv
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+4: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+ Current Node: 0x99c2458 changed: true
+ Current Node: 0x99c2458 unhandled: false
+
+!! Worklist :  - <SgFunctionParameterList>  :2
+
+
+------------------------------------------------------------------
+current Node: 0xb7ee65ac  previous Node : 0x99c2458
+ ********** UNHANDLED.  This is an unhandled node SgFunctionParameterList
+ ---- JUSTCOPY. 0xb7ee65ac
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+3: 4 var: argv
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+4: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+5: 5 var: SgFunctionParameterList
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+ ---- JUSTCOPY. 0xb7ee65ac
+
+ **************** MAP ************************** 
+1: 3 var: argc
+2: 4 var: argv
+3: 5 var: SgFunctionParameterList
+ Current Node: 0xb7ee65ac changed: false
+ Current Node: 0xb7ee65ac unhandled: true
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVarRefExp> argc :0
+
+
+------------------------------------------------------------------
+current Node: 0x9a96488  previous Node : 0xb7ee65ac
+ **********  VARREFEXP. 0x9a96488 .. argc
+ nr for that node ( argc) : 3
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x9a96488 : SgVarRefExp : argc
+ ---- JUSTCOPY. 0x9a96488
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+3: 4 var: argv
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+4: 6 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+5: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+6: 5 var: SgFunctionParameterList
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x9a96488
+
+ **************** MAP ************************** 
+1: 3 var: argc
+2: 4 var: argv
+3: 6 var: argc
+4: 5 var: SgFunctionParameterList
+ Current Node: 0x9a96488 changed: true
+ Current Node: 0x9a96488 unhandled: false
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgPlusPlusOp> argc++ :1
+
+
+------------------------------------------------------------------
+current Node: 0x9aa1070  previous Node : 0x9a96488
+ **********  UNARY OP. 0x9aa1070
+ UNARY OP: argc  name: 0x99c2400  varRefExp: 0x9a96488
+ ... check done. 
+ isGlobalVar: false
+  ----- IS USE. 0x9aa1070 : SgPlusPlusOp : argc
+ ---- JUSTCOPY. 0x9aa1070
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+3: 4 var: argv
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+4: 6 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+5: 7 var: SgPlusPlusOp
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+6: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+7: 5 var: SgFunctionParameterList
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x9aa1070
+
+ **************** MAP ************************** 
+1: 3 var: argc
+2: 4 var: argv
+3: 6 var: argc
+  ..  initName:argc ( 3 ) - SgNode 6
+4: 7 var: SgPlusPlusOp
+  ..  initName:argc ( 3 ) - SgNode 6
+5: 5 var: SgFunctionParameterList
+ ---- JUSTCOPY. 0x9aa1070
+
+ **************** MAP ************************** 
+1: 3 var: argc
+2: 4 var: argv
+3: 6 var: argc
+  ..  initName:argc ( 3 ) - SgNode 6
+4: 7 var: SgPlusPlusOp
+  ..  initName:argc ( 3 ) - SgNode 6
+5: 5 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  true
+  ----- Definition EXISTS : argc nrInEdges: 1
+  ----- changed table (one incoming)  true  dont_replace: false
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+3: 4 var: argv
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+4: 6 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+5: 7 var: SgPlusPlusOp
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+6: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+7: 5 var: SgFunctionParameterList
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+ Current Node: 0x9aa1070 changed: true
+ Current Node: 0x9aa1070 unhandled: false
+
+!! Worklist : Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgExprStatement> argc++; :1
+
+
+------------------------------------------------------------------
+current Node: 0x9aadb98  previous Node : 0x9aa1070
+ ********** UNHANDLED.  This is an unhandled node SgExprStatement
+ ---- JUSTCOPY. 0x9aadb98
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+3: 4 var: argv
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+4: 6 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+5: 7 var: SgPlusPlusOp
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+6: 8 var: SgExprStatement
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+7: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+8: 5 var: SgFunctionParameterList
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+ ---- JUSTCOPY. 0x9aadb98
+
+ **************** MAP ************************** 
+1: 3 var: argc
+2: 4 var: argv
+3: 6 var: argc
+  ..  initName:argc ( 3 ) - SgNode 6
+4: 7 var: SgPlusPlusOp
+5: 8 var: SgExprStatement
+6: 5 var: SgFunctionParameterList
+ Current Node: 0x9aadb98 changed: false
+ Current Node: 0x9aadb98 unhandled: true
+
+!! Worklist :  - <SgVarRefExp> globalvar :0
+
+
+------------------------------------------------------------------
+current Node: 0x9a964b4  previous Node : 0x9aadb98
+ **********  VARREFEXP. 0x9a964b4 .. ::globalvar
+ nr for that node ( ::globalvar) : 1
+ ... check done. 
+ isGlobalVar: true
+  ----- IS USE. 0x9a964b4 : SgVarRefExp : ::globalvar
+ ---- JUSTCOPY. 0x9a964b4
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+3: 4 var: argv
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+4: 6 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+5: 9 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+6: 7 var: SgPlusPlusOp
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+7: 8 var: SgExprStatement
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+8: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+9: 5 var: SgFunctionParameterList
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x9a964b4
+
+ **************** MAP ************************** 
+1: 3 var: argc
+2: 4 var: argv
+3: 6 var: argc
+  ..  initName:argc ( 3 ) - SgNode 6
+4: 9 var: ::globalvar
+5: 7 var: SgPlusPlusOp
+6: 8 var: SgExprStatement
+7: 5 var: SgFunctionParameterList
+ **********  GLOBALVAR :  true  initName: ::globalvar
+ globalVariable is containd in MultiMap ? true
+ globalVariable is containd in Map ? true
+ Current Node: 0x9a964b4 changed: true
+ Current Node: 0x9a964b4 unhandled: false
+
+!! Worklist :  - <SgIntVal> 5 :0
+
+
+------------------------------------------------------------------
+current Node: 0x9a587d4  previous Node : 0x9a964b4
+ ********** UNHANDLED.  This is an unhandled node SgIntVal
+ ---- JUSTCOPY. 0x9a587d4
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+3: 4 var: argv
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+4: 10 var: SgIntVal
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+5: 6 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+6: 9 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+7: 7 var: SgPlusPlusOp
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+8: 8 var: SgExprStatement
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+9: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+10: 5 var: SgFunctionParameterList
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+ ---- JUSTCOPY. 0x9a587d4
+
+ **************** MAP ************************** 
+1: 3 var: argc
+2: 4 var: argv
+3: 10 var: SgIntVal
+4: 6 var: argc
+  ..  initName:argc ( 3 ) - SgNode 6
+5: 9 var: ::globalvar
+6: 7 var: SgPlusPlusOp
+7: 8 var: SgExprStatement
+8: 5 var: SgFunctionParameterList
+ Current Node: 0x9a587d4 changed: false
+ Current Node: 0x9a587d4 unhandled: true
+
+!! Worklist :  - <SgAssignOp> globalvar = 5 :2
+
+
+------------------------------------------------------------------
+current Node: 0x9ab78b8  previous Node : 0x9a587d4
+ **********  BINARY OP. 0x9ab78b8
+ **********  BINARY OP IS_VAR_REF_EXP. 
+ BINARY OP: ::globalvar  name: 0x99c23a8  varRefExp: 0x9a964b4
+ ... check done. 
+ isGlobalVar: true
+  ----- IS USE. 0x9ab78b8 : SgAssignOp : ::globalvar
+ ---- JUSTCOPY. 0x9ab78b8
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+3: 4 var: argv
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+4: 10 var: SgIntVal
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+5: 6 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+6: 9 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+7: 7 var: SgPlusPlusOp
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+8: 8 var: SgExprStatement
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+9: 11 var: SgAssignOp
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+10: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+11: 5 var: SgFunctionParameterList
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+  ----- IS USE. CHANGED TABLE ? true
+ ---- JUSTCOPY. 0x9ab78b8
+
+ **************** MAP ************************** 
+1: 3 var: argc
+2: 4 var: argv
+3: 10 var: SgIntVal
+4: 6 var: argc
+  ..  initName:argc ( 3 ) - SgNode 6
+5: 9 var: ::globalvar
+6: 7 var: SgPlusPlusOp
+7: 8 var: SgExprStatement
+8: 11 var: SgAssignOp
+9: 5 var: SgFunctionParameterList
+ **********  GLOBALVAR :  true  initName: ::globalvar
+ globalVariable is containd in MultiMap ? true
+ globalVariable is containd in Map ? true
+ ---- JUSTCOPY. 0x9ab78b8
+
+ **************** MAP ************************** 
+1: 3 var: argc
+2: 4 var: argv
+3: 10 var: SgIntVal
+4: 6 var: argc
+  ..  initName:argc ( 3 ) - SgNode 6
+5: 9 var: ::globalvar
+6: 7 var: SgPlusPlusOp
+7: 8 var: SgExprStatement
+8: 11 var: SgAssignOp
+9: 5 var: SgFunctionParameterList
+  ----- Definition. Is value contained ?  true
+  ----- Definition EXISTS : ::globalvar nrInEdges: 1
+  ----- changed table (one incoming)  true  dont_replace: false
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+3: 4 var: argv
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+4: 10 var: SgIntVal
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+5: 6 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+6: 9 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+7: 7 var: SgPlusPlusOp
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+8: 8 var: SgExprStatement
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+9: 11 var: SgAssignOp
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+10: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+11: 5 var: SgFunctionParameterList
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+ Current Node: 0x9ab78b8 changed: true
+ Current Node: 0x9ab78b8 unhandled: false
+
+!! Worklist :  - <SgExprStatement> globalvar = 5; :1
+
+
+------------------------------------------------------------------
+current Node: 0x9aadbc0  previous Node : 0x9ab78b8
+ ********** UNHANDLED.  This is an unhandled node SgExprStatement
+ ---- JUSTCOPY. 0x9aadbc0
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+3: 4 var: argv
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+4: 10 var: SgIntVal
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+5: 6 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+6: 9 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+7: 7 var: SgPlusPlusOp
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+8: 8 var: SgExprStatement
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+9: 12 var: SgExprStatement
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+10: 11 var: SgAssignOp
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+11: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+12: 5 var: SgFunctionParameterList
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+ ---- JUSTCOPY. 0x9aadbc0
+
+ **************** MAP ************************** 
+1: 3 var: argc
+2: 4 var: argv
+3: 10 var: SgIntVal
+4: 6 var: argc
+  ..  initName:argc ( 3 ) - SgNode 6
+5: 9 var: ::globalvar
+6: 7 var: SgPlusPlusOp
+7: 8 var: SgExprStatement
+8: 12 var: SgExprStatement
+9: 11 var: SgAssignOp
+10: 5 var: SgFunctionParameterList
+ Current Node: 0x9aadbc0 changed: false
+ Current Node: 0x9aadbc0 unhandled: true
+
+!! Worklist :  - <SgIntVal> 0 :0
+
+
+------------------------------------------------------------------
+current Node: 0x9a58808  previous Node : 0x9aadbc0
+ ********** UNHANDLED.  This is an unhandled node SgIntVal
+ ---- JUSTCOPY. 0x9a58808
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+3: 4 var: argv
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+4: 10 var: SgIntVal
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+5: 13 var: SgIntVal
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+6: 6 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+7: 9 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+8: 7 var: SgPlusPlusOp
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+9: 8 var: SgExprStatement
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+10: 12 var: SgExprStatement
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+11: 11 var: SgAssignOp
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+12: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+13: 5 var: SgFunctionParameterList
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+ ---- JUSTCOPY. 0x9a58808
+
+ **************** MAP ************************** 
+1: 3 var: argc
+2: 4 var: argv
+3: 10 var: SgIntVal
+4: 13 var: SgIntVal
+5: 6 var: argc
+  ..  initName:argc ( 3 ) - SgNode 6
+6: 9 var: ::globalvar
+7: 7 var: SgPlusPlusOp
+8: 8 var: SgExprStatement
+9: 12 var: SgExprStatement
+10: 11 var: SgAssignOp
+11: 5 var: SgFunctionParameterList
+ Current Node: 0x9a58808 changed: false
+ Current Node: 0x9a58808 unhandled: true
+
+!! Worklist :  - <SgReturnStmt> return 0; :1
+
+
+------------------------------------------------------------------
+current Node: 0x9ac43e0  previous Node : 0x9a58808
+ ********** UNHANDLED.  This is an unhandled node SgReturnStmt
+ ---- JUSTCOPY. 0x9ac43e0
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+3: 4 var: argv
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+4: 10 var: SgIntVal
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+5: 13 var: SgIntVal
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+6: 6 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+7: 9 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+8: 7 var: SgPlusPlusOp
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+9: 8 var: SgExprStatement
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+10: 12 var: SgExprStatement
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+11: 11 var: SgAssignOp
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+12: 14 var: SgReturnStmt
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+13: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+14: 5 var: SgFunctionParameterList
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+ ---- JUSTCOPY. 0x9ac43e0
+
+ **************** MAP ************************** 
+1: 3 var: argc
+2: 4 var: argv
+3: 10 var: SgIntVal
+4: 13 var: SgIntVal
+5: 6 var: argc
+  ..  initName:argc ( 3 ) - SgNode 6
+6: 9 var: ::globalvar
+7: 7 var: SgPlusPlusOp
+8: 8 var: SgExprStatement
+9: 12 var: SgExprStatement
+10: 11 var: SgAssignOp
+11: 14 var: SgReturnStmt
+12: 5 var: SgFunctionParameterList
+ Current Node: 0x9ac43e0 changed: false
+ Current Node: 0x9ac43e0 unhandled: true
+
+!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :2
+
+
+------------------------------------------------------------------
+current Node: 0xb7e1b008  previous Node : 0x9ac43e0
+ found global vars: 1 funEntry false
+ ********** UNHANDLED.  This is an unhandled node SgFunctionDefinition
+ ---- JUSTCOPY. 0xb7e1b008
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+3: 4 var: argv
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+4: 10 var: SgIntVal
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+5: 13 var: SgIntVal
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+6: 6 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+7: 9 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+8: 7 var: SgPlusPlusOp
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+9: 8 var: SgExprStatement
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+10: 12 var: SgExprStatement
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+11: 11 var: SgAssignOp
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+12: 14 var: SgReturnStmt
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+13: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+14: 5 var: SgFunctionParameterList
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+ ---- JUSTCOPY. 0xb7e1b008
+
+ **************** MAP ************************** 
+1: 3 var: argc
+2: 4 var: argv
+3: 10 var: SgIntVal
+4: 13 var: SgIntVal
+5: 6 var: argc
+  ..  initName:argc ( 3 ) - SgNode 6
+6: 9 var: ::globalvar
+7: 7 var: SgPlusPlusOp
+8: 8 var: SgExprStatement
+9: 12 var: SgExprStatement
+10: 11 var: SgAssignOp
+11: 14 var: SgReturnStmt
+12: 2 var: SgFunctionDefinition
+13: 5 var: SgFunctionParameterList
+ Current Node: 0xb7e1b008 changed: false
+ Current Node: 0xb7e1b008 unhandled: true
+
+!! Worklist : 
+ Elements in Table: 14
+ Exiting function ::main(int, char **)
+
+Nr of nodes visited 14  of nodes : 14
+
+!! Worklist :  - <SgFunctionDefinition> int main(int argc,ch... :0 - <SgInitializedName> argc :0 - <SgInitializedName> argv :0 - <SgFunctionParameterList>  :2Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgVarRefExp> argc :0Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgPlusPlusOp> argc++ :1Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+ - <SgExprStatement> argc++; :1 - <SgVarRefExp> globalvar :0 - <SgIntVal> 5 :0 - <SgAssignOp> globalvar = 5 :2 - <SgExprStatement> globalvar = 5; :1 - <SgIntVal> 0 :0 - <SgReturnStmt> return 0; :1 - <SgFunctionDefinition> int main(int argc,ch... :2
+Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+Warning: specification of a input SgScopeStatement = 0xb7e1b008 = SgFunctionDefinition for which inputScope->supportsDefiningFunctionDeclaration() == false (return)
+FINISH: Traversal over Functions
+
+
+>>>>> Time for dfa-test: 0.07 sec
+>>>>> Total CFG nodes: 14  --  #CFG nodes visited: 14
+FINISH: DefUse Analysis True
+Analysis is : success
+  DEF>> Vector entries for ::globalvar ( 0x99c23a8 ) : 2
+  DEF>> Vector entries for argc ( 0x99c2400 ) : 1
+  DEF>> Vector entries for argv ( 0x99c2458 ) : 1
+
+DEFMAP
+
+ **************** MAP ************************** 
+1: 1 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+2: 3 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+3: 4 var: argv
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+4: 10 var: SgIntVal
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+5: 13 var: SgIntVal
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+6: 6 var: argc
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+7: 9 var: ::globalvar
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+8: 7 var: SgPlusPlusOp
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+9: 8 var: SgExprStatement
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+10: 12 var: SgExprStatement
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+11: 11 var: SgAssignOp
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+12: 14 var: SgReturnStmt
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+13: 2 var: SgFunctionDefinition
+  ..  initName:::globalvar ( 1 ) - SgNode 11
+  ..  initName:argc ( 3 ) - SgNode 7
+  ..  initName:argv ( 4 ) - SgNode 4
+14: 5 var: SgFunctionParameterList
+  ..  initName:::globalvar ( 1 ) - SgNode 1
+  ..  initName:argc ( 3 ) - SgNode 3
+  ..  initName:argv ( 4 ) - SgNode 4
+
+USEMAP
+
+ **************** MAP ************************** 
+1: 3 var: argc
+2: 4 var: argv
+3: 10 var: SgIntVal
+4: 13 var: SgIntVal
+5: 6 var: argc
+  ..  initName:argc ( 3 ) - SgNode 6
+6: 9 var: ::globalvar
+7: 7 var: SgPlusPlusOp
+8: 8 var: SgExprStatement
+9: 12 var: SgExprStatement
+10: 11 var: SgAssignOp
+11: 14 var: SgReturnStmt
+12: 2 var: SgFunctionDefinition
+13: 5 var: SgFunctionParameterList

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test5.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test5.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test5.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,6 +0,0 @@
-int main(int argc, char **argv) {
-  int x;
-  x = 5;
-  int y = x * 2;
-}
-

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test5.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test5.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test5.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test5.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,6 @@
+int main(int argc, char **argv) {
+  int x;
+  x = 5;
+  int y = x * 2;
+}
+

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test6.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test6.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test6.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,10 +0,0 @@
-
-int main(int argc, char **argv) {
-  int x, z=0;
-  x = 5;
-  while (x!=0) {
-    z = x--;
-  }
-  return z;
-}
-

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test6.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test6.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test6.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test6.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,10 @@
+
+int main(int argc, char **argv) {
+  int x, z=0;
+  x = 5;
+  while (x!=0) {
+    z = x--;
+  }
+  return z;
+}
+

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test7.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test7.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test7.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,9 +0,0 @@
-
-int main(int argc,char ** argv)
-{
-  int i;
-  while(i<10) {
-    i++;
-  }
-  return i;
-}

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test7.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test7.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test7.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test7.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,9 @@
+
+int main(int argc,char ** argv)
+{
+  int i;
+  while(i<10) {
+    i++;
+  }
+  return i;
+}

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test8.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test8.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test8.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,11 +0,0 @@
-
-int main()
-{
-  int i=0;
-  int* p;
- for (i=0;i<10;i++)
- {
-   int x = i;
-   *p = x;
- }
-} 

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test8.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test8.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test8.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test8.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,11 @@
+
+int main()
+{
+  int i=0;
+  int* p;
+ for (i=0;i<10;i++)
+ {
+   int x = i;
+   *p = x;
+ }
+} 

Deleted: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test9.C
===================================================================
--- trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test9.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test9.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -1,9 +0,0 @@
-int main()
-{
- int array[10];
- int i=0;
- for (i=0;i<10;i++)
- {
-   array[i]=i+1;
- }
-} 

Copied: branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test9.C (from rev 128, trunk/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test9.C)
===================================================================
--- branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test9.C	                        (rev 0)
+++ branches/testonly/tests/roseTests/programAnalysisTests/variableLivenessTests/tests/test9.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,9 @@
+int main()
+{
+ int array[10];
+ int i=0;
+ for (i=0;i<10;i++)
+ {
+   array[i]=i+1;
+ }
+} 

Modified: branches/testonly/tests/roseTests/programTransformationTests/finiteDifferencingDemo.C
===================================================================
--- branches/testonly/tests/roseTests/programTransformationTests/finiteDifferencingDemo.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tests/roseTests/programTransformationTests/finiteDifferencingDemo.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -29,7 +29,7 @@
 
 vector<SgFunctionDefinition*> functions;
 
-class FindFunctionsVisitor: public AstSimpleProcessing {
+class FindFunctionsVis: public AstSimpleProcessing {
   public:
   virtual void visit(SgNode* n) {
     if (isSgFunctionDefinition(n)) {
@@ -53,7 +53,7 @@
   sageProject = isSgProject(tempProject);
   ROSE_ASSERT (sageProject);
 
-  FindFunctionsVisitor().traverse(sageProject, preorder);
+  FindFunctionsVis().traverse(sageProject, preorder);
 
   for (unsigned int x = 0; x < functions.size(); ++x) {
     SgBasicBlock* body = functions[x]->get_body();

Modified: branches/testonly/tutorial/Makefile.am
===================================================================
--- branches/testonly/tutorial/Makefile.am	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tutorial/Makefile.am	2008-11-18 06:54:05 UTC (rev 129)
@@ -60,6 +60,8 @@
    debuggingIRnodeToString \
    debuggingSourceCodePositionInformation \
    defuseAnalysis \
+   dwarfAnalysis \
+   dwarfInstructionAddressToSourceLineAnalysis \
    runtimeCheck \
    generatingUniqueNamesFromDeclaration \
    graphGenerationOfSubtree \
@@ -221,6 +223,10 @@
 
 dataBaseUsage_SOURCES = dataBaseUsage.C
 
+dwarfAnalysis_SOURCES = dwarfAnalysis.C
+
+dwarfInstructionAddressToSourceLineAnalysis_SOURCES = dwarfInstructionAddressToSourceLineAnalysis.C
+
 loopNestingInfoProcessing_SOURCES = loopNestingInfoProcessing.C
 
 tauInstrumenter_SOURCES = tauInstrumenter.C
@@ -597,7 +603,24 @@
 testVolatileTypeModifier: volatileTypeModifier
 	./volatileTypeModifier -rose:verbose 0 -c $(srcdir)/inputCode_volatileTypeModifier.C
 
+inputCode_dwarfAnalysis:
+	g++ -g3 -o inputCode_dwarfAnalysis $(srcdir)/inputCode_dwarfAnalysis.C
 
+testDwarfAnalysis: dwarfAnalysis inputCode_dwarfAnalysis 
+# Note: different stages of AST representation and visualization.
+#	./dwarfAnalysis -c $(srcdir)/inputCode_dwarfAnalysis.C
+#	./dwarfAnalysis -rose:visualize_dwarf_only inputCode_dwarfAnalysis
+#	./dwarfAnalysis -rose:visualize_executable_file_format_skip_symbols inputCode_dwarfAnalysis
+#	./dwarfAnalysis -rose:read_executable_file_format_only inputCode_dwarfAnalysis
+#	./dwarfAnalysis -rose:read_executable_file_format_only -rose:visualize_executable_file_format_skip_symbols inputCode_dwarfAnalysis
+	./dwarfAnalysis -rose:visualize_dwarf_only -rose:read_executable_file_format_only inputCode_dwarfAnalysis
+
+testDwarfInstructionAddressToSourceLineAnalysis: dwarfInstructionAddressToSourceLineAnalysis inputCode_dwarfAnalysis
+#	./dwarfAnalysis -rose:verbose 0 -c $(srcdir)/inputCode_dwarfAnalysis.C
+#	./dwarfInstructionAddressToSourceLineAnalysis -rose:visualize_dwarf_only inputCode_dwarfAnalysis
+	./dwarfInstructionAddressToSourceLineAnalysis inputCode_dwarfAnalysis
+
+
 # #####################################
 # Output files use in tutorial
 # #####################################
@@ -692,7 +715,9 @@
    rose_input_runtimeErrorCheck.C \
    rose_input_runtimeErrorCheck2.C \
    rose_inputCode_seedBugsExample_arrayIndexing.C \
-   rose_inputCode_VolatileTypeModifier.C
+   rose_inputCode_VolatileTypeModifier.C \
+   inputCode_dwarfAnalysis.pdf \
+   inputCode_dwarfAnalysis.out
 
 # #####################################
 # Output file generation rules
@@ -1128,6 +1153,15 @@
 rose_inputCode_VolatileTypeModifier.C: volatileTypeModifier
 	./volatileTypeModifier $(ROSE_FLAGS) -c $(srcdir)/inputCode_VolatileTypeModifier.C
 
+inputCode_dwarfAnalysis.pdf: dwarfAnalysis inputCode_dwarfAnalysis
+	./dwarfAnalysis -rose:visualize_dwarf_only -rose:read_executable_file_format_only inputCode_dwarfAnalysis
+	$(top_srcdir)/scripts/dotgenLetterPDF inputCode_dwarfAnalysis.dot inputCode_dwarfAnalysis.pdf
+
+inputCode_dwarfAnalysis.out: dwarfInstructionAddressToSourceLineAnalysis inputCode_dwarfAnalysis
+	./dwarfInstructionAddressToSourceLineAnalysis inputCode_dwarfAnalysis > inputCode_dwarfAnalysis.out
+
+
+
 # Note that we have made multiple copies of "inputCode_ExampleTraversals.C"
 # so that the processing could be done in parallel with out collisions.
 EXTRA_DIST = \
@@ -1220,8 +1254,10 @@
    inputCode_addStruct.C \
    rose_bin_example_backup.s \
    buffer2.bin \
-   inputCode_seedBugsExample_arrayIndexing.C
+   inputCode_seedBugsExample_arrayIndexing.C \
+   inputCode_dwarfAnalysis.C
 
+
 # disabled this one due to problem with copy mechanism, Liao
 #   inputCode_varSubstCopy.C 
 
@@ -1242,7 +1278,10 @@
 cleanDocs:
 #	This can not be called after make distclean (by make distcheck)
 #	cd outliner; $(MAKE) cleanDocs
-	rm -f rose_*.C rose_*.cpp *.out *.a[a-l] *.dot *.ps *.pdf *.trace *.binaryAST ExampleCodeCoverage_GeneratedBinary test_runtimeCheck* output_runtimeCheck* inputCode_AST_PDF_Generator.C
+	rm -f rose_*.C rose_*.cpp *.out *.a[a-l] *.dot *.ps *.pdf *.trace *.binaryAST 
+	rm -f ExampleCodeCoverage_GeneratedBinary test_runtimeCheck* output_runtimeCheck* 
+	rm -f inputCode_AST_PDF_Generator.C 
+	rm -f rose_inputCode_dwarfAnalysis.s inputCode_dwarfAnalysis rose_inputCode_dwarfAnalysis
 
 clean-local: cleanDocs
 	rm -rf Templates.DB ii_files ti_files *.ti *.svg test_runtimeCheck* *.new rose_bin_example.s rose_bin_example_2.s bin_example_2 *.dump

Modified: branches/testonly/tutorial/abstractHandle2.cpp
===================================================================
--- branches/testonly/tutorial/abstractHandle2.cpp	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tutorial/abstractHandle2.cpp	2008-11-18 06:54:05 UTC (rev 129)
@@ -20,19 +20,19 @@
 
   // Generate a file handle from the first file of the project
   abstract_node* file_node= new roseNode((project->get_fileList())[0]);
-  abstract_handle* handle1 = new abstract_handle(file_node);
-  cout<<"Created a file handle:\n"<<handle1->toString()<<endl<<endl;;
+  abstract_handle* handle0 = new abstract_handle(file_node);
+  cout<<"Created a file handle:\n"<<handle0->toString()<<endl<<endl;;
 
   //Create a handle to a namespace given its name and parent handle 
-  string input1("NamespaceDeclarationStatement<name,space1>");
-  abstract_handle* handle0 = new abstract_handle(handle1,input1);
-  cout<<"Created a handle:\n"<<handle0->toString()<<endl<<endl;
-  cout<<"It points to:\n"<<handle0->getNode()->toString()<<endl<<endl;
+  string input1="NamespaceDeclarationStatement<name,space1>";
+  abstract_handle* handle1 = new abstract_handle(handle0,input1);
+  cout<<"Created a handle:\n"<<handle1->toString()<<endl<<endl;
+  cout<<"It points to:\n"<<handle1->getNode()->toString()<<endl<<endl;
 
   // Create a handle within the file, given a string specifying  
   // its construct type (class declaration) and source position 
-  string input("ClassDeclaration<position,4.3-9.2>");
-  abstract_handle* handle2 = new abstract_handle(handle1,input);
+  string input="ClassDeclaration<position,4.3-9.2>";
+  abstract_handle* handle2 = new abstract_handle(handle0,input);
 
   cout<<"Created a handle:\n"<<handle2->toString()<<endl<<endl;
   cout<<"It points to:\n"<<handle2->getNode()->toString()<<endl<<endl;;

Modified: branches/testonly/tutorial/binaryAnalysis_symbolTable.C
===================================================================
--- branches/testonly/tutorial/binaryAnalysis_symbolTable.C	2008-11-18 01:37:36 UTC (rev 128)
+++ branches/testonly/tutorial/binaryAnalysis_symbolTable.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -2,6 +2,8 @@
 // on Linux (ELF) or Windows (PE) binary executables.
 
 #include "rose.h"
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
 
 class Visitor: public AstSimpleProcessing
    {
@@ -18,8 +20,8 @@
           printf("Found a SgAsmGenericSymbol, Here: offset = %zu, %p = %s = %s \n",(size_t)0,symbol,symbol->class_name().c_str(),symbol->get_name()->c_str());
           printf ("symbol->get_name()      = %s \n",symbol->get_name()->c_str());
           printf ("symbol->get_bound()     = %p \n",symbol->get_bound());
-          printf ("symbol->get_size()      = %zu \n",symbol->get_size());
-          printf ("symbol->get_value()     = %zu \n",symbol->get_value());
+          printf ("symbol->get_size()      = %"PRIu64" \n",symbol->get_size());
+          printf ("symbol->get_value()     = %"PRIu64" \n",symbol->get_value());
 
           printf ("symbol->get_type()      = %u = %s \n",symbol->get_type(),symbol->stringifyType().c_str());
           printf ("symbol->get_binding()   = %u = %s \n",symbol->get_binding(),symbol->stringifyBinding().c_str());
@@ -30,17 +32,17 @@
 
           if (elfSymbol != NULL)
              {
-               printf ("   elfSymbol->get_st_name()  = %zu \n",elfSymbol->get_st_name());
+               printf ("   elfSymbol->get_st_name()  = %"PRIu64" \n",elfSymbol->get_st_name());
                printf ("   elfSymbol->get_st_info()  = %u  \n",elfSymbol->get_st_info());
                printf ("   elfSymbol->get_st_res1()  = %u  \n",elfSymbol->get_st_res1());
                printf ("   elfSymbol->get_st_shndx() = %u  \n",elfSymbol->get_st_shndx());
-               printf ("   elfSymbol->get_st_size()  = %zu \n",elfSymbol->get_st_size());
+               printf ("   elfSymbol->get_st_size()  = %"PRIu64" \n",elfSymbol->get_st_size());
              }
 
           if (coffSymbol != NULL)
              {
                printf ("   coffSymbol->get_st_name()            = %s \n",coffSymbol->get_st_name().c_str());
-               printf ("   coffSymbol->get_st_name_offset()     = %zu \n",coffSymbol->get_st_name_offset());
+               printf ("   coffSymbol->get_st_name_offset()     = %"PRIu64" \n",coffSymbol->get_st_name_offset());
                printf ("   coffSymbol->get_st_section_num()     = %d  \n",coffSymbol->get_st_section_num());
                printf ("   coffSymbol->get_st_type()            = %u  \n",coffSymbol->get_st_type());
                printf ("   coffSymbol->get_st_storage_class()   = %u  \n",coffSymbol->get_st_storage_class());

Copied: branches/testonly/tutorial/dwarfAnalysis.C (from rev 128, trunk/tutorial/dwarfAnalysis.C)
===================================================================
--- branches/testonly/tutorial/dwarfAnalysis.C	                        (rev 0)
+++ branches/testonly/tutorial/dwarfAnalysis.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,29 @@
+#include "rose.h"
+
+int
+main(int argc, char** argv)
+   {
+     SgProject* project = frontend(argc,argv);
+     ROSE_ASSERT (project != NULL);
+
+#if 1
+     int numberOfASTnodes = numberOfNodes();
+     printf ("Generate the dot output of the SAGE III AST numberOfASTnodes = %d \n",numberOfASTnodes);
+     if (numberOfASTnodes <= 20000)
+        {
+       // generateDOT ( *project );
+          generateDOTforMultipleFile ( *project );
+          printf ("DONE: Generate the dot output of the SAGE III AST \n");
+        }
+       else
+        {
+          printf ("Skipping generation of dot file (too large to be useful), run a smaller input program \n");
+        }
+#endif
+
+  // Skip call to backend since this is just an analysis.
+
+  // Unparse the binary executable (as a binary, as an assembly text file, 
+  // and as a dump of the binary executable file format details (sections)).
+  // return backend(project);
+   }

Copied: branches/testonly/tutorial/dwarfInstructionAddressToSourceLineAnalysis.C (from rev 128, trunk/tutorial/dwarfInstructionAddressToSourceLineAnalysis.C)
===================================================================
--- branches/testonly/tutorial/dwarfInstructionAddressToSourceLineAnalysis.C	                        (rev 0)
+++ branches/testonly/tutorial/dwarfInstructionAddressToSourceLineAnalysis.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,68 @@
+#include "rose.h"
+
+int
+main(int argc, char** argv)
+   {
+     SgProject* project = frontend(argc,argv);
+     ROSE_ASSERT (project != NULL);
+
+// This is controled by using the --with-dwarf configure command line option.
+#if USE_ROSE_DWARF_SUPPORT
+
+  // The input file is the binary file...
+     int binary_file_id = project->get_fileList()[0]->get_file_info()->get_file_id();
+
+  // Increment to get the next file id (for the source file, instead of the binary file)
+     int source_file_id = binary_file_id + 1;
+
+     std::string binaryFilename = Sg_File_Info::getFilenameFromID(binary_file_id);
+     printf ("file_id = %d binaryFilename = %s \n",binary_file_id,binaryFilename.c_str());
+
+     std::string sourceFilename = Sg_File_Info::getFilenameFromID(source_file_id);
+     printf ("file_id = %d sourceFilename = %s \n",source_file_id,sourceFilename.c_str());
+
+  // Compute the source line range from the instructions in the binary executable
+     std::pair<LineColumnFilePosition,LineColumnFilePosition> sourceFileRange;
+     sourceFileRange = SgAsmDwarfLineList::sourceCodeRange( source_file_id );
+
+     printf ("\nSource file line number range for:\n -- file = %s (id = %d)\n -- [(line=%d, col=%d), (line=%d, col=%d)] \n",
+          sourceFilename.c_str(),source_file_id,
+          sourceFileRange.first.first, sourceFileRange.first.second, 
+          sourceFileRange.second.first, sourceFileRange.second.second);
+
+  // Compute the binary executable instruction address range
+     std::pair<uint64_t,uint64_t> addressRange = SgAsmDwarfLineList::instructionRange();
+     printf ("\nBinary instruction address range = (0x%lx, 0x%lx) \n",addressRange.first,addressRange.second);
+
+     int minLine = sourceFileRange.first.first;
+     int maxLine = sourceFileRange.second.first;
+     int columnNumber = -1;
+
+     printf ("\nInstruction addresses computed from source positions: \n");
+  // Iterate over line numbers to map back to instruction addresses
+     for (int lineNumber = minLine - 2; lineNumber <= maxLine + 2; lineNumber++)
+        {
+       // Out of range values generate the next address or NULL.
+          FileIdLineColumnFilePosition s(source_file_id,std::pair<int,int>(lineNumber,columnNumber));
+          uint64_t instructionAddress = SgAsmDwarfLineList::sourceCodeToAddress(s);
+          printf ("   sourceCodeToAddress(%d,%d,%d) = 0x%lx \n",s.first,s.second.first,s.second.second,instructionAddress);
+        }
+
+     uint64_t minInstructionAddress = addressRange.first;
+
+  // Iterate over the addresses of the binary and compute the source code line numbers (limit the range so the output will be short).
+     printf ("\nSource lines computed from address range (truncated to keep output short): \n");
+     for (uint64_t address = minInstructionAddress - 1; address < minInstructionAddress + 25; address++)
+        {
+          FileIdLineColumnFilePosition s_map = SgAsmDwarfLineList::addressToSourceCode(address);
+          printf ("   addressToSourceCode: address 0x%lx = (%d,%d,%d) \n",address,s_map.first,s_map.second.first,s_map.second.second);
+        }
+#else
+     printf ("\n\nROSE must be configured with --with-dwarf=<path to libdwarf> to use Dwarf support. \n\n");
+#endif
+
+     printf ("\nProgram Terminated Normally! \n\n");
+
+  // Skip call to backend since this is just an analysis.
+     return backend(project);
+   }

Copied: branches/testonly/tutorial/inputCode_dwarfAnalysis.C (from rev 128, trunk/tutorial/inputCode_dwarfAnalysis.C)
===================================================================
--- branches/testonly/tutorial/inputCode_dwarfAnalysis.C	                        (rev 0)
+++ branches/testonly/tutorial/inputCode_dwarfAnalysis.C	2008-11-18 06:54:05 UTC (rev 129)
@@ -0,0 +1,22 @@
+// Test code to demonstration of dwarf support.
+// Designed to be small because Dwarf is verbose.
+
+namespace example_namespace
+   {
+     int a;
+   };
+
+
+int main()
+   {
+     int x = 42;
+
+  // Loops are not recognised in Dwarf...
+     for (int i = 0; i < 10; i++)
+        {
+          x = (x % 2) ? x * 2 : x + 1;
+        }
+
+     return 0;
+   }
+



More information about the Rose-commits mailing list