Update of /cvsroot/monetdb/pathfinder/compiler/include
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21943/compiler/include

Modified Files:
        builtins.h logical_mnemonic.h mil.h mil_mnemonic.h 
Log Message:
This check-in contains the PTIJAH implementation using the Algebra version of
Pathfinder. All PFTIJAH functions are implemented using the new fun_call /
fun_param operations and (after some coaching by JanR:) this worked
pretty well.

Notes:

- all functions except tijah:ft-index-info() are implemented.

- The maintainance of the Full-Text indices is now also implemented using a
  'tape'. So indices are only modified AFTER the query.

- Implementatation may be a little bit buggy because only operations on
  small synthetic test examples have been test an no real complex scenarios
  have been tried.
  The coming weeks I will try to solve these small problems but I thought it
  is better to synchronize early.

Jan Flokstra.



U mil_mnemonic.h
Index: mil_mnemonic.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/mil_mnemonic.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- mil_mnemonic.h      20 Mar 2008 10:55:12 -0000      1.49
+++ mil_mnemonic.h      10 Apr 2008 13:38:42 -0000      1.50
@@ -410,4 +410,29 @@
 /** play docmgmt tape function */
 #define docmgmt_tape(a) PFmil_docmgmt (a)
 
+#ifdef HAVE_PFTIJAH
+
+/** pftijah main query handler */
+#define tj_query_handler(a,b,c,d,e,f,g) PFmil_tj_query_handler ((a), (b), (c), 
(d), (e), (f), (g))
+
+/** pftijah computes nodes from id's */
+#define tj_query_nodes(a,b,c)   PFmil_tj_query_nodes ((a), (b), (c) )
+
+/** pftijah computes score from id's and nodes */
+#define tj_query_score(a,b,c,d) PFmil_tj_query_score ((a), (b), (c), (d))
+
+/** pftijah helper fun to pack algebra operands */
+#define tj_pfop(a,b,c,d) PFmil_tj_pfop ((a), (b), (c), (d) )
+
+/** pftijah function  to handle documents and ft-index modifications at the
+ *  then end of a transaction */
+#define tj_docmgmt_tape(a,b,c,d,e,f) PFmil_tj_docmgmt_tape ((a), (b), (c), 
(d), (e), (f))
+
+/** add an ft-index event to the tape to be handled later by tj_docmgmt_tape 
function */
+#define tj_add_fti_tape(a,b,c,d,e,f) PFmil_tj_add_fti_tape ((a), (b), (c), 
(d), (e), (f))
+
+#define tj_tokenize(a) PFmil_tj_tokenize ((a))
+
+#endif
+
 /* vim:set shiftwidth=4 expandtab: */

U logical_mnemonic.h
Index: logical_mnemonic.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/logical_mnemonic.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- logical_mnemonic.h  16 Feb 2008 19:42:42 -0000      1.37
+++ logical_mnemonic.h  10 Apr 2008 13:38:41 -0000      1.38
@@ -220,6 +220,12 @@
 /* Constructor for debug relation map operator */
 #define trace_map(a,b,c,d) PFla_trace_map ((a),(b),(c),(d))
 
+#ifdef HAVE_PFTIJAH
+/* Constructor for pftijah operations */
+#define pft_options(a,b)   PFla_pft_options ((a),(b))
+#define pft_query(a,b,c)   PFla_pft_query ((a),(b),(c))
+#endif
+
 /* recursion operators */
 #define rec_fix(a,b) PFla_rec_fix ((a),(b))
 #define rec_param(a,b) PFla_rec_param ((a),(b))

U builtins.h
Index: builtins.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/builtins.h,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- builtins.h  18 Jan 2008 16:11:37 -0000      1.44
+++ builtins.h  10 Apr 2008 13:38:41 -0000      1.45
@@ -657,6 +657,7 @@
                                      struct PFla_pair_t *args);
 
 
+
 /* #3. UPDATE FUNCTIONS */
 struct PFla_pair_t PFbui_upd_rename (const PFla_op_t *loop, bool ordering,
                                      struct PFla_pair_t *args);
@@ -696,6 +697,84 @@
                                            bool ordering,
                                            struct PFla_pair_t *args);
 
+#ifdef HAVE_PFTIJAH
+/* #3. PFTIJAH SPECIFIC FUNCTIONS */
+
+/*
+ * The fti management functions
+ */
+struct PFla_pair_t PFbui_manage_fti_c_xx(const PFla_op_t *loop,
+                                         bool ordering,
+                                         struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_manage_fti_c_cx(const PFla_op_t *loop,
+                                         bool ordering,
+                                         struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_manage_fti_c_xo(const PFla_op_t *loop,
+                                         bool ordering,
+                                         struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_manage_fti_c_co(const PFla_op_t *loop,
+                                         bool ordering,
+                                         struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_manage_fti_e_cx(const PFla_op_t *loop,
+                                         bool ordering,
+                                         struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_manage_fti_e_co(const PFla_op_t *loop,
+                                         bool ordering,
+                                         struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_manage_fti_r_xx(const PFla_op_t *loop,
+                                         bool ordering,
+                                         struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_manage_fti_r_xo(const PFla_op_t *loop,
+                                         bool ordering,
+                                         struct PFla_pair_t *args);
+
+/*
+ * The main query functions
+ */
+struct PFla_pair_t PFbui_tijah_query_i_xx (const PFla_op_t *loop,
+                                           bool ordering,
+                                           struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_tijah_query_i_xo (const PFla_op_t *loop,
+                                           bool ordering,
+                                           struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_tijah_query_i_sx (const PFla_op_t *loop,
+                                           bool ordering,
+                                           struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_tijah_query_i_so (const PFla_op_t *loop,
+                                           bool ordering,
+                                           struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_tijah_query_n_xx (const PFla_op_t *loop,
+                                           bool ordering,
+                                           struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_tijah_query_n_xo (const PFla_op_t *loop,
+                                           bool ordering,
+                                           struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_tijah_query_n_sx (const PFla_op_t *loop,
+                                           bool ordering,
+                                           struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_tijah_query_n_so (const PFla_op_t *loop,
+                                           bool ordering,
+                                           struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_tijah_nodes      (const PFla_op_t *loop,
+                                           bool ordering,
+                                           struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_tijah_score      (const PFla_op_t *loop,
+                                           bool ordering,
+                                           struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_tijah_ft_index_info      (const PFla_op_t *loop,
+                                           bool ordering,
+                                           struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_tijah_ft_index_info_s      (const PFla_op_t *loop,
+                                           bool ordering,
+                                           struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_tijah_tokenize   (const PFla_op_t *loop,
+                                           bool ordering,
+                                           struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_tijah_resultsize (const PFla_op_t *loop,
+                                           bool ordering,
+                                           struct PFla_pair_t *args);
+#endif
+
 #endif   /* BUITLINS_H */
 
 /* vim:set shiftwidth=4 expandtab: */

U mil.h
Index: mil.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/mil.h,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- mil.h       20 Mar 2008 10:55:12 -0000      1.59
+++ mil.h       10 Apr 2008 13:38:42 -0000      1.60
@@ -99,6 +99,11 @@
 #define PF_MIL_VAR_TRACE_TYPE  55
 #define PF_MIL_VAR_TRACE_REL   56
 
+#ifdef HAVE_PFTIJAH
+#define PF_MIL_TIJAH_SCORE_DB  58
+#define PF_MIL_TIJAH_FTI_TAPE  59
+#endif
+
 #define PF_MIL_VAR_AXIS_ANC    60
 #define PF_MIL_VAR_AXIS_ANC_S  61
 #define PF_MIL_VAR_AXIS_CHLD   62
@@ -358,6 +363,15 @@
 
     , m_update_tape  /**< play update tape function */ 
     , m_docmgmt_tape /**< play docmgmt tape function */ 
+#ifdef HAVE_PFTIJAH
+    , m_tj_pfop
+    , m_tj_tokenize
+    , m_tj_query_handler
+    , m_tj_query_score
+    , m_tj_query_nodes
+    , m_tj_add_fti_tape
+    , m_tj_docmgmt_tape
+#endif
 };
 typedef enum PFmil_kind_t PFmil_kind_t;
 
@@ -855,6 +869,24 @@
                 (const PFmil_t *[]) { __VA_ARGS__ } )
 PFmil_t *PFmil_seq_ (int count, const PFmil_t **stmts);
 
+#ifdef HAVE_PFTIJAH
+
+PFmil_t * PFmil_tj_query_handler (const PFmil_t *a, const PFmil_t *b, const 
PFmil_t *c, const PFmil_t *d, const PFmil_t *e, const PFmil_t *f, const PFmil_t 
*g);
+
+PFmil_t * PFmil_tj_query_score (const PFmil_t *a, const PFmil_t *b, const 
PFmil_t *c, const PFmil_t *d);
+
+PFmil_t * PFmil_tj_query_nodes (const PFmil_t *a, const PFmil_t *b, const 
PFmil_t *c);
+
+PFmil_t * PFmil_tj_pfop (const PFmil_t *a, const PFmil_t *b, const PFmil_t *c, 
const PFmil_t *d);
+
+PFmil_t * PFmil_tj_docmgmt_tape (const PFmil_t *a, const PFmil_t *b, const 
PFmil_t *c, const PFmil_t *d, const PFmil_t *e, const PFmil_t *f);
+
+PFmil_t * PFmil_tj_add_fti_tape (const PFmil_t *a, const PFmil_t *b, const 
PFmil_t *c, const PFmil_t *d, const PFmil_t *e, const PFmil_t *f);
+
+PFmil_t * PFmil_tj_tokenize (const PFmil_t *a);
+#endif
+
+
 #endif   /* MIL_H */
 
 /* vim:set shiftwidth=4 expandtab: */


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to