SXSI/xpathcomp.git
12 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.

12 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

12 years agoAdd the auction.dtd document type definition to the repository.
Kim Nguyễn [Mon, 19 Mar 2012 17:41:12 +0000 (18:41 +0100)]
Add the auction.dtd document type definition to the repository.

12 years agoRename 'Tracer' module to 'Logger'.
Kim Nguyễn [Mon, 19 Mar 2012 17:40:25 +0000 (18:40 +0100)]
Rename 'Tracer' module to 'Logger'.

12 years agoRevert "Remove the need for a NOP operation in automata bytecode."
Kim Nguyễn [Mon, 19 Mar 2012 14:24:15 +0000 (15:24 +0100)]
Revert "Remove the need for a NOP operation in automata bytecode."

This reverts commit a6c781462ddca7c25fe95789c81c2265f153203c.
The automata is unsound and returns boggus results for child moves
without the nop case.

12 years agoTemporary commit
Kim Nguyễn [Mon, 19 Mar 2012 14:19:28 +0000 (15:19 +0100)]
Temporary commit

12 years agoRemove -flto from the linking phase.
Kim Nguyễn [Thu, 15 Mar 2012 15:06:43 +0000 (16:06 +0100)]
Remove -flto from the linking phase.

12 years agoEnsure that the c++ flags defined in myocamlbuild_config.ml.in are passed
Kim Nguyễn [Wed, 14 Mar 2012 23:20:49 +0000 (00:20 +0100)]
Ensure that the c++ flags defined in myocamlbuild_config.ml.in are passed
to ocamlopt for linking.

12 years agoChange inlining parameter to 1000 again.
Kim Nguyễn [Wed, 14 Mar 2012 18:07:26 +0000 (19:07 +0100)]
Change inlining parameter to 1000 again.

12 years agoFinaly clean up formula representation.
Kim Nguyễn [Wed, 14 Mar 2012 18:07:42 +0000 (19:07 +0100)]
Finaly clean up formula representation.

12 years agoAdd query
Kim Nguyễn [Wed, 14 Mar 2012 14:33:42 +0000 (15:33 +0100)]
Add query

12 years agoAdd performance tests
Kim Nguyễn [Wed, 14 Mar 2012 14:33:15 +0000 (15:33 +0100)]
Add performance tests

12 years agoFix test scripts.
Kim Nguyễn [Wed, 14 Mar 2012 14:32:49 +0000 (15:32 +0100)]
Fix test scripts.

12 years agoIgnore .g files (grammar). tool-shed
Kim Nguyễn [Wed, 14 Mar 2012 13:02:41 +0000 (14:02 +0100)]
Ignore .g files (grammar).

12 years agoMake the tree/text interface more flexible to various text index.
Kim Nguyễn [Wed, 14 Mar 2012 13:01:49 +0000 (14:01 +0100)]
Make the tree/text interface more flexible to various text index.

12 years agoSmall refactoring:
Kim Nguyễn [Wed, 14 Mar 2012 13:00:44 +0000 (14:00 +0100)]
Small refactoring:
      - split subtree/subtree_tag marking into separate function
      - general clean-up
      - comment out some grammar related stuff

12 years agoRemove the need for a NOP operation in automata bytecode.
Kim Nguyễn [Wed, 14 Mar 2012 13:00:02 +0000 (14:00 +0100)]
Remove the need for a NOP operation in automata bytecode.

12 years agoClean-up Hcons module:
Kim Nguyễn [Wed, 14 Mar 2012 12:52:16 +0000 (13:52 +0100)]
Clean-up Hcons module:
 - remove dead code
 - avoid one allocation.

12 years agoAdd iteri function to traverse cache data structures.
Kim Nguyễn [Wed, 14 Mar 2012 12:47:31 +0000 (13:47 +0100)]
Add iteri function to traverse cache data structures.

12 years agoSort and remove duplicate from text query results (needed for the
Kim Nguyễn [Wed, 14 Mar 2012 12:46:30 +0000 (13:46 +0100)]
Sort and remove duplicate from text query results (needed for the
word-based text index).

12 years agoAdd a C implementation of leading_bit and clz to optimize Patricia tree
Kim Nguyễn [Wed, 14 Mar 2012 12:45:17 +0000 (13:45 +0100)]
Add a C implementation of leading_bit and clz to optimize Patricia tree
library.

12 years agoUpdate compilation flag:
Kim Nguyễn [Wed, 14 Mar 2012 12:39:42 +0000 (13:39 +0100)]
Update compilation flag:
       - change the value of inlining for OCaml code
       - pass -O3 as a flag to the C/C++ compiler

12 years agoAdd text-attribute tags to the star tagset.
Kim Nguyễn [Thu, 1 Mar 2012 13:31:13 +0000 (14:31 +0100)]
Add text-attribute tags to the star tagset.

12 years agoPut grammar stuff.
Kim Nguyễn [Thu, 1 Mar 2012 13:30:24 +0000 (14:30 +0100)]
Put grammar stuff.

12 years agoUpdate parsing of tree.
Kim Nguyễn [Thu, 1 Mar 2012 13:29:53 +0000 (14:29 +0100)]
Update parsing of tree.

12 years agoCosmetic changes.
Kim Nguyễn [Thu, 1 Mar 2012 13:29:42 +0000 (14:29 +0100)]
Cosmetic changes.

12 years agoCosmetic changes.
Kim Nguyễn [Thu, 1 Mar 2012 13:29:21 +0000 (14:29 +0100)]
Cosmetic changes.

12 years agoAdd grammar related function to result sets (2/2).
Kim Nguyễn [Thu, 1 Mar 2012 13:28:45 +0000 (14:28 +0100)]
Add grammar related function to result sets (2/2).

12 years agoAdd grammar related function to result sets.
Kim Nguyễn [Thu, 1 Mar 2012 13:28:25 +0000 (14:28 +0100)]
Add grammar related function to result sets.

12 years agoUpdate to new caching infrastructure.
Kim Nguyễn [Thu, 1 Mar 2012 13:27:59 +0000 (14:27 +0100)]
Update to new caching infrastructure.

12 years agoTemporary commit for grammar stuff.
Kim Nguyễn [Thu, 1 Mar 2012 13:27:23 +0000 (14:27 +0100)]
Temporary commit for grammar stuff.

12 years agoSmall optimization (replace lor 1 by + 1)
Kim Nguyễn [Thu, 1 Mar 2012 13:26:59 +0000 (14:26 +0100)]
Small optimization (replace lor 1 by + 1)

12 years agoPass debugging flags to malloc.
Kim Nguyễn [Thu, 1 Mar 2012 13:26:24 +0000 (14:26 +0100)]
Pass debugging flags to malloc.

12 years agoUpdate caching infrastructure to automatically resize when needed.
Kim Nguyễn [Thu, 1 Mar 2012 13:25:56 +0000 (14:25 +0100)]
Update caching infrastructure to automatically resize when needed.

12 years agoCosmetic changes.
Kim Nguyễn [Thu, 1 Mar 2012 13:25:35 +0000 (14:25 +0100)]
Cosmetic changes.

12 years agoCosmetic change.
Kim Nguyễn [Thu, 1 Mar 2012 13:25:07 +0000 (14:25 +0100)]
Cosmetic change.

12 years agoEnable gcc link time optimizations.
Kim Nguyễn [Thu, 1 Mar 2012 13:24:30 +0000 (14:24 +0100)]
Enable gcc link time optimizations.

12 years agoReduce output in verbose mode.
Kim Nguyễn [Thu, 1 Mar 2012 13:24:03 +0000 (14:24 +0100)]
Reduce output in verbose mode.

12 years agoImprove caching table:
Kim Nguyễn [Tue, 28 Feb 2012 14:33:10 +0000 (15:33 +0100)]
Improve caching table:
- uses the first used index as an offset. Allows to store
compactly tables indexed by 10000, 10001, ... without storing
the first 10000 that are never accessed.
- resize automatically if lower offset is accessed

Prevent caching overflow for large automata.

12 years agoRemove support for outdated libGrammar, replaced by Grammar2
Kim Nguyễn [Wed, 22 Feb 2012 21:43:32 +0000 (22:43 +0100)]
Remove support for outdated libGrammar, replaced by Grammar2

12 years agoAdd *.{native,byte} to .gitignore
Kim Nguyễn [Wed, 22 Feb 2012 17:04:50 +0000 (18:04 +0100)]
Add *.{native,byte} to .gitignore

12 years agoAdd Grammar related programs.
Kim Nguyễn [Wed, 22 Feb 2012 17:04:39 +0000 (18:04 +0100)]
Add Grammar related programs.

12 years agoModify alarm to not treat the program's options as its own.
Kim Nguyễn [Wed, 22 Feb 2012 16:56:34 +0000 (17:56 +0100)]
Modify alarm to not treat the program's options as its own.
       - Changes the way alarm is invoked:
       alarm [options] -- program [program options]

12 years agoNew run function based on rank2 grammars:
Kim Nguyễn [Wed, 22 Feb 2012 16:54:15 +0000 (17:54 +0100)]
New run function based on rank2 grammars:
    - hard-code the fact that there are 7 possible shape for bCNF rules of rank 2
    - avoid allocating arrays to pass parametters around
    - run the Gc less often.

12 years agoAdd function to query the memory usage of the BP structure.
Kim Nguyễn [Wed, 22 Feb 2012 16:53:34 +0000 (17:53 +0100)]
Add function to query the memory usage of the BP structure.

12 years agoFinish porting to the Grammar2 API
Kim Nguyễn [Wed, 22 Feb 2012 15:01:05 +0000 (16:01 +0100)]
Finish porting to the Grammar2 API

12 years agoAdd function to cast tags to integers.
Kim Nguyễn [Wed, 22 Feb 2012 11:03:07 +0000 (12:03 +0100)]
Add function to cast tags to integers.

12 years agoAdd missing functions in the grammar2 API.
Kim Nguyễn [Wed, 22 Feb 2012 10:15:50 +0000 (11:15 +0100)]
Add missing functions in the grammar2 API.

12 years agoFix indentation issues.
Kim Nguyễn [Wed, 22 Feb 2012 09:17:56 +0000 (10:17 +0100)]
Fix indentation issues.

12 years agoAdd grammar loading and indexing.
Kim Nguyễn [Wed, 22 Feb 2012 09:17:10 +0000 (10:17 +0100)]
Add grammar loading and indexing.

12 years agoAdds new tracing points in the grammar runtime.
Kim Nguyễn [Wed, 22 Feb 2012 09:16:44 +0000 (10:16 +0100)]
Adds new tracing points in the grammar runtime.

12 years agoChanges the log format to include a timestamp.
Kim Nguyễn [Wed, 22 Feb 2012 09:15:34 +0000 (10:15 +0100)]
Changes the log format to include a timestamp.

12 years agoAdd an extra parameter to cons so that it does not perform
Kim Nguyễn [Wed, 22 Feb 2012 09:14:40 +0000 (10:14 +0100)]
Add an extra parameter to cons so that it does not perform
ordered insertion w.r.t the unique ID.

12 years agoVarious fixes to the old grammar interface
Kim Nguyễn [Wed, 22 Feb 2012 09:14:21 +0000 (10:14 +0100)]
Various fixes to the old grammar interface

12 years agoAllow to pass an explicit destructor when registering a custom tag
Kim Nguyễn [Wed, 22 Feb 2012 09:13:19 +0000 (10:13 +0100)]
Allow to pass an explicit destructor when registering a custom tag
for a given type.

12 years agoAdd wrappers for sadakane's data structure.
Kim Nguyễn [Wed, 22 Feb 2012 09:12:24 +0000 (10:12 +0100)]
Add wrappers for sadakane's data structure.

12 years agoNew version of the Grammar data-structure
Kim Nguyễn [Wed, 22 Feb 2012 09:11:29 +0000 (10:11 +0100)]
New version of the Grammar data-structure

12 years agoNew version of the alarm utility.
Kim Nguyễn [Fri, 17 Feb 2012 17:02:05 +0000 (18:02 +0100)]
New version of the alarm utility.

12 years agoFirst attempt at having a grammar runtime.
Kim Nguyễn [Thu, 16 Feb 2012 18:08:19 +0000 (19:08 +0100)]
First attempt at having a grammar runtime.
Needs more work to optimize array allocation.

12 years agoRemove hard-coded acess to SXSI for tag operations.
Kim Nguyễn [Thu, 16 Feb 2012 13:08:36 +0000 (14:08 +0100)]
Remove hard-coded acess to SXSI for tag operations.
       * Now a data structure can register operations for tags via the Tag module.

12 years ago.
Kim Nguyễn [Thu, 16 Feb 2012 07:48:49 +0000 (08:48 +0100)]
.

12 years agoStart making the code tag agnostic.
Kim Nguyễn [Thu, 16 Feb 2012 01:58:36 +0000 (02:58 +0100)]
Start making the code tag agnostic.

12 years agoAdd a new tracer level for debugging grammar run.
Kim Nguyễn [Thu, 16 Feb 2012 01:46:37 +0000 (02:46 +0100)]
Add a new tracer level for debugging grammar run.

12 years agoAdd variance indicator to type.
Kim Nguyễn [Thu, 16 Feb 2012 01:46:18 +0000 (02:46 +0100)]
Add variance indicator to type.

12 years agoFinished fixing the pre-order traversal of the grammar.
Kim Nguyễn [Thu, 16 Feb 2012 01:45:36 +0000 (02:45 +0100)]
Finished fixing the pre-order traversal of the grammar.

12 years agoTemporary commit.
Kim Nguyễn [Wed, 15 Feb 2012 18:09:37 +0000 (19:09 +0100)]
Temporary commit.