Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv29306/runtime

Modified Files:
        Makefile.ag ll_sibling.mx ll_staircasejoin.mx ll_upwards.mx 
        pf_support.mx shredder.mx 
Removed Files:
        levelsteps.mx prec_foll.mx staircasejoin.mx 
Log Message:

With the last location-step being loop-lifted we can start cleaning-up the code 
base:

removed iterative location-step legacy

(changes are wrapped in tags
 "before_iterative_location-step_clean-up" & 
"after_iterative_location-step_clean-up")


--- levelsteps.mx DELETED ---

Index: pf_support.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pf_support.mx,v
retrieving revision 1.262
retrieving revision 1.263
diff -u -d -r1.262 -r1.263
--- pf_support.mx       9 Aug 2007 21:49:39 -0000       1.262
+++ pf_support.mx       10 Aug 2007 00:26:43 -0000      1.263
@@ -264,24 +264,6 @@
 
 @- Path steps (staircase join) 
 @m
-@(
-@:prec_foll(following)@
-@:prec_foll(preceding)@
-@)
-
[EMAIL PROTECTED] prec_foll
-.COMMAND @1_void (BAT[void,int] pre_size,
-               BAT[oid,any] ctx,
-               BAT[oid,oid] doc_pre,
-               int upperbound) : BAT[oid,void] = [EMAIL PROTECTED];
-"PARAMETERS
-  pre_size: the complete size BAT (preorder rank, size)
-  ctx: context node sequence (preorder rank, *)
-  doc_pre: table of document containers (doc id, preorder start value)
-  upperbound: upperbound for size of result context node sequence
-DESCRIPTION
-axis step evaluation on the @1 axis from the given context."
[EMAIL PROTECTED]
 @:ll_prec_foll_decl(following)@
 @:ll_prec_foll_decl(preceding)@
 
@@ -301,11 +283,9 @@
 chr kind_test (kind to test for; chr_nil if no kind test)
 DESCRIPTION:
 returns all nodes on the @1 axis of the ctx-nodes duplicate free for each 
group."
+@
 @m
 @:ll_sibling_decl(following)@
-@(
-@:ll_sibling_decl(preceding)@
-@)
 
 @= ll_sibling_decl
 .COMMAND [EMAIL PROTECTED](BAT[oid,oid] iter,
@@ -323,22 +303,7 @@
 chr kind_test (kind to test for; chr_nil if no kind test)
 DESCRIPTION:
 returns all nodes on the @1-sibling axis of the ctx-nodes duplicate free for 
each group."
[EMAIL PROTECTED]
-@:scj_cmd(descorself,descendant-or-self)@
-@:scj_cmd(desc,descendant)@
-@:scj_cmd(ancorself,ancestor-or-self)@
-@:scj_cmd(anc,ancestor)@
-
[EMAIL PROTECTED] scj_cmd
-.COMMAND [EMAIL PROTECTED](BAT[void,int] pre_size,
-                BAT[oid,any] ctx,
-                int upperbound): BAT[oid,void] = [EMAIL PROTECTED];
-"PARAMETERS
-  pre_size: the complete size BAT (preorder rank, size)
-  ctx: context node sequence (preorder rank, *)
-  upperbound: upperbound for size of result context node sequence
-DESCRIPTION
-axis step evaluation on the @2 axis from the given context."
+@
 @m
 @:ll_cmd(descendant)@
 @:ll_cmd(descendant_or_self)@
@@ -367,6 +332,7 @@
                result will be ordered on item, but not sub-ordered on iter)
 DESCRIPTION:
 returns all nodes on the @1 axis of the ctx-nodes duplicate free for each 
group."
+@
 @m
 @:ll_upwards(parent,parent)@
 @:ll_upwards(ancestor,ancestor)@
@@ -383,24 +349,6 @@
 BAT[void,int] pre_level (from the working set)
 DESCRIPTION:
 returns all nodes on the @2 axis of the ctx-nodes duplicate free for each 
group."
[EMAIL PROTECTED]
-@:lev_cmd(child,child)@
-@:lev_cmd(parent,parent)@
-@(
-@:lev_cmd(fs,following-sibling)@
-@:lev_cmd(ps,preceding-sibling)@
-@)
-
[EMAIL PROTECTED] lev_cmd
-.COMMAND [EMAIL PROTECTED](BAT[void,chr] pre_level,
-                BAT[oid,any] ctx,
-                int upperbound) : BAT[oid,void] = [EMAIL PROTECTED];
-"PARAMETERS
-  pre_level: the complete level BAT (preorder rank, level)
-  ctx: context node sequence (preorder rank, *)
-  upperbound: upperbound for size of result context node sequence
-DESCRIPTION
-axis step evaluation on the @2 axis from the given context."
 
 @- update primitives
 @m
@@ -1421,43 +1369,17 @@
 # interface provides...
 # 
 
-@(
-@:step(descendant,descendant,scj_desc,,@:sizes_code@,,)@
-@:step(descendant_or_self,descendant-or-self,scj_descorself,,@:sizes_code@,,)@
-@)
-
 @:wrap(descendant)@
 @:wrap(descendant_or_self)@
-
-@(
-@:step(parent,parent,lev_parent,@:level_intro@,@:level_code@,,)@
-@:step(ancestor,ancestor,scj_anc,,@:sizes_code@,,)@
-@:step(ancestor_or_self,ancestor-or-self,scj_ancorself,,@:sizes_code@,,)@
-@)
+@:wrap(child)@
 
 @:upwards(parent)@
 @:upwards(ancestor)@
 @:upwards(ancestor_or_self)@
 
-@(
-@:step(child,child,lev_child,@:level_intro@,@:level_code@,,)@
-@)
-
-@:wrap(child)@
-
-@(
-@:step(following_sibling,following-sibling,lev_fs,@:level_intro@,@:level_code@,,)@
-@:step(preceding_sibling,preceding-sibling,lev_ps,@:level_intro@,@:level_code@,,)@
-@)
-
 @:ll_sibling_impl_following@
 @:ll_sibling_impl_preceding@
 
-@(
-@:step(following,following,following_void,,@:sizes_code@, 
@:foll_prec_code@,@:doc_pre@)@
-@:step(preceding,preceding,preceding_void,,@:sizes_code@, 
@:foll_prec_code@,@:doc_pre@)@
-@)
-
 @:ll_prec_foll_impl(following)@
 @:ll_prec_foll_impl(preceding)@
 
@@ -1684,84 +1606,6 @@
                          .access(BAT_READ);
        }
 @
-# use size concept
[EMAIL PROTECTED] sizes_code
-pre_sizes
-@
-# use level concept
[EMAIL PROTECTED] level_intro
-    var pre_levels := ws.fetch(PRE_LEVEL).fetch(cont);
-@
[EMAIL PROTECTED] level_code
-pre_levels
-@
-# code for following and preceding steps
[EMAIL PROTECTED] foll_prec_code
-    # find the document root-pre's for prec_foll
-    var nid_rid := ws.fetch(NID_RID).fetch(cont);
-    var map_pid := ws.fetch(MAP_PID).fetch(cont);
-    var doc_pre := ws.fetch(FRAG_ROOT).fetch(cont).tmark([EMAIL 
PROTECTED]).leftfetchjoin(nid_rid).[swizzle](map_pid).chk_order();
-@
[EMAIL PROTECTED] doc_pre
-doc_pre,
-@
-
[EMAIL PROTECTED] step
-PROC @1(BAT[void,oid] iter, BAT[void,oid] ctx, oid cont, BAT[void,bat] ws, int 
order ) : BAT[void,bat]
-{
-    # "order" is not (yet?) used, here.
-
-    var pre_sizes := ws.fetch(PRE_SIZE).fetch(cont);
-    @4
-
-    var unq := {count}(iter.reverse(), iter.tunique(),FALSE);
-
-    var offset := 0;
-    var ctx_slice;
-
-    @6
-
-    var res_iter, res_item;
-    if (count(unq) = 1) {
-        res_iter := constant2bat(unq.reverse().fetch(0));
-           ctx_slice := ctx.reverse().project(nil);
-           ctx_slice := ctx_slice.chk_order(); # have to check because step 
expects it sorted
-        res_item := @3( @5, ctx_slice, @7 pre_sizes.count()).hmark([EMAIL 
PROTECTED]);
-        res_item := res_item.chk_order();
-    } else {
-        res_iter := bat(void,oid);
-        res_item := bat(void,oid);
-        [EMAIL PROTECTED] () {
-            ctx_slice := ctx.slice(offset, offset + $t - 
1).reverse().project(nil);
-            ctx_slice := ctx_slice.chk_order(); # have to check because step 
expects it sorted
-            var res := @3( @5, ctx_slice, @7 pre_sizes.count()).reverse();
-            res := res.chk_order();
-            res_item.append(res);
-            var l := count(res);
-            if (l <= $t) {
-                res_iter.append(iter.slice(offset, offset + l - 1));
-            } else {
-                res_iter.append(res.project($h));
-            }
-            offset := offset + $t;
-        }
-        res_iter := res_iter.seqbase([EMAIL 
PROTECTED]).access(BAT_READ).chk_order();
-        res_item := res_item.seqbase([EMAIL 
PROTECTED]).access(BAT_READ).chk_order();
-    }
-    return new(void,bat,2).seqbase([EMAIL PROTECTED])
-           .append(res_iter)
-           .append(res_item)
-           .access(BAT_READ);
-}
-ADDHELP("@1", "tsheyar", "Sep 2004",
-"PARAMETERS:\n\
-BAT[void,any] iter (grouping relation)\n\
-BAT[void,any] ctx (context set)\n\
-oid cont (the current container of the ws)\n\
-BAT[void,bat] ws (working set)\n\
-DESCRIPTION:\n\
-returns all nodes on the @2 axis of the ctx-nodes duplicate free for each 
group.",
-"pf_support");
 
 @= upwards
 PROC @1(BAT[void,oid] iter, BAT[void,oid] ctx, oid cont, BAT[void,bat] ws, int 
order) : BAT[void,bat]
@@ -1853,7 +1697,10 @@
 @= ll_prec_foll_impl
 PROC @1(BAT[void,oid] iter, BAT[void,oid] item, oid cont, BAT[void,bat] ws, 
int order, chr kind_test) : BAT[void,bat]
 {
-    @:foll_prec_code@
+    # find the document root-pre's for prec_foll
+    var nid_rid := ws.fetch(NID_RID).fetch(cont);
+    var map_pid := ws.fetch(MAP_PID).fetch(cont);
+    var doc_pre := ws.fetch(FRAG_ROOT).fetch(cont).tmark([EMAIL 
PROTECTED]).leftfetchjoin(nid_rid).[swizzle](map_pid).chk_order();
     var pre_sizes := ws.fetch(PRE_SIZE).fetch(cont);
     var pre_kinds;
     if (isnil(kind_test)) {
@@ -2042,9 +1889,6 @@
 
 # expanding the scj for the different tests
 @= loop_lifted_scj_wrap1
-@:loop_lifted_scj_wrap_pre(@1)@
-@
[EMAIL PROTECTED] loop_lifted_scj_wrap_pre
 @:loop_lifted_scj_step2(@1,,,,,                                                
               @:params2@,@:no_pre@)@
 @:loop_lifted_scj_step2(@1,_with_kind_test,  @:kind_args@, @:kind_params@,,    
               @:params2@,@:kind_pre(kind)@)@
 @:loop_lifted_scj_step2(@1,_with_nsloc_test, 
@:nsloc_args@,@:nsloc_params@,@:nsloc_post@,     @:params2@,@:nsloc_pre@)@
@@ -2052,14 +1896,6 @@
 @:loop_lifted_scj_step2(@1,_with_loc_test,   @:loc_args@,  @:loc_params@,  
@:loc_post@,       @:params2@,@:loc_pre@)@
 @:loop_lifted_scj_step2(@1,_with_target_test,@:tgt_args@,  @:tgt_params@,  
@:target_post@,    @:params2@,@:no_pre@)@
 @
[EMAIL PROTECTED] loop_lifted_scj_wrap_post
-@:loop_lifted_scj_step2(@1,,,,,                                                
               @:params2@,@:no_pre@)@
-@:loop_lifted_scj_step2(@1,_with_kind_test,  @:kind_args@, @:kind_params@, 
@:kind_post(kind)@,@:params2@,@:no_pre@)@
-@:loop_lifted_scj_step2(@1,_with_nsloc_test, 
@:nsloc_args@,@:nsloc_params@,@:nsloc_post@,     @:params2@,@:no_pre@)@
-@:loop_lifted_scj_step2(@1,_with_ns_test,    @:ns_args@,   @:ns_params@,   
@:ns_post@,        @:params2@,@:no_pre@)@
-@:loop_lifted_scj_step2(@1,_with_loc_test,   @:loc_args@,  @:loc_params@,  
@:loc_post@,       @:params2@,@:no_pre@)@
-@:loop_lifted_scj_step2(@1,_with_target_test,@:tgt_args@,  @:tgt_params@,  
@:target_post@,    @:params2@,@:no_pre@)@
-@
 @= loop_lifted_scj_step1
 @:loop_lifted_scj_step2(@1,,,,,,                                               
                )@
 @:loop_lifted_scj_step2(@1,_with_kind_test,  @:kind_args@, @:kind_params@, 
@:kind_post(kind)@,,)@

Index: Makefile.ag
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/Makefile.ag,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- Makefile.ag 31 Jul 2007 08:10:12 -0000      1.76
+++ Makefile.ag 10 Aug 2007 00:26:43 -0000      1.77
@@ -44,7 +44,6 @@
 lib_pf = {
        NOINST
         SOURCES = \
-                levelsteps.mx \
                ll_staircasejoin.mx \
                 ll_upwards.mx \
                 ll_prec_foll.mx \
@@ -55,8 +54,6 @@
         DIR = libdir/MonetDB4
         SOURCES = \
                 pf_support.mx \
-                staircasejoin.mx \
-                prec_foll.mx \
                 shredder.mx 
         LIBS = \
                 libserialize libpf $(PF_LIBS) \

Index: ll_upwards.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/ll_upwards.mx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- ll_upwards.mx       19 Apr 2007 14:11:13 -0000      1.21
+++ ll_upwards.mx       10 Aug 2007 00:26:43 -0000      1.22
@@ -91,7 +91,7 @@
 @c
 #include "pf_config.h"
 #include <gdk.h>
-#include "levelsteps.h"
+#include "shredder.h" /* for XML_DEPTH_MAX */
 
 static char LL_UPWARDS_PARENT[] = "parent";
 static char LL_UPWARDS_ANCESTOR[] = "ancestor";

Index: ll_staircasejoin.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/ll_staircasejoin.mx,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- ll_staircasejoin.mx 9 Aug 2007 21:49:39 -0000       1.58
+++ ll_staircasejoin.mx 10 Aug 2007 00:26:43 -0000      1.59
@@ -36,8 +36,8 @@
 */
 
 #include "pf_config.h"
-#include "levelsteps.h"
 #include <gdk.h>
+#include "shredder.h" /* for XML_DEPTH_MAX */
 
 #if 0
 #define prefetch_loc(addr) \

Index: shredder.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/shredder.mx,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -d -r1.130 -r1.131
--- shredder.mx 2 Aug 2007 22:36:13 -0000       1.130
+++ shredder.mx 10 Aug 2007 00:26:45 -0000      1.131
@@ -33,6 +33,8 @@
 #ifndef SHREDDER_H
 #define SHREDDER_H
 
+#define XML_DEPTH_MAX 128
+
 #include "serialize.h" /* for struct serializeFunStruct & struct XqueryCtx */
 #include "pf_support.h"
 
@@ -63,7 +65,6 @@
 #include <gdk.h>
 #include <monet.h>
 
-#include "levelsteps.h"
 #include "pathfinder.h"
 #include "pf_support.h"
 #include "shredder.h"

--- staircasejoin.mx DELETED ---

--- prec_foll.mx DELETED ---

Index: ll_sibling.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/ll_sibling.mx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ll_sibling.mx       31 Jul 2007 08:10:15 -0000      1.1
+++ ll_sibling.mx       10 Aug 2007 00:26:43 -0000      1.2
@@ -34,8 +34,8 @@
 *
 */
 #include "pf_config.h"
-#include "levelsteps.h"
 #include <gdk.h>
+#include "shredder.h" /* for XML_DEPTH_MAX */
 
 /**
  * This file contains the axis step algoritms for the following-sibling axis.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to