Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/pjl-misc into lp:zorba.

Commit message:
Clean-up (as a prerequisite for profiling).

Requested reviews:
  Paul J. Lucas (paul-lucas)

For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/203436

Clean-up (as a prerequisite for profiling).
-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/203436
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/system/CMakeLists.txt'
--- src/system/CMakeLists.txt	2013-02-07 17:24:36 +0000
+++ src/system/CMakeLists.txt	2014-01-27 23:46:04 +0000
@@ -14,4 +14,5 @@
 SET(SYSTEM_SRCS
     globalenv.cpp
     properties.cpp
+    zorba_properties.cpp
 )

=== added file 'src/system/zorba_properties.cpp'
--- src/system/zorba_properties.cpp	1970-01-01 00:00:00 +0000
+++ src/system/zorba_properties.cpp	2014-01-27 23:46:04 +0000
@@ -0,0 +1,393 @@
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <cstring>
+
+#include "zorba_properties.h"
+
+namespace zorba { 
+
+///////////////////////////////////////////////////////////////////////////////
+
+ZorbaProperties::ZorbaProperties() {
+  theAbort = false;
+  theCompileOnly = false;
+  theDebug = false;
+  theDumpLib = false;
+  theForceGflwor = false;
+  theInferJoins = true;
+  theInlineUdf = true;
+  theIterPlanTest = false;
+  theJsoniqParser = false;
+  theLibModule = false;
+  theLoopHoisting = true;
+  theMaxUdfCallDepth = 1024;
+  theNoCopyOptim = true;
+  theNoTreeIds = false;
+  theOptimizer = 1;
+  thePrintAst = false;
+  thePrintIntermediateOpt = false;
+  thePrintItemFlow = false;
+  thePrintIteratorTree = false;
+  thePrintLocations = false;
+  thePrintNormalized = false;
+  thePrintOptimized = false;
+  thePrintQuery = false;
+  thePrintStaticTypes = true;
+  thePrintTime = false;
+  thePrintTranslated = false;
+  thePrintXqdoc = false;
+  theReorderGlobals = true;
+  theSerializeOnlyQuery = -1;
+  theSpecializeCmp = true;
+  theSpecializeNum = true;
+  theStableIteratorIds = false;
+  theTestPlanSerialization = false;
+  theTraceCodegen = false;
+  theTraceFulltext = false;
+  theTraceParsing = false;
+  theTraceScanning = false;
+  theTraceTranslator = false;
+  theUseIndexes = true;
+  theUseSerializer = false;
+}
+
+char const** ZorbaProperties::get_all_options() const {
+  static char const *result[] = {
+    "--abort",
+    "--CLASSPATH",
+    "--compile-only",
+    "--debug",
+    "--debug-file",
+    "--dot-plan-file",
+    "--dump-lib",
+    "--external-var",
+    "--force-gflwor",
+    "--infer-joins",
+    "--inline-udf",
+    "--iter-plan-test",
+    "--jsoniq",
+    "--lib-module",
+    "--loop-hoisting",
+    "--max-udf-call-depth",
+    "--no-copy-optim",
+    "--no-tree-ids",
+    "--optimizer",
+    "--plan",
+    "--print-ast",
+    "--print-intermediate-opt",
+    "--print-item-flow",
+    "--print-iterator-tree",
+    "--print-locations",
+    "--print-normalized",
+    "--print-optimized",
+    "--print-query",
+    "--print-static-types",
+    "--print-time",
+    "--print-translated",
+    "--print-xqdoc",
+    "--query",
+    "--reorder-globals",
+    "--result-file",
+    "--serialize-only-query",
+    "--serializer-param",
+    "--specialize-cmp",
+    "--specialize-num",
+    "--stable-iterator-ids",
+    "--trace-codegen",
+    "--trace-fulltext",
+    "--trace-parsing",
+    "--trace-scanning",
+    "--trace-translator",
+    "--tz",
+    "--use-serializer",
+    0
+  };
+  return result;
+}
+
+char const* ZorbaProperties::get_help_msg() const {
+  return
+    "--abort\nabort when fatal error happens\n\n"
+    "--CLASSPATH\nJVM classpath to be used by modules using Java implementations\n\n"
+    "--compile-only\nonly compile (don't execute)\n\n"
+    "--debug-file\nlog file for debugging information\n\n"
+    "--debug\ncompile the query in debug mode\n\n"
+    "--dot-plan-file\ngenerate the dot iterator plan\n\n"
+    "--dump-lib\ndump function library\n\n"
+    "--external-var, -x\nexternal variables (e.g. -x x=file1.xml -x y:=strValue)\n\n"
+    "--force-gflwor\nforce compiler to generate GFLWOR iterators\n\n"
+    "--infer-joins\ninfer joins (1=enabled (default), 0=off)\n\n"
+    "--inline-udf\ninline functions (1=enabled (default), 0=off)\n\n"
+    "--iter-plan-test\nrun as iterator plan test\n\n"
+    "--loop-hoisting\nhoist expressions out of loops (1=enabled (default), 0=off)\n\n"
+    "--max-udf-call-depth\nmaximum stack depth of udf function calls\n\n"
+    "--no-copy-optim\napply the no-copy optimization (1=enabled (default), 0=off)\n\n"
+    "--no-tree-ids\nsuppress ids and locations from compiler tree dumps\n\n"
+    "--optimizer, -O\noptimization level (0, 1 or 2 - 1 is default)\n\n"
+    "--plan\ntest plan serialization, i.e. save the plan, load it back and then execute it\n\n"
+    "--print-ast, -a\nprint the parse tree\n\n"
+    "--print-intermediate-opt\nprint intermediate optimizations\n\n"
+    "--print-item-flow, -f\nshow items produced by all iterators\n\n"
+    "--print-iterator-tree, -i\nprint the iterator tree\n\n"
+    "--print-locations\nprint parser locations for compiler expressions\n\n"
+    "--print-normalized, -n\nprint the translated expression tree\n\n"
+    "--print-optimized, -P\nprint the optimized expression tree\n\n"
+    "--print-query, -q\nprint the query\n\n"
+    "--print-static-types\nprint static type inference\n\n"
+    "--print-time, -t\nprint the execution time\n\n"
+    "--print-translated\nprint the normalized expression tree\n\n"
+    "--print-xqdoc\ncreate output for XQDoc\n\n"
+    "--query, -e\nexecute inline query\n\n"
+    "--reorder-globals\nreorder global variables (1=enabled (default), 0=off)\n\n"
+    "--result-file, -o\nresult file\n\n"
+    "--serialize-only-query\nserialize-only-query (<0=unknown (default), 1=enabled, 0=off)\n\n"
+    "--serializer-param, -z\nserializer parameters (see http://www.w3.org/TR/xslt-xquery-serialization/#serparam, e.g. -z method=xhtml, -z doctype-system='DTD/xhtml1-strict.dtd', -z indent=yes)\n\n"
+    "--specialize-cmp\nspecialize generic comparisons (1=enabled (default), 0=off)\n\n"
+    "--specialize-num\nspecialize numerics (1=enabled (default), 0=off)\n\n"
+    "--stable-iterator-ids\nprint the iterator plan with stable ids\n\n"
+#ifndef NDEBUG
+    "--trace-codegen, -c\ntrace the codegenerator\n\n"
+    "--trace-fulltext\ntrace full-text evaluation\n\n"
+    "--trace-translator, -l\ntrace the translator\n\n"
+#endif
+    "--trace-parsing, -p\ntrace parsing\n\n"
+    "--trace-scanning, -s\ntrace scanning\n\n"
+    "--tz\nimplicit time zone (in minutes)\n\n"
+    "--use-serializer, -r\nuse serializer\n\n"
+  ;
+}
+
+ZorbaProperties const* ZorbaProperties::instance() {
+  static ZorbaProperties instance;
+  return &instance;
+}
+
+#define IS_LONG_OPT(OPT)  (strcmp( *argv, (OPT) ) == 0)
+#define IS_SHORT_OPT(OPT) (strncmp( *argv, (OPT), 2 ) == 0)
+#define IS_OPT(LOPT,SOPT) (IS_LONG_OPT(LOPT) || IS_SHORT_OPT(SOPT))
+
+std::string ZorbaProperties::load_argv( int argc, char const *argv[] ) {
+  if ( !argv )
+    return "";
+
+  std::string result;
+  for ( ++argv; *argv; ++argv ) {
+    if ( IS_OPT( "--help", "-h" ) )
+      return "!HELP";
+    if ( IS_OPT( "--version", "-v" ) )
+      return "!VER";
+
+    if ( IS_LONG_OPT( "--abort" ) )
+      theAbort = true;
+    else if ( IS_LONG_OPT( "--compile-only" ) )
+      theCompileOnly = true;
+    else if ( IS_LONG_OPT( "--CLASSPATH" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --CLASSPATH option"; break; }
+      init_val(*argv, theCLASSPATH, d);
+    }
+    else if ( IS_LONG_OPT( "--debug" ) )
+      theDebug = true;
+    else if ( IS_LONG_OPT( "--debug-file" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --debug-file option"; break; }
+      init_val(*argv, theDebugFile, d);
+    }
+    else if ( IS_LONG_OPT( "--dot-plan-file" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --dot-plan-file option"; break; }
+      init_val(*argv, theDotPlanFile, d);
+    }
+    else if ( IS_LONG_OPT( "--dump-lib" ) )
+      theDumpLib = true;
+    else if ( IS_OPT( "--external-var", "-x" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --external-var option"; break; }
+      init_val( *argv, theExternalVar, d );
+    }
+    else if ( IS_LONG_OPT( "--force-gflwor" ) )
+      theForceGflwor = true;
+    else if ( IS_LONG_OPT( "--infer-joins" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --infer-joins option"; break; }
+      init_val(*argv, theInferJoins, d);
+    }
+    else if ( IS_LONG_OPT( "--inline-udf" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --inline-udf option"; break; }
+      init_val(*argv, theInlineUdf, d);
+    }
+    else if ( IS_LONG_OPT( "--iter-plan-test" ) )
+      theIterPlanTest = true;
+    else if ( IS_OPT( "--jsoniq", "-j" ) )
+      theJsoniqParser = true;
+    else if ( IS_LONG_OPT( "--lib-module" ) )
+      theLibModule = true;
+    else if ( IS_LONG_OPT( "--loop-hoisting" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --loop-hoisting option"; break; }
+      init_val(*argv, theLoopHoisting, d);
+    }
+    else if ( IS_LONG_OPT( "--max-udf-call-depth" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --max-udf-call-depth option"; break; }
+      init_val(*argv, theMaxUdfCallDepth, d);
+    }
+    else if ( IS_LONG_OPT( "--no-copy-optim" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) {
+        result = "No value given for --no-copy-optim option"; break; 
+      }
+      init_val(*argv, theNoCopyOptim, d);
+    }
+    else if ( IS_LONG_OPT( "--no-tree-ids" ) )
+      theNoTreeIds = true;
+    else if ( IS_OPT( "--optimizer", "-O" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --optimizer option"; break; }
+      init_val(*argv, theOptimizer, d);
+    }
+    else if ( IS_LONG_OPT( "--plan" ) )
+      theTestPlanSerialization = true;
+    else if ( IS_OPT( "--print-ast", "-a" ) )
+      thePrintAst = true;
+    else if ( IS_LONG_OPT( "--print-intermediate-opt" ) )
+      thePrintIntermediateOpt = true;
+    else if ( IS_OPT( "--print-item-flow", "-f" ) )
+      thePrintItemFlow = true;
+    else if ( IS_OPT( "--print-iterator-tree", "-i" ) )
+      thePrintIteratorTree = true;
+    else if ( IS_LONG_OPT( "--print-locations" ) )
+      thePrintLocations = true;
+    else if ( IS_OPT( "--print-normalized", "-n" ) )
+      thePrintNormalized = true;
+    else if ( IS_OPT( "--print-optimized", "-P" ) )
+      thePrintOptimized = true;
+    else if ( IS_OPT( "--print-query", "-q" ) )
+      thePrintQuery = true;
+    else if ( IS_LONG_OPT( "--print-static-types" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --print-static-types option"; break; }
+      init_val(*argv, thePrintStaticTypes, d);
+    }
+    else if ( IS_OPT( "--print-time", "-t" ) )
+      thePrintTime = true;
+    else if ( IS_LONG_OPT( "--print-translated" ) )
+      thePrintTranslated = true;
+    else if ( IS_LONG_OPT( "--print-xqdoc" ) )
+      thePrintXqdoc = true;
+    else if ( IS_OPT( "--query", "-e" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --query option"; break; }
+      init_val(*argv, theQuery, d);
+    }
+    else if ( IS_LONG_OPT( "--reorder-globals" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --reorder-globals option"; break; }
+      init_val(*argv, theReorderGlobals, d);
+    }
+    else if ( IS_OPT( "--result-file", "-o" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --result-file option"; break; }
+      init_val(*argv, theResultFile, d);
+    }
+    else if ( IS_LONG_OPT( "--serialize-only-query" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv)
+      { result = "No value given for --serialize-only-query option"; break; }
+      init_val(*argv, theSerializeOnlyQuery, d);
+    }
+    else if ( IS_OPT( "--serializer-param", "-z" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --serializer-param option"; break; }
+      init_val(*argv, theSerializerParam, d);
+    }
+    else if ( IS_LONG_OPT( "--specialize-cmp" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --specialize-cmp option"; break; }
+      init_val(*argv, theSpecializeCmp, d);
+    }
+    else if ( IS_LONG_OPT( "--specialize-num" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --specialize-num option"; break; }
+      init_val(*argv, theSpecializeNum, d);
+    }
+    else if ( IS_LONG_OPT( "--stable-iterator-ids" ) )
+      theStableIteratorIds = true;
+    else if ( IS_OPT( "--trace-parsing", "-p" ) )
+      theTraceParsing = true;
+    else if ( IS_OPT( "--trace-scanning", "-s" ) )
+      theTraceScanning = true;
+#ifndef NDEBUG
+    else if ( IS_OPT( "--trace-codegen", "-c" ) )
+      theTraceCodegen = true;
+    else if ( IS_LONG_OPT( "--trace-fulltext" ) )
+      theTraceFulltext = true;
+    else if ( IS_OPT( "--trace-translator", "-l" ) )
+      theTraceTranslator = true;
+#endif
+    else if ( IS_LONG_OPT( "--tz" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --tz option"; break; }
+      init_val(*argv, theTz, d);
+    }
+    else if ( IS_LONG_OPT( "--use-indexes" ) ) {
+      int d = 2;
+      if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
+      if (!*argv) { result = "No value given for --use-indexes option"; break; }
+      init_val(*argv, theUseIndexes, d);
+    }
+    else if ( IS_OPT( "--use-serializer", "-r" ) )
+      theUseSerializer = true;
+
+    else if ( IS_LONG_OPT( "--" ) ) {
+      copy_args( ++argv );
+      break;
+    } else if ( (*argv)[0] == '-' ) {
+      result = "unknown command line option "; result += *argv;
+      break; 
+    } else {
+      copy_args( argv );
+      break;
+    }
+  } // for
+  return result;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+} // namespace zorba
+/* vim:set et sw=2 ts=2: */

=== modified file 'src/system/zorba_properties.h'
--- src/system/zorba_properties.h	2013-03-22 05:41:14 +0000
+++ src/system/zorba_properties.h	2014-01-27 23:46:04 +0000
@@ -1,521 +1,145 @@
 /*
  * Copyright 2006-2008 The FLWOR Foundation.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/* vim:set et sw=2 ts=2: */
-
+
+#ifndef ZORBA_ZORBAPROPERTIES
+#define ZORBA_ZORBAPROPERTIES
+
+// standard
 #include <string>
-#include <sstream>
+
+// Zorba
 #include <zorba/config.h>
 #include <zorba/properties_base.h>
-#include <cstring>
-
-#ifndef ZORBA_ZORBAPROPERTIES
-#define ZORBA_ZORBAPROPERTIES
-namespace zorba 
-{ 
-
-class ZORBA_DLL_PUBLIC ZorbaProperties : public ::zorba::PropertiesGlobal 
-{
+
+namespace zorba {
+
+///////////////////////////////////////////////////////////////////////////////
+
+class ZORBA_DLL_PUBLIC ZorbaProperties : public ::zorba::PropertiesGlobal {
+public:
+  bool abort() const { return theAbort; }
+  const std::string& CLASSPATH() const { return theCLASSPATH; }
+  bool compileOnly() const { return theCompileOnly; }
+  bool debug() const { return theDebug; }
+  const std::string& debugFile() const { return theDebugFile; }
+  const std::string& dotPlanFile() const { return theDotPlanFile; }
+  bool dumpLib() const { return theDumpLib; }
+  const std::vector<std::string>& externalVar() const { return theExternalVar; }
+  bool forceGflwor() const { return theForceGflwor; }
+  bool inferJoins() const { return theInferJoins; }
+  bool inlineUdf() const { return theInlineUdf; }
+  bool iterPlanTest() const { return theIterPlanTest; }
+  bool jsoniqParser() const { return theJsoniqParser; }
+  bool libModule() const { return theLibModule; }
+  bool loopHoisting() const { return theLoopHoisting; }
+  uint32_t maxUdfCallDepth() const { return theMaxUdfCallDepth; }
+  bool noCopyOptim() const { return theNoCopyOptim; }
+  bool noTreeIds() const { return theNoTreeIds; }
+  int optimizer() const { return theOptimizer; }
+  bool printAst() const { return thePrintAst; }
+  bool printIntermediateOpt() const { return thePrintIntermediateOpt; }
+  bool printItemFlow() const { return thePrintItemFlow; }
+  bool printIteratorTree() const { return thePrintIteratorTree; }
+  bool printLocations() const { return thePrintLocations; }
+  bool printNormalized() const { return thePrintNormalized; }
+  bool printOptimized() const { return thePrintOptimized; }
+  bool printQuery() const { return thePrintQuery; }
+  bool printStaticTypes() const { return thePrintStaticTypes; }
+  bool printTime() const { return thePrintTime; }
+  bool printTranslated() const { return thePrintTranslated; }
+  bool printXqdoc() const { return thePrintXqdoc; }
+  const std::string& query() const { return theQuery; }
+  bool reorderGlobals() const { return theReorderGlobals; }
+  const std::string& resultFile() const { return theResultFile; }
+  int serializeOnlyQuery() const { return theSerializeOnlyQuery; }
+  const std::vector<std::string>& serializerParam() const { return theSerializerParam; }
+  bool specializeCmp() const { return theSpecializeCmp; }
+  bool specializeNum() const { return theSpecializeNum; }
+  bool stableIteratorIds() const { return theStableIteratorIds; }
+  bool testPlanSerialization() const { return theTestPlanSerialization; }
+  bool traceCodegen() const { return theTraceCodegen; }
+  bool traceFulltext() const { return theTraceFulltext; }
+  bool traceParsing() const { return theTraceParsing; }
+  bool traceScanning() const { return theTraceScanning; }
+  bool traceTranslator() const { return theTraceTranslator; }
+  int tz() const { return theTz; }
+  bool useIndexes() const { return theUseIndexes; }
+  bool useSerializer() const { return theUseSerializer; }
+
+  char const* get_help_msg() const;
+  static const ZorbaProperties* instance();
+  std::string load_argv( int argc, char const **argv );
+
 protected:
-  const char** get_all_options() const 
-  {
-    static const char* result [] = {
-      "--trace-parsing", "--trace-scanning", "--use-serializer", "--optimizer",
-      "--result-file", "--debug-file", "--abort", "--query", "--print-query",
-      "--print-time", "--print-ast", "--print-xqdoc", "--print-translated",
-      "--print-normalized", "--print-optimized", "--print-iterator-tree",
-      "--print-item-flow", "--print-static-types", "--dump-lib",
-      "--stable-iterator-ids", "--no-tree-ids", "--print-intermediate-opt",
-      "--print-locations", "--force-gflwor", "--reorder-globals",
-      "--specialize-num", "--specialize-cmp", "--inline-udf", "--loop-hoisting",
-      "--infer-joins", "--no-copy-optim", "--serialize-only-query",
-      "--trace-translator", "--trace-codegen", "--trace-fulltext", "--debug",
-      "--compile-only", "--lib-module", "--tz", "--external-var", "--serializer-param",
-      "--iter-plan-test", "--dot-plan-file", "--plan", "jsoniq", "--max-udf-call-depth",
-      "--CLASSPATH", NULL };
-
-    return result;
-  }
-
-  bool theTraceParsing;
-  bool theTraceScanning;
-  bool theUseSerializer;
+  ZorbaProperties();
+
+  const char** get_all_options() const;
+
+  bool theAbort;
+  std::string theCLASSPATH;
+  bool theCompileOnly;
+  bool theDebug;
+  std::string theDebugFile;
+  std::string theDotPlanFile;
+  bool theDumpLib;
+  std::vector<std::string> theExternalVar;
+  bool theForceGflwor;
+  bool theInferJoins;
+  bool theInlineUdf;
+  bool theIterPlanTest;
+  bool theJsoniqParser;
+  bool theLibModule;
+  bool theLoopHoisting;
+  uint32_t theMaxUdfCallDepth;
+  bool theNoCopyOptim;
+  bool theNoTreeIds;
   int theOptimizer;
-  std::string theResultFile;
-  std::string theDebugFile;
-  bool theAbort;
-  std::string theQuery;
-  bool thePrintQuery;
-  bool thePrintTime;
   bool thePrintAst;
-  bool thePrintXqdoc;
-  bool thePrintTranslated;
+  bool thePrintIntermediateOpt;
+  bool thePrintItemFlow;
+  bool thePrintIteratorTree;
+  bool thePrintLocations;
   bool thePrintNormalized;
   bool thePrintOptimized;
-  bool thePrintIteratorTree;
-  bool thePrintItemFlow;
+  bool thePrintQuery;
   bool thePrintStaticTypes;
-  bool theDumpLib;
-  bool theStableIteratorIds;
-  bool theNoTreeIds;
-  bool thePrintIntermediateOpt;
-  bool thePrintLocations;
-  bool theForceGflwor;
+  bool thePrintTime;
+  bool thePrintTranslated;
+  bool thePrintXqdoc;
+  std::string theQuery;
+  std::string theResultFile;
   bool theReorderGlobals;
+  int theSerializeOnlyQuery;
+  std::vector<std::string> theSerializerParam;
+  bool theSpecializeCmp;
   bool theSpecializeNum;
-  bool theSpecializeCmp;
-  bool theInlineUdf;
-  bool theLoopHoisting;
-  bool theInferJoins;
-  bool theUseIndexes;
-  bool theNoCopyOptim;
-  int theSerializeOnlyQuery;
-  bool theTraceTranslator;
+  bool theStableIteratorIds;
+  bool theTestPlanSerialization;
   bool theTraceCodegen;
   bool theTraceFulltext;
-  bool theDebug;
-  bool theCompileOnly;
-  bool theLibModule;
+  bool theTraceParsing;
+  bool theTraceScanning;
+  bool theTraceTranslator;
   int theTz;
-  std::vector<std::string> theExternalVar;
-  std::vector<std::string> theSerializerParam;
-  bool theIterPlanTest;
-  std::string theDotPlanFile;
-  bool theTestPlanSerialization;
-  bool theJsoniqParser;
-  uint32_t theMaxUdfCallDepth;
-  std::string theCLASSPATH;
-
-  void initialize() 
-  {
-    theTraceParsing = false;
-    theTraceScanning = false;
-    theUseSerializer = false;
-    theOptimizer = 1;
-    theAbort = false;
-    thePrintQuery = false;
-    thePrintTime = false;
-    thePrintAst = false;
-    thePrintXqdoc = false;
-    thePrintTranslated = false;
-    thePrintNormalized = false;
-    thePrintOptimized = false;
-    thePrintIteratorTree = false;
-    thePrintItemFlow = false;
-    thePrintStaticTypes = true;
-    theDumpLib = false;
-    theStableIteratorIds = false;
-    theNoTreeIds = false;
-    thePrintIntermediateOpt = false;
-    thePrintLocations = false;
-    theForceGflwor = false;
-    theReorderGlobals = true;
-    theSpecializeNum = true;
-    theSpecializeCmp = true;
-    theInlineUdf = true;
-    theLoopHoisting = true;
-    theInferJoins = true;
-    theUseIndexes = true;
-    theNoCopyOptim = true;
-    theSerializeOnlyQuery = -1;
-    theTraceTranslator = false;
-    theTraceCodegen = false;
-    theTraceFulltext = false;
-    theDebug = false;
-    theCompileOnly = false;
-    theLibModule = false;
-    theIterPlanTest = false;
-    theTestPlanSerialization = false;
-    theJsoniqParser = false;
-    theMaxUdfCallDepth = 1024;
-  }
-
-public:
-  const bool &traceParsing () const { return theTraceParsing; }
-  const bool &traceScanning () const { return theTraceScanning; }
-  const bool &useSerializer () const { return theUseSerializer; }
-  const int &optimizer () const { return theOptimizer; }
-  const std::string &resultFile () const { return theResultFile; }
-  const std::string &debugFile () const { return theDebugFile; }
-  const bool &abort () const { return theAbort; }
-  const std::string &query () const { return theQuery; }
-  const bool &printQuery () const { return thePrintQuery; }
-  const bool &printTime () const { return thePrintTime; }
-  const bool &printAst () const { return thePrintAst; }
-  const bool &printXqdoc () const { return thePrintXqdoc; }
-  const bool &printTranslated () const { return thePrintTranslated; }
-  const bool &printNormalized () const { return thePrintNormalized; }
-  const bool &printOptimized () const { return thePrintOptimized; }
-  const bool &printIteratorTree () const { return thePrintIteratorTree; }
-  const bool &printItemFlow () const { return thePrintItemFlow; }
-  const bool &printStaticTypes () const { return thePrintStaticTypes; }
-  const bool &dumpLib () const { return theDumpLib; }
-  const bool &stableIteratorIds () const { return theStableIteratorIds; }
-  const bool &noTreeIds () const { return theNoTreeIds; }
-  const bool &printIntermediateOpt () const { return thePrintIntermediateOpt; }
-  const bool &printLocations () const { return thePrintLocations; }
-  const bool &forceGflwor () const { return theForceGflwor; }
-  const bool &reorderGlobals () const { return theReorderGlobals; }
-  const bool &specializeNum () const { return theSpecializeNum; }
-  const bool& specializeCmp () const { return theSpecializeCmp; }
-  const bool& inlineUdf () const { return theInlineUdf; }
-  const bool& loopHoisting () const { return theLoopHoisting; }
-  const bool& inferJoins () const { return theInferJoins; }
-  const bool& useIndexes() const { return theUseIndexes; }
-  const bool& noCopyOptim() const { return theNoCopyOptim; }
-  const int& serializeOnlyQuery() const { return theSerializeOnlyQuery; }
-  const bool &traceTranslator () const { return theTraceTranslator; }
-  const bool &traceCodegen () const { return theTraceCodegen; }
-  const bool &traceFulltext () const { return theTraceFulltext; }
-  const bool &debug () const { return theDebug; }
-  const bool &compileOnly () const { return theCompileOnly; }
-  const bool &libModule() const { return theLibModule; }
-  const int &tz () const { return theTz; }
-  const std::vector<std::string> &externalVar () const { return theExternalVar; }
-  const std::vector<std::string> &serializerParam () const { return theSerializerParam; }
-  const bool &iterPlanTest () const { return theIterPlanTest; }
-  const std::string &dotPlanFile () const { return theDotPlanFile; }
-  const bool& testPlanSerialization() const { return theTestPlanSerialization; }
-  const bool& jsoniqParser() const { return theJsoniqParser; }
-  const uint32_t &maxUdfCallDepth () const { return theMaxUdfCallDepth; }
-  const std::string &CLASSPATH () const { return theCLASSPATH; }
-
-  std::string load_argv (int argc, const char **argv) 
-  {
-    if (argv == NULL) return "";
-
-    std::string result;
-    for (++argv; *argv != NULL; ++argv) {
-      if (strcmp (*argv, "--help") == 0 || strcmp (*argv, "-h") == 0)
-        return "!HELP";
-      else if (strcmp (*argv, "--version") == 0)
-        return "!VER";
-      else if (strcmp (*argv, "--trace-parsing") == 0 || strncmp (*argv, "-p", 2) == 0) {
-        theTraceParsing = true;
-      }
-      else if (strcmp (*argv, "--trace-scanning") == 0 || strncmp (*argv, "-s", 2) == 0) {
-        theTraceScanning = true;
-      }
-      else if (strcmp (*argv, "--use-serializer") == 0 || strncmp (*argv, "-r", 2) == 0) {
-        theUseSerializer = true;
-      }
-      else if (strcmp (*argv, "--optimizer") == 0 || strncmp (*argv, "-O", 2) == 0) {
-        int d = 2;
-        if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --optimizer option"; break; }
-        init_val (*argv, theOptimizer, d);
-      }
-      else if (strcmp (*argv, "--result-file") == 0 || strncmp (*argv, "-o", 2) == 0) {
-        int d = 2;
-        if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --result-file option"; break; }
-        init_val (*argv, theResultFile, d);
-      }
-      else if (strcmp (*argv, "--debug-file") == 0) {
-        int d = 2;
-        if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --debug-file option"; break; }
-
-        init_val (*argv, theDebugFile, d);
-      }
-      else if (strcmp (*argv, "--abort") == 0) {
-        theAbort = true;
-      }
-      else if (strcmp (*argv, "--query") == 0 || strncmp (*argv, "-e", 2) == 0) {
-        int d = 2;
-        if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --query option"; break; }
-
-        init_val (*argv, theQuery, d);
-      }
-      else if (strcmp (*argv, "--print-query") == 0 || strncmp (*argv, "-q", 2) == 0) {
-        thePrintQuery = true;
-      }
-      else if (strcmp (*argv, "--print-time") == 0 || strncmp (*argv, "-t", 2) == 0) {
-        thePrintTime = true;
-      }
-      else if (strcmp (*argv, "--print-ast") == 0 || strncmp (*argv, "-a", 2) == 0) {
-        thePrintAst = true;
-      }
-      else if (strcmp (*argv, "--print-xqdoc") == 0) {
-        thePrintXqdoc = true;
-      }
-      else if (strcmp (*argv, "--print-translated") == 0) {
-        thePrintTranslated = true;
-      }
-      else if (strcmp (*argv, "--print-normalized") == 0 || strncmp (*argv, "-n", 2) == 0) {
-        thePrintNormalized = true;
-      }
-      else if (strcmp (*argv, "--print-optimized") == 0 || strncmp (*argv, "-P", 2) == 0) {
-        thePrintOptimized = true;
-      }
-      else if (strcmp (*argv, "--print-iterator-tree") == 0 || strncmp (*argv, "-i", 2) == 0) {
-        thePrintIteratorTree = true;
-      }
-      else if (strcmp (*argv, "--print-item-flow") == 0 || strncmp (*argv, "-f", 2) == 0) {
-        thePrintItemFlow = true;
-      }
-      else if (strcmp (*argv, "--print-static-types") == 0) {
-        int d = 2;
-        if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --print-static-types option"; break; }
-
-        init_val (*argv, thePrintStaticTypes, d);
-      }
-      else if (strcmp (*argv, "--dump-lib") == 0) {
-        theDumpLib = true;
-      }
-      else if (strcmp (*argv, "--stable-iterator-ids") == 0) {
-        theStableIteratorIds = true;
-      }
-      else if (strcmp (*argv, "--no-tree-ids") == 0) {
-        theNoTreeIds = true;
-      }
-      else if (strcmp (*argv, "--print-intermediate-opt") == 0) {
-        thePrintIntermediateOpt = true;
-      }
-      else if (strcmp (*argv, "--print-locations") == 0) {
-        thePrintLocations = true;
-      }
-      else if (strcmp (*argv, "--force-gflwor") == 0) {
-        theForceGflwor = true;
-      }
-      else if (strcmp (*argv, "--reorder-globals") == 0) {
-        int d = 2;
-        if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --reorder-globals option"; break; }
-
-        init_val (*argv, theReorderGlobals, d);
-      }
-      else if (strcmp (*argv, "--specialize-num") == 0) {
-        int d = 2;
-        if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --specialize-num option"; break; }
-
-        init_val (*argv, theSpecializeNum, d);
-      }
-      else if (strcmp (*argv, "--specialize-cmp") == 0) {
-        int d = 2;
-        if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --specialize-cmp option"; break; }
-
-        init_val (*argv, theSpecializeCmp, d);
-      }
-      else if (strcmp (*argv, "--inline-udf") == 0)
-      {
-        int d = 2;
-        if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --inline-udf option"; break; }
-
-        init_val (*argv, theInlineUdf, d);
-      }
-      else if (strcmp (*argv, "--loop-hoisting") == 0)
-      {
-        int d = 2;
-        if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --loop-hoisting option"; break; }
-
-        init_val (*argv, theLoopHoisting, d);
-      }
-      else if (strcmp (*argv, "--infer-joins") == 0)
-      {
-        int d = 2;
-        if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --infer-joins option"; break; }
-
-        init_val(*argv, theInferJoins, d);
-      }
-      else if (strcmp(*argv, "--use-indexes") == 0)
-      {
-        int d = 2;
-        if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --use-indexes option"; break; }
-
-        init_val(*argv, theUseIndexes, d);
-      }
-      else if (strcmp(*argv, "--no-copy-optim") == 0)
-      {
-        int d = 2;
-        if ((*argv)[1] == '-' || (*argv)[2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL)
-        {
-          result = "No value given for --no-copy-optim option"; break; 
-        }
-        init_val(*argv, theNoCopyOptim, d);
-      }
-      else if (strcmp (*argv, "--serialize-only-query") == 0)
-      {
-        int d = 2;
-        if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL)
-        { result = "No value given for --serialize-only-query option"; break; }
-        init_val(*argv, theSerializeOnlyQuery, d);
-      }
-#ifndef NDEBUG
-      else if (strcmp (*argv, "--trace-translator") == 0 ||
-               strncmp (*argv, "-l", 2) == 0)
-      {
-        theTraceTranslator = true;
-      }
-      else if (strcmp (*argv, "--trace-codegen") == 0 ||
-               strncmp (*argv, "-c", 2) == 0)
-      {
-        theTraceCodegen = true;
-      }
-      else if (strcmp (*argv, "--trace-fulltext") == 0) {
-        theTraceFulltext = true;
-      }
-#endif
-      else if (strcmp (*argv, "--debug") == 0) {
-        theDebug = true;
-      }
-      else if (strcmp (*argv, "--compile-only") == 0) {
-        theCompileOnly = true;
-      }
-      else if (strcmp (*argv, "--lib-module") == 0) {
-        theLibModule = true;
-      }
-      else if (strcmp (*argv, "--tz") == 0) {
-        int d = 2;
-        if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --tz option"; break; }
-
-        init_val (*argv, theTz, d);
-      }
-      else if (strcmp (*argv, "--external-var") == 0 || strncmp (*argv, "-x", 2) == 0) {
-        int d = 2;
-        if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --external-var option"; break; }
-
-        init_val (*argv, theExternalVar, d);
-      }
-      else if (strcmp (*argv, "--serializer-param") == 0 || strncmp (*argv, "-z", 2) == 0) {
-        int d = 2;
-        if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --serializer-param option"; break; }
-
-        init_val (*argv, theSerializerParam, d);
-      }
-      else if (strcmp (*argv, "--iter-plan-test") == 0) {
-        theIterPlanTest = true;
-      }
-      else if (strcmp (*argv, "--dot-plan-file") == 0) {
-        int d = 2;
-        if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --dot-plan-file option"; break; }
-
-        init_val (*argv, theDotPlanFile, d);
-      }
-      else if (strcmp (*argv, "--plan") == 0) {
-        theTestPlanSerialization = true;
-      } 
-      else if (strcmp (*argv, "--jsoniq") == 0 || strncmp(*argv, "-j", 2) == 0) {
-        theJsoniqParser = true;
-      }
-      else if (strcmp (*argv, "--max-udf-call-depth") == 0) {
-        int d = 2;
-        if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --max-udf-call-depth option"; break; }
-
-        init_val (*argv, theMaxUdfCallDepth, d);
-      }
-      else if (strcmp (*argv, "--CLASSPATH") == 0) {
-        int d = 2;
-        if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
-        if (*argv == NULL) { result = "No value given for --CLASSPATH option"; break; }
-
-        init_val (*argv, theCLASSPATH, d);
-      }
-      else if (strcmp (*argv, "--") == 0) {
-        copy_args (++argv);
-        break;
-      } else if ((*argv) [0] == '-') {
-        result = "unknown command line option "; result += *argv; break; 
-      } else {
-        copy_args (argv);
-        break;
-      }
-    }
-
-    return result;
-  }
-
-
-  const char* get_help_msg() const 
-  {
-    return
-"--trace-parsing, -p\ntrace parsing\n\n"
-"--trace-scanning, -s\ntrace scanning\n\n"
-"--use-serializer, -r\nuse serializer\n\n"
-"--optimizer, -O\noptimization level (0, 1 or 2 - 1 is default)\n\n"
-"--result-file, -o\nresult file\n\n"
-"--debug-file\nlog file for debugging information\n\n"
-"--abort\nabort when fatal error happens\n\n"
-"--query, -e\nexecute inline query\n\n"
-"--print-query, -q\nprint the query\n\n"
-"--print-time, -t\nprint the execution time\n\n"
-"--print-ast, -a\nprint the parse tree\n\n"
-"--print-xqdoc\ncreate output for XQDoc\n\n"
-"--print-translated\nprint the normalized expression tree\n\n"
-"--print-normalized, -n\nprint the translated expression tree\n\n"
-"--print-optimized, -P\nprint the optimized expression tree\n\n"
-"--print-iterator-tree, -i\nprint the iterator tree\n\n"
-"--print-item-flow, -f\nshow items produced by all iterators\n\n"
-"--print-static-types\nprint static type inference\n\n"
-"--dump-lib\ndump function library\n\n"
-"--stable-iterator-ids\nprint the iterator plan with stable ids\n\n"
-"--no-tree-ids\nsuppress ids and locations from compiler tree dumps\n\n"
-"--print-intermediate-opt\nprint intermediate optimizations\n\n"
-"--print-locations\nprint parser locations for compiler expressions\n\n"
-"--force-gflwor\nforce compiler to generate GFLWOR iterators\n\n"
-"--reorder-globals\nreorder global variables (1=enabled (default), 0=off)\n\n"
-"--specialize-num\nspecialize numerics (1=enabled (default), 0=off)\n\n"
-"--specialize-cmp\nspecialize generic comparisons (1=enabled (default), 0=off)\n\n"
-"--inline-udf\ninline functions (1=enabled (default), 0=off)\n\n"
-"--loop-hoisting\nhoist expressions out of loops (1=enabled (default), 0=off)\n\n"
-"--infer-joins\ninfer joins (1=enabled (default), 0=off)\n\n"
-"--no-copy-optim\napply the no-copy optimization (1=enabled (default), 0=off)\n\n"
-"--serialize-only-query\nserialize-only-query (<0=unknown (default), 1=enabled, 0=off)\n\n"
-#ifndef NDEBUG
-"--trace-translator, -l\ntrace the translator\n\n"
-"--trace-codegen, -c\ntrace the codegenerator\n\n"
-"--trace-fulltext\ntrace full-text evaluation\n\n"
-#endif
-"--debug\ncompile the query in debug mode\n\n"
-"--compile-only\nonly compile (don't execute)\n\n"
-"--tz\nimplicit time zone (in minutes)\n\n"
-"--external-var, -x\nexternal variables (e.g. -x x=file1.xml -x y:=strValue)\n\n"
-"--serializer-param, -z\nserializer parameters (see http://www.w3.org/TR/xslt-xquery-serialization/#serparam, e.g. -z method=xhtml, -z doctype-system='DTD/xhtml1-strict.dtd', -z indent=yes)\n\n"
-"--iter-plan-test\nrun as iterator plan test\n\n"
-"--dot-plan-file\ngenerate the dot iterator plan\n\n"
-"--plan\ntest plan serialization, i.e. save the plan, load it back and then execute it\n\n"
-"--max-udf-call-depth\nmaximum stack depth of udf function calls\n\n"
-"--CLASSPATH\nJVM classpath to be used by modules using Java implementations\n\n"
-;
-  }
-
-  static const ZorbaProperties* instance() 
-  {
-    static ZorbaProperties result;
-    return &result;
-  }
-
-  ZorbaProperties() { initialize (); }
+  bool theUseIndexes;
+  bool theUseSerializer;
 };
 
-
-}   // namespaces
-
-#endif // ZORBA_ZORBAPROPERTIES
+///////////////////////////////////////////////////////////////////////////////
+
+} // namespace zorba
+#endif /* ZORBA_ZORBAPROPERTIES */
+/* vim:set et sw=2 ts=2: */

=== modified file 'src/system/zorba_properties.txt'
--- src/system/zorba_properties.txt	2013-03-22 05:41:14 +0000
+++ src/system/zorba_properties.txt	2014-01-27 23:46:04 +0000
@@ -1,49 +1,49 @@
-      ("trace-parsing,p", "trace parsing")
-      ("trace-scanning,s", "trace scanning")
-      ("use-serializer,r", "use serializer")
+      ("abort", "abort when fatal error happens")
+      ("CLASSPATH", po::value<std::string>(), "JVM classpath to be used by modules using Java implementations")
+      ("compile-only", "only compile (don't execute)")
+      ("debug", "compile the query in debug mode")
+      ("debug-file", po::value<std::string>(), "log file for debugging information")
+      ("dot-plan-file", po::value<std::string>(), "generate the dot iterator plan")
+      ("dump-lib", "dump function library")
+      ("external-var,x", po::value<std::vector<std::string> >(), "external variables (e.g. -x x=file1.xml -x y:=strValue)")
+      ("force-gflwor", "force compiler to generate GFLWOR iterators")
+      ("infer-joins", po::value<bool>()->default_value (true), "infer joins (1=enabled (default), 0=off)")
+      ("inline-udf", po::value<bool> ()->default_value (true), "inline functions (1=enabled (default), 0=off)")
+      ("iter-plan-test", "run as iterator plan test")
+      ("jsoniq,j", "use the new alternative jsoniq parser")
+      ("lib-module", "treat the query as a library module. If this is set --compile-only option is also set to true")
+      ("loop-hoisting", po::value<bool>()->default_value (true), "hoist expressions out of loops (1=enabled (default), 0=off)")
+      ("max-udf-call-depth", po::value<uint32_t>()->default_value(1024), "maximum stack depth of udf function calls")
+      ("no-copy-optim", po::value<bool>()->default_value(true), "no copy optim (1=enabled (default), 0=off)")
+      ("no-tree-ids", "suppress ids and locations from compiler tree dumps")
       ("optimizer,O", po::value<int> ()->default_value (1), "optimization level (0, 1 or 2 - 1 is default)")
-      ("result-file,o", po::value<std::string>(), "result file")
-      ("debug-file", po::value<std::string>(), "log file for debugging information")
-      ("abort", "abort when fatal error happens")
-      ("query,e", po::value<std::string>(), "execute inline query")
-      ("print-query,q", "print the query")
-      ("print-time,t", "print the execution time")
+      ("plan", "test plan serialization, i.e. save the plan, load it back and then execute it")
       ("print-ast,a", "print the parse tree")
-      ("print-xqdoc", "create output for XQDoc" )
-      ("print-translated", "print the normalized expression tree")
+      ("print-intermediate-opt", "print intermediate optimizations")
+      ("print-item-flow,f", "show items produced by all iterators")
+      ("print-iterator-tree,i", "print the iterator tree")
+      ("print-locations", "print parser locations for compiler expressions")
       ("print-normalized,n", "print the translated expression tree")
       ("print-optimized,P", "print the optimized expression tree")
-      ("print-iterator-tree,i", "print the iterator tree")
-      ("print-item-flow,f", "show items produced by all iterators")
+      ("print-query,q", "print the query")
       ("print-static-types", po::value<bool> ()->default_value (true), "print static type inference")
-      ("dump-lib", "dump function library")
-      ("stable-iterator-ids", "print the iterator plan with stable ids")
-      ("no-tree-ids", "suppress ids and locations from compiler tree dumps")
-      ("print-intermediate-opt", "print intermediate optimizations")
-      ("print-locations", "print parser locations for compiler expressions")
-      ("force-gflwor", "force compiler to generate GFLWOR iterators")
+      ("print-time,t", "print the execution time")
+      ("print-translated", "print the normalized expression tree")
+      ("print-xqdoc", "create output for XQDoc")
+      ("query,e", po::value<std::string>(), "execute inline query")
       ("reorder-globals", po::value<bool> ()->default_value (true), "reorder global variables (1=enabled (default), 0=off)")
+      ("result-file,o", po::value<std::string>(), "result file")
+      ("serialize-only-query", po::value<int>()->default_value(-1), "serialize-only query (1=true, 0=false, -1 unknown (default))")
+      ("serializer-param,z", po::value<std::vector<std::string> >(), "serializer parameters (see http://www.w3.org/TR/xslt-xquery-serialization/#serparam, e.g. -z method=xhtml, -z doctype-system='DTD/xhtml1-strict.dtd', -z indent=yes)")
+      ("specialize-cmp", po::value<bool> ()->default_value (true), "specialize generic comparisons (1=enabled (default), 0=off)")
       ("specialize-num", po::value<bool> ()->default_value (true), "specialize numerics (1=enabled (default), 0=off)")
-      ("specialize-cmp", po::value<bool> ()->default_value (true), "specialize generic comparisons (1=enabled (default), 0=off)")
-      ("inline-udf", po::value<bool> ()->default_value (true), "inline functions (1=enabled (default), 0=off)")
-      ("loop-hoisting", po::value<bool>()->default_value (true), "hoist expressions out of loops (1=enabled (default), 0=off)")
-      ("infer-joins", po::value<bool>()->default_value (true), "infer joins (1=enabled (default), 0=off)")
-      ("no-copy-optim", po::value<bool>()->default_value(true), "no copy optim (1=enabled (default), 0=off)")
-      ("serialize-only-query", po::value<int>()->default_value(-1), "serialize-only query (1=true, 0=false, -1 unknown (default))")
+      ("stable-iterator-ids", "print the iterator plan with stable ids")
 #ifndef NDEBUG
-      ("trace-translator,l", "trace the translator")
       ("trace-codegen,c", "trace the codegenerator")
       ("trace-fulltext", "trace full-text evaluation")
+      ("trace-translator,l", "trace the translator")
 #endif
-      ("debug", "compile the query in debug mode")
-      ("compile-only", "only compile (don't execute)")
-      ("lib-module", "treat the query as a library module. If this is set --compile-only option is also set to true")
+      ("trace-parsing,p", "trace parsing")
+      ("trace-scanning,s", "trace scanning")
       ("tz", po::value<int>(), "implicit time zone (in minutes)")
-      ("external-var,x", po::value<std::vector<std::string> >(), "external variables (e.g. -x x=file1.xml -x y:=strValue)")
-      ("serializer-param,z", po::value<std::vector<std::string> >(), "serializer parameters (see http://www.w3.org/TR/xslt-xquery-serialization/#serparam, e.g. -z method=xhtml, -z doctype-system='DTD/xhtml1-strict.dtd', -z indent=yes)")
-      ("iter-plan-test", "run as iterator plan test")
-      ("dot-plan-file", po::value<std::string>(), "generate the dot iterator plan")
-      ("plan", "test plan serialization, i.e. save the plan, load it back and then execute it")
-      ("jsoniq,j", "use the new alternative jsoniq parser")
-      ("max-udf-call-depth", po::value<uint32_t>()->default_value(1024), "maximum stack depth of udf function calls")
-      ("CLASSPATH", po::value<std::string>(), "JVM classpath to be used by modules using Java implementations")
\ No newline at end of file
+      ("use-serializer,r", "use serializer")

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to