SXSI/xpathcomp.git
11 years agoMerge branch 'handle-stdout' master
Kim Nguyễn [Fri, 26 Oct 2012 12:41:52 +0000 (14:41 +0200)]
Merge branch 'handle-stdout'

Allows to pass - as stdout.

11 years agoMerge branch 'master' of ssh://git.nguyen.vg/SXSI/xpathcomp
Kim Nguyễn [Fri, 26 Oct 2012 12:40:52 +0000 (14:40 +0200)]
Merge branch 'master' of ssh://git.nguyen.vg/SXSI/xpathcomp

11 years agoMerge branch 'split-options-config'
Kim Nguyễn [Fri, 26 Oct 2012 12:40:15 +0000 (14:40 +0200)]
Merge branch 'split-options-config'

Conflicts:
src/main.ml
src/runtime.ml

11 years agoSplit the Options module in two to remove a circular dependency in
Kim Nguyễn [Sun, 21 Oct 2012 07:43:52 +0000 (09:43 +0200)]
Split the Options module in two to remove a circular dependency in
the pretty-printing module:
    Options depends on Logger to have the list of all logs levels
    Logger depends on Options to check whether we are in verbose mode
    or not.
Split:
      Config options holds the references storing the options
      Options only handles the parsing of the command line

11 years agoUse attribute force_align_arg_pointer only for architectures where it
Kim Nguyễn [Fri, 26 Oct 2012 11:55:32 +0000 (13:55 +0200)]
Use attribute force_align_arg_pointer only for architectures where it
is defined (currently x86).

11 years agoMerge branch 'master' of ssh://git.nguyen.vg/SXSI/xpathcomp
Kim Nguyễn [Fri, 26 Oct 2012 12:08:14 +0000 (14:08 +0200)]
Merge branch 'master' of ssh://git.nguyen.vg/SXSI/xpathcomp
Incorporate changes needed to make the code behave on x86.

11 years agoMerge branch 'pretty-print'
Kim Nguyễn [Fri, 26 Oct 2012 12:07:00 +0000 (14:07 +0200)]
Merge branch 'pretty-print'

This branch reworks the pretty-printing infrastructure. This allows to give
the printer of log messages more control on format's boxes (which is necessary
for proper display).

11 years agoMerge branch 'reentrent-timing'
Kim Nguyễn [Fri, 26 Oct 2012 12:04:11 +0000 (14:04 +0200)]
Merge branch 'reentrent-timing'

The work in this branch makes the timing function re-entrant. It is now
possible to do (Utils.time f x ~msg:"Timing f") where f does
(Utils.time g y ~msg:"Timing g") and time will properly print out the timing
for g and f (in that order) when f returns.

11 years agoFix a subtle bug where OCaml/C function stack are not aligned on a 16 byte
Kim Nguyẽn [Tue, 23 Oct 2012 13:45:36 +0000 (15:45 +0200)]
Fix a subtle bug where OCaml/C function stack are not aligned on a 16 byte
boundary. This causes problem when calling optimized C code (in e.g. libcds)
where g++ assumed that all stacks are alligned on a 16 byte boundary (to use
instructions such as movaps freely).

11 years agoDo not pass -fno-PIC when compiling for x86 (since the option is
Kim Nguyễn [Mon, 22 Oct 2012 15:45:50 +0000 (17:45 +0200)]
Do not pass -fno-PIC when compiling for x86 (since the option is
only valid for amd64)

11 years agoChange the structure of log messages. Add a new
Kim Nguyễn [Mon, 22 Oct 2012 15:56:30 +0000 (17:56 +0200)]
Change the structure of log messages. Add a new
Logger.start_msg/Logger.msg/Logger.end_msg to have more controle about
box/opening/closing.

11 years agoDo not unconditionally flush the current formatting in logger.
Kim Nguyễn [Sun, 21 Oct 2012 10:38:25 +0000 (12:38 +0200)]
Do not unconditionally flush the current formatting in logger.
Leave that responsibility to the caller.

11 years agoDo not print number of runs/average/min/max timing when a function
Kim Nguyễn [Sun, 21 Oct 2012 10:25:07 +0000 (12:25 +0200)]
Do not print number of runs/average/min/max timing when a function
is only timed once.

11 years agoRemove non-reentrant timing function.
Kim Nguyễn [Sun, 21 Oct 2012 10:12:58 +0000 (12:12 +0200)]
Remove non-reentrant timing function.

11 years agoMake the time function re-entrant.
Kim Nguyễn [Sun, 21 Oct 2012 10:10:34 +0000 (12:10 +0200)]
Make the time function re-entrant.

11 years agoFix indentation in the time function.
Kim Nguyễn [Sun, 21 Oct 2012 08:55:53 +0000 (10:55 +0200)]
Fix indentation in the time function.
Use Utils.time instead of the one INCLUDED "utils.ml"

11 years agoMerge branch 'master' into pretty-print
Kim Nguyễn [Sun, 21 Oct 2012 07:54:08 +0000 (09:54 +0200)]
Merge branch 'master' into pretty-print
      New merge to add the forgotten src/config.ml

11 years agoForgot to add the new src/config.ml file.
Kim Nguyễn [Sun, 21 Oct 2012 07:53:31 +0000 (09:53 +0200)]
Forgot to add the new src/config.ml file.

11 years agoMerge branch 'master' into pretty-print
Kim Nguyễn [Sun, 21 Oct 2012 07:51:19 +0000 (09:51 +0200)]
Merge branch 'master' into pretty-print

11 years agoSplit the Options module in two to remove a circular dependency in
Kim Nguyễn [Sun, 21 Oct 2012 07:43:52 +0000 (09:43 +0200)]
Split the Options module in two to remove a circular dependency in
the pretty-printing module:
    Options depends on Logger to have the list of all logs levels
    Logger depends on Options to check whether we are in verbose mode
    or not.
Split:
      Config options holds the references storing the options
      Options only handles the parsing of the command line

11 years agoWIP on beautyfying the pretty-printing module.
Kim Nguyễn [Sun, 21 Oct 2012 07:36:36 +0000 (09:36 +0200)]
WIP on beautyfying the pretty-printing module.
    move the reading of /proc/<pid>/status in the Utils module
    work to move the timing function in there too.

11 years agoSupport '-' on the command line as an aliase for /dev/stdout.
Kim Nguyễn [Sat, 20 Oct 2012 17:09:21 +0000 (19:09 +0200)]
Support '-' on the command line as an aliase for /dev/stdout.

11 years agoClean-up temporary files after testing.
Kim Nguyễn [Sat, 20 Oct 2012 10:27:49 +0000 (12:27 +0200)]
Clean-up temporary files after testing.

11 years agoMake the non-regression testing more robust by feeding the output
Kim Nguyễn [Fri, 19 Oct 2012 19:33:45 +0000 (21:33 +0200)]
Make the non-regression testing more robust by feeding the output
of the reference XML engine into SXSI to produce the output of
'/child::*'. This allows to serialize again the XML document in
the exact same way as SXSI, allowing to use a simple diff to check
for differences in the output.

11 years agoAdd option -nw control the wrapping of results in an <xml_result/> node.
Kim Nguyễn [Fri, 19 Oct 2012 19:13:06 +0000 (21:13 +0200)]
Add option -nw control the wrapping of results in an <xml_result/> node.

11 years agoCompletely silences the output unless -v is given.
Kim Nguyễn [Fri, 19 Oct 2012 18:20:52 +0000 (20:20 +0200)]
Completely silences the output unless -v is given.

11 years agoFix bug in the handling of element-subtree lazy result sets. non-regression-tests
Kim Nguyễn [Fri, 19 Oct 2012 13:07:45 +0000 (15:07 +0200)]
Fix bug in the handling of element-subtree lazy result sets.

11 years agoAlso serialize results in counting mode (prints the count in the output file)
Kim Nguyễn [Fri, 19 Oct 2012 13:06:54 +0000 (15:06 +0200)]
Also serialize results in counting mode (prints the count in the output file)

11 years agoAdd test docs.
Kim Nguyễn [Fri, 19 Oct 2012 13:03:45 +0000 (15:03 +0200)]
Add test docs.

11 years agoAdd non-regression testing infrastructures and first tests.
Kim Nguyễn [Fri, 19 Oct 2012 12:46:52 +0000 (14:46 +0200)]
Add non-regression testing infrastructures and first tests.

11 years agoAdd explicitely index files in the main .gitignore
Kim Nguyễn [Fri, 19 Oct 2012 12:46:03 +0000 (14:46 +0200)]
Add explicitely index files in the main .gitignore
remove directory local gitignore file.

11 years agoRemove the tests directory from the .gitignore file.
Kim Nguyễn [Fri, 19 Oct 2012 12:44:55 +0000 (14:44 +0200)]
Remove the tests directory from the .gitignore file.

11 years agoFix the xpath script to enclose results in an <xml_result></xml_result> element
Kim Nguyễn [Fri, 19 Oct 2012 12:44:27 +0000 (14:44 +0200)]
Fix the xpath script to enclose results in an <xml_result></xml_result> element

11 years agoRename directory non_regression_tests to comparison_tests
Kim Nguyễn [Fri, 19 Oct 2012 12:42:46 +0000 (14:42 +0200)]
Rename directory non_regression_tests to comparison_tests

11 years agoFollow the changes in XMLTree API: xml_tree::subtree_elements() does track-xml-tree-better-doc
Kim Nguyễn [Wed, 17 Oct 2012 17:05:14 +0000 (19:05 +0200)]
Follow the changes in XMLTree API: xml_tree::subtree_elements() does
not require an extra array of attributes anymore.

11 years agoSilence a format-related warning (%i -> %lu).
Kim Nguyễn [Wed, 17 Oct 2012 17:00:00 +0000 (19:00 +0200)]
Silence a format-related warning (%i -> %lu).

11 years agoFix the path to the #included bp.h (bp/bp.h -> libbp/bp.h)
Kim Nguyễn [Wed, 17 Oct 2012 16:57:45 +0000 (18:57 +0200)]
Fix the path to the #included bp.h (bp/bp.h -> libbp/bp.h)

11 years agoChange configure to reflect name change in the bp library
Kim Nguyễn [Sat, 13 Oct 2012 12:56:22 +0000 (14:56 +0200)]
Change configure to reflect name change in the bp library
(bp become libbp).

11 years agoAdd runtime assertion to check that values passed to Obj_val()
Kim Nguyễn [Sat, 13 Oct 2012 12:54:02 +0000 (14:54 +0200)]
Add runtime assertion to check that values passed to Obj_val()
are indeed custom blocks.

11 years agoFix a nasty bug where the wrong pointer was passed to the C side.
Kim Nguyễn [Fri, 12 Oct 2012 20:46:38 +0000 (22:46 +0200)]
Fix a nasty bug where the wrong pointer was passed to the C side.

11 years agoBUG closed: [fc7c30b] Wrong display of empty attributes.
Kim Nguyễn [Fri, 12 Oct 2012 18:55:24 +0000 (20:55 +0200)]
BUG closed: [fc7c30b] Wrong display of empty attributes.

11 years agoBUG added: [fc7c30b28705] Wrong display of empty attributes.
Kim Nguyễn [Fri, 12 Oct 2012 14:37:51 +0000 (16:37 +0200)]
BUG added: [fc7c30b28705] Wrong display of empty attributes.

11 years agoBUG closed: [59c2eb8] Wrong result for jumping from root
Kim Nguyễn [Fri, 12 Oct 2012 14:10:57 +0000 (16:10 +0200)]
BUG closed: [59c2eb8] Wrong result for jumping from root

11 years agoMerge branch 'master' of ssh://git.nguyen.vg/home/kim/repository/SXSI/xpathcomp
Kim Nguyễn [Fri, 12 Oct 2012 14:08:04 +0000 (16:08 +0200)]
Merge branch 'master' of ssh://git.nguyen.vg/home/kim/repository/SXSI/xpathcomp

11 years agoIgnore everything under test.
Kim Nguyễn [Fri, 12 Oct 2012 14:07:51 +0000 (16:07 +0200)]
Ignore everything under test.

11 years agoAdd a test program for experimenting with lexicographic indices.
Kim Nguyễn [Fri, 12 Oct 2012 14:04:45 +0000 (16:04 +0200)]
Add a test program for experimenting with lexicographic indices.

11 years agoRemove all traces of Tom's Grammar.
Kim Nguyễn [Tue, 24 Jul 2012 15:33:03 +0000 (17:33 +0200)]
Remove all traces of Tom's Grammar.

11 years agoChange incorrect english in error message.
Kim Nguyễn [Tue, 24 Jul 2012 15:11:01 +0000 (17:11 +0200)]
Change incorrect english in error message.

11 years agoBUG added: [59c2eb816cf4] Wrong result for jumping from root
Kim Nguyễn [Wed, 30 May 2012 12:56:26 +0000 (14:56 +0200)]
BUG added: [59c2eb816cf4] Wrong result for jumping from root

11 years agoAdd tests for wordbased index.
Kim Nguyễn [Wed, 30 May 2012 12:17:47 +0000 (14:17 +0200)]
Add tests for wordbased index.

11 years agoFix bug in commandline parsing.
Kim Nguyễn [Tue, 29 May 2012 05:59:34 +0000 (07:59 +0200)]
Fix bug in commandline parsing.

11 years agoRework test scripts
Kim Nguyễn [Tue, 29 May 2012 05:58:54 +0000 (07:58 +0200)]
Rework test scripts

11 years agoFix typo in debugging message.
Kim Nguyễn [Tue, 29 May 2012 05:53:07 +0000 (07:53 +0200)]
Fix typo in debugging message.

11 years agoAdd command line option to disable caching and jumping
Kim Nguyễn [Tue, 29 May 2012 05:50:26 +0000 (07:50 +0200)]
Add command line option to disable caching and jumping

11 years agoBump file format magic number, invalidate all previously generated indexes.
Kim Nguyễn [Tue, 29 May 2012 05:49:14 +0000 (07:49 +0200)]
Bump file format magic number, invalidate all previously generated indexes.

11 years agoAdd -doc-stats options to print document statistics.
Kim Nguyễn [Fri, 4 May 2012 14:00:11 +0000 (16:00 +0200)]
Add -doc-stats options to print document statistics.

11 years agoAdd support for multiline XPath queries.
Kim Nguyễn [Fri, 4 May 2012 12:57:57 +0000 (14:57 +0200)]
Add support for multiline XPath queries.

11 years agoBUG added: [2c899aa21af4] OCamlbuild dependencies
Kim Nguyễn [Wed, 2 May 2012 12:41:18 +0000 (14:41 +0200)]
BUG added: [2c899aa21af4] OCamlbuild dependencies

11 years agoFixes on queries and test scripts to handle old versions of SXSI.
Kim Nguyễn [Wed, 2 May 2012 12:34:45 +0000 (14:34 +0200)]
Fixes on queries and test scripts to handle old versions of SXSI.

11 years agoVarious fixes for bottom-up run.
Kim Nguyễn [Wed, 2 May 2012 12:34:18 +0000 (14:34 +0200)]
Various fixes for bottom-up run.

11 years agoVarious improvements:
Kim Nguyễn [Wed, 2 May 2012 12:32:34 +0000 (14:32 +0200)]
Various improvements:
- Store the set of attributes in a TLIST instead of a Ptset.Int.t
- Add a C trim function for string (to remove whitespaces left and right)
- Rewrite the text_query wrappers.

11 years agoAdd more logging statements.
Kim Nguyễn [Wed, 2 May 2012 12:31:57 +0000 (14:31 +0200)]
Add more logging statements.

11 years agoAdd 'bottom-up' logging level.
Kim Nguyễn [Wed, 2 May 2012 12:31:00 +0000 (14:31 +0200)]
Add 'bottom-up' logging level.

11 years agoAdd a command line option to disable the indexing of ignorable whitespaces.
Kim Nguyễn [Wed, 2 May 2012 12:26:42 +0000 (14:26 +0200)]
Add a command line option to disable the indexing of ignorable whitespaces.

11 years agoDon't flush the XML printing buffer if nothing was printed.
Kim Nguyễn [Wed, 2 May 2012 12:24:36 +0000 (14:24 +0200)]
Don't flush the XML printing buffer if nothing was printed.

11 years agoAdd word-based index auxiliary index files to .gitignore.
Kim Nguyễn [Wed, 2 May 2012 12:11:50 +0000 (14:11 +0200)]
Add word-based index auxiliary index files to .gitignore.

12 years agoRevert "Call directly the low-level subtree_elements function instead of"
Kim Nguyễn [Tue, 24 Apr 2012 14:24:39 +0000 (16:24 +0200)]
Revert "Call directly the low-level subtree_elements function instead of"

This reverts commit d6c57f01eabebe2b11e1c701835562c2efc2fd92.
The tentative fix for performance regression is buggy and make things slower.

12 years agoBUG reopened: [a3fdf1a] Performance regression
Kim Nguyễn [Tue, 24 Apr 2012 14:24:19 +0000 (16:24 +0200)]
BUG reopened: [a3fdf1a] Performance regression

12 years agoBUG closed: [a3fdf1a] Performance regression
Kim Nguyễn [Tue, 24 Apr 2012 13:52:29 +0000 (15:52 +0200)]
BUG closed: [a3fdf1a] Performance regression

12 years agoCall directly the low-level subtree_elements function instead of
Kim Nguyễn [Tue, 24 Apr 2012 13:50:38 +0000 (15:50 +0200)]
Call directly the low-level subtree_elements function instead of
re-implementing it in ocaml.
Fixes bug: a3fdf1a5  Performance regression

12 years agoBUG added: [2a89b3b569f4] duplicate interface definitions
Kim Nguyễn [Tue, 24 Apr 2012 07:53:05 +0000 (09:53 +0200)]
BUG added: [2a89b3b569f4] duplicate interface definitions

12 years agoBUG added: [a3fdf1a569f4] Performance regression
Kim Nguyễn [Tue, 24 Apr 2012 07:47:38 +0000 (09:47 +0200)]
BUG added: [a3fdf1a569f4] Performance regression

12 years agoInitialized bug tracker
Kim Nguyễn [Tue, 24 Apr 2012 07:44:31 +0000 (09:44 +0200)]
Initialized bug tracker

12 years agoAdd hooks to re-initialize hconsed modules.
Kim Nguyễn [Fri, 20 Apr 2012 14:54:22 +0000 (16:54 +0200)]
Add hooks to re-initialize hconsed modules.

12 years agoReplace \n by @\n in log message.
Kim Nguyễn [Fri, 20 Apr 2012 14:49:47 +0000 (16:49 +0200)]
Replace \n by @\n in log message.
Remove the tracing code around exec (ocaml generate less efficient code
even for noops).

12 years agoMinor code factoring.
Kim Nguyễn [Fri, 20 Apr 2012 14:05:44 +0000 (16:05 +0200)]
Minor code factoring.
Call Ata.init() before a global top-down run to clear global cache.

12 years agoFavor {first,next}_element calls instead of select_{descendant,following_below},
Kim Nguyễn [Fri, 20 Apr 2012 14:01:53 +0000 (16:01 +0200)]
Favor {first,next}_element calls instead of select_{descendant,following_below},
when the set of target tags is large (esp. it contains everything but attributes).

12 years agoMake constant construtors of L2JIT.opcode CACHE and RETURN be take a
Kim Nguyễn [Fri, 20 Apr 2012 13:41:17 +0000 (15:41 +0200)]
Make constant construtors of L2JIT.opcode CACHE and RETURN be take a
dummy unit argument. This improves the code generated for the pattern
matching in l2jit_dispatch (in runtime.ml).
Replaces inline macros LOOP and LOOP_TAG with function calls.

12 years agoUse better defaults for top-down cache size.
Kim Nguyễn [Fri, 20 Apr 2012 13:34:41 +0000 (15:34 +0200)]
Use better defaults for top-down cache size.

12 years agoAdd -r <n> option to repeat the query execution n times.
Kim Nguyễn [Fri, 20 Apr 2012 13:31:44 +0000 (15:31 +0200)]
Add -r <n> option to repeat the query execution n times.

12 years agoChange the read_procmem function to return the stack size of the process
Kim Nguyễn [Fri, 20 Apr 2012 13:28:52 +0000 (15:28 +0200)]
Change the read_procmem function to return the stack size of the process
not the heap size.

12 years agoAdd performance regression test script.
Kim Nguyễn [Fri, 20 Apr 2012 13:27:31 +0000 (15:27 +0200)]
Add performance regression test script.

12 years agoChange the inlining
Kim Nguyễn [Wed, 18 Apr 2012 13:10:27 +0000 (15:10 +0200)]
Change the inlining
Remove dependency on pkg-config

12 years agoAdd utility header file. new-xml-tree
Kim Nguyễn [Wed, 18 Apr 2012 11:48:10 +0000 (13:48 +0200)]
Add utility header file.

12 years agoChange from unordered_set<tag> to int array in low-level select_* functions.
Kim Nguyễn [Wed, 18 Apr 2012 11:47:13 +0000 (13:47 +0200)]
Change from unordered_set<tag> to int array in low-level select_* functions.

12 years agoChange the ifndef guard from FOO_H_ to FOO_HPP_ to keep it consistent with
Kim Nguyễn [Wed, 18 Apr 2012 11:45:20 +0000 (13:45 +0200)]
Change the ifndef guard from FOO_H_ to FOO_HPP_ to keep it consistent with
the filename.

12 years agoMisc. rewrites:
Kim Nguyễn [Wed, 18 Apr 2012 11:43:32 +0000 (13:43 +0200)]
Misc. rewrites:
      - cosmetic changes tab -> whitespaces
      - more logging

12 years agoEncapsulate serialization results around with <xml_result>...</xml_result>
Kim Nguyễn [Thu, 12 Apr 2012 16:08:18 +0000 (18:08 +0200)]
Encapsulate serialization results around with <xml_result>...</xml_result>

12 years agoMore debugging:
Kim Nguyễn [Thu, 12 Apr 2012 14:32:33 +0000 (16:32 +0200)]
More debugging:
     remove progress printing during parsing
     add debuging trace in resJIT (show which node is added to the result set)

12 years agoFinish adapting to new libxml-tree API
Kim Nguyễn [Fri, 6 Apr 2012 12:04:14 +0000 (14:04 +0200)]
Finish adapting to new libxml-tree API
       - Code is much cleaner
       - Speed is mostly the same, often faster but two offenders:
       Q9 : 155 -> 190ms
       Q28: 2s -> 3.5 s
       Need to be investigated.

12 years agoBig refactoring of libxml-tree, part (1) (everything compiles)
Kim Nguyễn [Wed, 4 Apr 2012 17:07:23 +0000 (19:07 +0200)]
Big refactoring of libxml-tree, part (1) (everything compiles)

12 years agoOptimize the bottom-up run using a Camlp4 macro instead of an
Kim Nguyễn [Mon, 2 Apr 2012 13:09:27 +0000 (15:09 +0200)]
Optimize the bottom-up run using a Camlp4 macro instead of an
(un-inlined) recursive call.

12 years agoSilence compiler warning about unused variables.
Kim Nguyễn [Mon, 2 Apr 2012 13:09:11 +0000 (15:09 +0200)]
Silence compiler warning about unused variables.

12 years agoUses the Logger.print function instead of Printf.eprintf
Kim Nguyễn [Mon, 2 Apr 2012 13:05:27 +0000 (15:05 +0200)]
Uses the Logger.print function instead of Printf.eprintf

12 years agoAdd text() and node() tokens in the lexer to allow node test and
Kim Nguyễn [Mon, 2 Apr 2012 13:02:41 +0000 (15:02 +0200)]
Add text() and node() tokens in the lexer to allow node test and
text node test in XPath expression.

12 years agoFix bug where the Lvl2 Cache got corrupted upon resizing.
Kim Nguyễn [Mon, 2 Apr 2012 13:00:24 +0000 (15:00 +0200)]
Fix bug where the Lvl2 Cache got corrupted upon resizing.

12 years agoRemove unused memory profiling code.
Kim Nguyễn [Mon, 2 Apr 2012 12:39:58 +0000 (14:39 +0200)]
Remove unused memory profiling code.

12 years agoAdd efficient compare_int in INCLUDED .ml files.
Kim Nguyễn [Mon, 2 Apr 2012 12:37:21 +0000 (14:37 +0200)]
Add efficient compare_int in INCLUDED .ml files.

12 years agoChange the logging infrastructure:
Kim Nguyễn [Tue, 20 Mar 2012 20:17:18 +0000 (21:17 +0100)]
Change the logging infrastructure:
       - rely on the Format module to correctly indent log messages
       - re-use the Pretty module has much as possible to print
       sequences and arrays.
       - add version of print_list and print_array that take a printer
       as optional argument to print the separator (rather than a string).

12 years agoRename flags for build script from -foo to -enable-foo
Kim Nguyễn [Tue, 20 Mar 2012 20:16:15 +0000 (21:16 +0100)]
Rename flags for build script from -foo to -enable-foo