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

Modified Files:
      Tag: PF_ROX
        logical.h logical_mnemonic.h mil.h mil_mnemonic.h nsres.h 
        physdebug.h physical.h physical_mnemonic.h sql.h 
        sql_mnemonic.h xml2lalg_converters.h 
Log Message:
propagated changes of Wednesday Jan 30 2008 - Saturday Feb 09 2008
from the development trunk to the PF_ROX branch


Index: nsres.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/nsres.h,v
retrieving revision 1.10
retrieving revision 1.10.4.1
diff -u -d -r1.10 -r1.10.4.1
--- nsres.h     11 Jan 2008 10:47:07 -0000      1.10
+++ nsres.h     9 Feb 2008 08:40:31 -0000       1.10.4.1
@@ -38,6 +38,11 @@
 #include "abssyn.h"
 
 /**
+ * Initialize the namespaces.
+ */
+void PFns_init (void);
+
+/**
  * Resolve NS usage in a query.
  */
 void PFns_resolve (PFpnode_t *);

Index: physical.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/physical.h,v
retrieving revision 1.36
retrieving revision 1.36.4.1
diff -u -d -r1.36 -r1.36.4.1
--- physical.h  11 Jan 2008 10:47:07 -0000      1.36
+++ physical.h  9 Feb 2008 08:40:32 -0000       1.36.4.1
@@ -86,6 +86,7 @@
     , pa_bool_or        =  47 /**< Boolean or */
     , pa_bool_and_atom  =  48 /**< Boolean and, where one arg is an atom */
     , pa_bool_or_atom   =  49 /**< Boolean or, where one arg is an atom */
+    , pa_to             =  50 /**< op:to operator */
     , pa_hash_count     =  55 /**< Hash-based count operator */
     , pa_avg            =  56 /**< Avg operator */
     , pa_max            =  57 /**< Max operator */
@@ -343,10 +344,9 @@
 
     /* semantic content for error and conditional error */
     struct {
-        /* error: column of error message
-         * cond_error: name of the boolean attribute */
-        PFalg_att_t     att;
-        char *          str;     /**< error message, only used by cond_err */
+        PFalg_att_t     att;      /**< error:      column of error message
+                                       cond_error: name of the bool column */
+        char *          str;      /**< error message (only used by cond_err) */
     } err;
     
     /* semantic content for debug relation map operator */
@@ -638,6 +638,12 @@
                          PFalg_att_t att1, PFalg_atom_t att2);
 
 /**
+ * Constructor for op:to operator
+ */
+PFpa_op_t * PFpa_to (const PFpa_op_t *n, PFalg_att_t res,
+                     PFalg_att_t att1, PFalg_att_t att2);
+
+/**
  * HashCount: Hash-based Count operator. Does neither benefit from
  * any existing ordering, nor does it provide/preserve any input
  * ordering.
@@ -771,12 +777,10 @@
 
 /**
  * Access to persistently stored document table.
- *
- * Requires an iter | item schema as its input.
  */
 PFpa_op_t * PFpa_doc_tbl (const PFpa_op_t *,
-                          PFalg_att_t iter,
-                          PFalg_att_t item);
+                          PFalg_att_t res,
+                          PFalg_att_t att);
 
 /**
  * Access to the string content of loaded documents
@@ -869,9 +873,10 @@
 PFpa_op_t *PFpa_empty_frag (void);
 
 /**
- * Constructor for error
+ * Constructor for a runtime error message
  */
-PFpa_op_t * PFpa_error (const PFpa_op_t *n,  PFalg_att_t att);
+PFpa_op_t * PFpa_error (const PFpa_op_t *n,  PFalg_att_t att,
+                        PFalg_simple_type_t att_ty);
 
 /**
  * Constructor for conditional error

Index: logical_mnemonic.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/logical_mnemonic.h,v
retrieving revision 1.34
retrieving revision 1.34.4.1
diff -u -d -r1.34 -r1.34.4.1
--- logical_mnemonic.h  11 Jan 2008 10:47:06 -0000      1.34
+++ logical_mnemonic.h  9 Feb 2008 08:40:30 -0000       1.34.4.1
@@ -100,7 +100,7 @@
 #define not(a,b,c)        PFla_not ((a),(b),(c))
 
 /* op:to operator */
-#define to(a,b,c,d,e)     PFla_to ((a),(b),(c),(d),(e))
+#define to(a,b,c,d)       PFla_to ((a),(b),(c),(d))
 
 /* operator applying a (partitioned) aggregation function on a column */
 #define aggr(a,b,c,d,e)   PFla_aggr ((a),(b),(c),(d),(e))
@@ -149,7 +149,7 @@
         PFla_doc_index_join ((a),(b),(c),(d),(e),(f))
 
 /* document table */
-#define doc_tbl(a,b,c,d)    PFla_doc_tbl((a),(b),(c),(d))
+#define doc_tbl(a,b,c)    PFla_doc_tbl((a),(b),(c))
 
 /* document content access */
 #define doc_access(a,b,c,d,e) PFla_doc_access ((a), (b), (c), (d), (e))

Index: sql_mnemonic.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/sql_mnemonic.h,v
retrieving revision 1.34
retrieving revision 1.34.2.1
diff -u -d -r1.34 -r1.34.2.1
--- sql_mnemonic.h      15 Jan 2008 12:23:49 -0000      1.34
+++ sql_mnemonic.h      9 Feb 2008 08:40:32 -0000       1.34.2.1
@@ -75,11 +75,10 @@
 #define left_outer_join(tbl1, tbl2)     PFsql_left_outer_join(tbl1, tbl2)
 #define where_list(...)                 PFsql_where_list(__VA_ARGS__)
 
-/* .......... Union .......... */
+/* .......... Set operators .......... */
 #define union_(a,b)                  PFsql_union(a,b)
-
-/* .......... Difference .......... */
 #define diff(a,b)                    PFsql_difference(a,b)
+#define intersect(a,b)               PFsql_intersect(a,b)
 
 /* .......... Literal construction .......... */
 #define lit_int(i)                   PFsql_lit_int(i)
@@ -127,6 +126,12 @@
 #define min(c)                       PFsql_min(c)
 #define avg(c)                       PFsql_avg(c)
 #define sum(c)                       PFsql_sum(c)
+
+/* ............ String Functions ........... */
+
+#define str_length(a)                PFsql_str_length(a)
+#define str_upper(a)                 PFsql_str_upper(a)
+#define str_lower(a)                 PFsql_str_lower(a)
                                      
 /* .......... OLAP Functionality .......... */
 #define over(a,b)                    PFsql_over(a,b)

Index: physdebug.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/physdebug.h,v
retrieving revision 1.7
retrieving revision 1.7.4.1
diff -u -d -r1.7 -r1.7.4.1
--- physdebug.h 11 Jan 2008 10:47:07 -0000      1.7
+++ physdebug.h 9 Feb 2008 08:40:31 -0000       1.7.4.1
@@ -42,7 +42,6 @@
 #include "physical.h"
 
 void PFpa_dot (FILE *, PFpa_op_t *);
-void PFpa_xml (FILE *, PFpa_op_t *);
 
 #endif  /* PHYSDEBUG_H */
 

Index: mil_mnemonic.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/mil_mnemonic.h,v
retrieving revision 1.44
retrieving revision 1.44.2.1
diff -u -d -r1.44 -r1.44.2.1
--- mil_mnemonic.h      20 Jan 2008 22:35:04 -0000      1.44
+++ mil_mnemonic.h      9 Feb 2008 08:40:31 -0000       1.44.2.1
@@ -223,6 +223,8 @@
 #endif
 #define max(a) PFmil_max(a)
 
+#define enumerate(a,b) PFmil_enumerate((a),(b))
+
 /** count() operator and grouped count */
 #define count(a) PFmil_count(a)
 #define gcount(a) PFmil_gcount(a)
@@ -263,6 +265,9 @@
 /** multiplexed arithmetic modulo */
 #define mmod(a,b) PFmil_mmod ((a), (b))
 
+/** multiplexed arithmetic maximum */
+#define mmax(a,b) PFmil_mmax ((a), (b))
+
 /** greater than */
 #define gt(a,b) PFmil_gt ((a), (b))
 

Index: physical_mnemonic.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/physical_mnemonic.h,v
retrieving revision 1.28
retrieving revision 1.28.4.1
diff -u -d -r1.28 -r1.28.4.1
--- physical_mnemonic.h 11 Jan 2008 10:47:07 -0000      1.28
+++ physical_mnemonic.h 9 Feb 2008 08:40:32 -0000       1.28.4.1
@@ -96,9 +96,10 @@
 
 #define bool_not(a,b,c)      PFpa_bool_not ((a), (b), (c))
 
-#define hash_count(a,b,c)    PFpa_hash_count ((a), (b), (c))
+#define to(a,b,c,d)          PFpa_to ((a), (b), (c), (d))
 
-#define aggr(a,b,c,d, e)     PFpa_aggr ((a), (b), (c), (d), (e))
+#define hash_count(a,b,c)    PFpa_hash_count ((a), (b), (c))
+#define aggr(a,b,c,d,e)      PFpa_aggr ((a), (b), (c), (d), (e))
 
 /** a sort specification list is just another attribute list */
 #define sortby(...)          PFord_order_intro (__VA_ARGS__)
@@ -178,7 +179,7 @@
 /** empty fragment list */
 #define empty_frag()         PFpa_empty_frag ()
 
-#define error(a,b)             PFpa_error ((a), (b))
+#define error(a,b,c)         PFpa_error ((a), (b), (c))
 #define cond_err(a,b,c,d)    PFpa_cond_err ((a), (b), (c), (d))
 #define nil()                PFpa_nil ()
 #define trace(a,b,c,d)       PFpa_trace ((a),(b),(c),(d))

Index: xml2lalg_converters.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/xml2lalg_converters.h,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -u -d -r1.2 -r1.2.4.1
--- xml2lalg_converters.h       11 Jan 2008 10:47:09 -0000      1.2
+++ xml2lalg_converters.h       9 Feb 2008 08:40:33 -0000       1.2.4.1
@@ -74,7 +74,8 @@
  
 
 PFalg_atom_t 
-PFxml2la_conv_2PFLA_atom(char* typeString, char* valueString);
+PFxml2la_conv_2PFLA_atom(PFalg_simple_type_t,
+                         char *prefix, char *uri, char* valueString);
 
 
 PFalg_comp_t 
@@ -89,9 +90,6 @@
 PFalg_axis_t 
 PFxml2la_conv_2PFLA_xpathaxis(char* s);
 
-PFty_t 
-PFxml2la_conv_2PFLA_sequenceType(char* s);
-
 PFalg_doc_t 
 PFxml2la_conv_2PFLA_docType(char* s);
 

Index: mil.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/mil.h,v
retrieving revision 1.54
retrieving revision 1.54.2.1
diff -u -d -r1.54 -r1.54.2.1
--- mil.h       20 Jan 2008 22:35:04 -0000      1.54
+++ mil.h       9 Feb 2008 08:40:30 -0000       1.54.2.1
@@ -52,54 +52,55 @@
 #define PF_MIL_VAR_KIND_TEXT    5
 #define PF_MIL_VAR_KIND_COM     6
 #define PF_MIL_VAR_KIND_PI      7
+#define PF_MIL_VAR_KIND_REF     8
 
-#define PF_MIL_VAR_ATTR         8
-#define PF_MIL_VAR_ELEM         9
+#define PF_MIL_VAR_ATTR        10
+#define PF_MIL_VAR_ELEM        11
 
-#define PF_MIL_VAR_STR         10
-#define PF_MIL_VAR_INT         11
-#define PF_MIL_VAR_DBL         12
-#define PF_MIL_VAR_DEC         13
-#define PF_MIL_VAR_BOOL        14
+#define PF_MIL_VAR_STR         13
+#define PF_MIL_VAR_INT         14
+#define PF_MIL_VAR_DBL         15
+#define PF_MIL_VAR_DEC         16
+#define PF_MIL_VAR_BOOL        17
 
-#define PF_MIL_VAR_PRE_SIZE    15
-#define PF_MIL_VAR_PRE_LEVEL   16
-#define PF_MIL_VAR_PRE_KIND    17
-#define PF_MIL_VAR_PRE_PROP    18
-#define PF_MIL_VAR_PRE_CONT    19
-#define PF_MIL_VAR_PRE_NID     20
-#define PF_MIL_VAR_NID_RID     21
-#define PF_MIL_VAR_FRAG_ROOT   22
-#define PF_MIL_VAR_ATTR_OWN    23
-#define PF_MIL_VAR_ATTR_QN     24
-#define PF_MIL_VAR_ATTR_PROP   25
-#define PF_MIL_VAR_ATTR_CONT   26
-#define PF_MIL_VAR_QN_LOC      27
-#define PF_MIL_VAR_QN_URI      28
-#define PF_MIL_VAR_QN_PREFIX   29
-#define PF_MIL_VAR_PROP_VAL    30
-#define PF_MIL_VAR_PROP_TEXT   31
-#define PF_MIL_VAR_PROP_COM    32
-#define PF_MIL_VAR_PROP_INS    33
-#define PF_MIL_VAR_PROP_TGT    34
+#define PF_MIL_VAR_PRE_SIZE    20
+#define PF_MIL_VAR_PRE_LEVEL   21
+#define PF_MIL_VAR_PRE_KIND    22
+#define PF_MIL_VAR_PRE_PROP    23
+#define PF_MIL_VAR_PRE_CONT    24
+#define PF_MIL_VAR_PRE_NID     25
+#define PF_MIL_VAR_NID_RID     26
+#define PF_MIL_VAR_FRAG_ROOT   27
+#define PF_MIL_VAR_ATTR_OWN    28
+#define PF_MIL_VAR_ATTR_QN     29
+#define PF_MIL_VAR_ATTR_PROP   30
+#define PF_MIL_VAR_ATTR_CONT   31
+#define PF_MIL_VAR_QN_LOC      32
+#define PF_MIL_VAR_QN_URI      33
+#define PF_MIL_VAR_QN_PREFIX   34
+#define PF_MIL_VAR_PROP_VAL    35
+#define PF_MIL_VAR_PROP_TEXT   36
+#define PF_MIL_VAR_PROP_COM    37
+#define PF_MIL_VAR_PROP_INS    38
+#define PF_MIL_VAR_PROP_TGT    39
 
-#define PF_MIL_VAR_LE          35
-#define PF_MIL_VAR_LT          36
-#define PF_MIL_VAR_EQ          37
-#define PF_MIL_VAR_GT          38
-#define PF_MIL_VAR_GE          39
+#define PF_MIL_VAR_LE          42
+#define PF_MIL_VAR_LT          43
+#define PF_MIL_VAR_EQ          44
+#define PF_MIL_VAR_GT          45
+#define PF_MIL_VAR_GE          46
 
-#define PF_MIL_VAR_TRACE_OUTER 40
-#define PF_MIL_VAR_TRACE_INNER 41
-#define PF_MIL_VAR_TRACE_ITER  42
-#define PF_MIL_VAR_TRACE_MSG   43
-#define PF_MIL_VAR_TRACE_ITEM  44
-#define PF_MIL_VAR_TRACE_TYPE  45
-#define PF_MIL_VAR_TRACE_REL   46
+#define PF_MIL_VAR_TRACE_OUTER 50
+#define PF_MIL_VAR_TRACE_INNER 51
+#define PF_MIL_VAR_TRACE_ITER  52
+#define PF_MIL_VAR_TRACE_MSG   53
+#define PF_MIL_VAR_TRACE_ITEM  54
+#define PF_MIL_VAR_TRACE_TYPE  55
+#define PF_MIL_VAR_TRACE_REL   56
 
-#define PF_MIL_VAR_TIME_LOAD   47
-#define PF_MIL_VAR_TIME_QUERY  48
-#define PF_MIL_VAR_TIME_PRINT  49
+#define PF_MIL_VAR_TIME_LOAD   58
+#define PF_MIL_VAR_TIME_QUERY  59
+#define PF_MIL_VAR_TIME_PRINT  60
 
 #define PF_MIL_RES_VAR_COUNT (PF_MIL_VAR_TIME_PRINT + 1)
 
@@ -200,6 +201,7 @@
     , m_div          /**< arithmetic divide */
     , m_mdiv         /**< multiplexed arithmetic divide */
     , m_mmod         /**< multiplexed arithmetic modulo */
+    , m_mmax         /**< multiplexed arithmetic maximum */
 
     , m_mabs         /**< multiplexed operator abs */
     , m_mceiling     /**< multiplexed operator ceil */
@@ -222,6 +224,7 @@
     , m_mand         /**< multiplexed boolean operator `and' */
     , m_mor          /**< multiplexed boolean operator `or' */
 
+    , m_enum         /**< MIL enumerate() function */
     , m_count        /**< MIL count() function */
     , m_gcount       /**< Grouped count() function `{count}()' */
     , m_egcount      /**< Grouped count() function `{count}()' */
@@ -684,6 +687,9 @@
 /** MIL CTderive function */
 PFmil_t * PFmil_ctderive (const PFmil_t *, const PFmil_t *);
 
+/** enumerate operator, return sequence of integers */
+PFmil_t * PFmil_enumerate (const PFmil_t *, const PFmil_t *);
+    
 /** MIL count() function, return number of BUNs in a BAT */
 PFmil_t * PFmil_count (const PFmil_t *);
 
@@ -752,6 +758,9 @@
 /** MIL multiplexed modulo operator */
 PFmil_t * PFmil_mmod (const PFmil_t *, const PFmil_t *);
 
+/** MIL multiplexed maximum operator */
+PFmil_t * PFmil_mmax (const PFmil_t *, const PFmil_t *);
+
 /** MIL multiplexed operator abs */
 PFmil_t * PFmil_mabs (const PFmil_t *);
 

Index: sql.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/sql.h,v
retrieving revision 1.42
retrieving revision 1.42.4.1
diff -u -d -r1.42 -r1.42.4.1
--- sql.h       11 Jan 2008 17:18:03 -0000      1.42
+++ sql.h       9 Feb 2008 08:40:32 -0000       1.42.4.1
@@ -46,7 +46,7 @@
     , sql_col_nameid
     , sql_col_value
     , sql_col_name
-    , sql_col_namespace
+    , sql_col_ns_uri
     , sql_col_twig_pre
     , sql_col_iter
     , sql_col_pos
@@ -141,6 +141,7 @@
 
     , sql_union             /* UNION ALL expression */
     , sql_diff              /* EXCEPT ALL expression */
+    , sql_intersect         /* INTERSECT ALL expression */
 
     , sql_lit_int           /* literal integer */
     , sql_lit_lng           /* literal 64 bit integer */
@@ -181,6 +182,10 @@
     , sql_min               /* MIN () aggregate */
     , sql_avg               /* AVG () aggregate */
 
+    , sql_str_length        /* SQL LENGTH () function */
+    , sql_str_upper         /* SQL UPPER () function */
+    , sql_str_lower         /* SQL LOWER () function */
+
     , sql_over              /* OVER expression */
     , sql_row_number        /* ROW_NUMBER () function
                                (first argument of a sql_over operator) */
@@ -621,6 +626,12 @@
  */
 PFsql_t * PFsql_difference (const PFsql_t *a, const PFsql_t *b);
 
+/**
+ * Create a SQL tree node representing the SQL
+ * `INTERSECT ALL' operator.
+ */
+PFsql_t * PFsql_intersect (const PFsql_t *a, const PFsql_t *b);
+
 /* .......... Literal construction .......... */
 
 /**
@@ -836,6 +847,26 @@
  */
 PFsql_t * PFsql_sum (const PFsql_t * column);
 
+/* ........... String Functions ........... */
+
+/**
+ * Construct a SQL tree  node representing
+ * the SQL length functions for strings
+ */
+PFsql_t * PFsql_str_length (const PFsql_t *a);
+
+/**
+ * Construct a SQL tree  node representing
+ * the SQL length functions for strings
+ */
+PFsql_t * PFsql_str_upper (const PFsql_t *a);
+
+/**
+ * Construct a SQL tree  node representing
+ * the SQL length functions for strings
+ */
+PFsql_t * PFsql_str_lower (const PFsql_t *a);
+
 /* .......... OLAP Functionality .......... */
 
 /**

Index: logical.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/logical.h,v
retrieving revision 1.51
retrieving revision 1.51.4.1
diff -u -d -r1.51 -r1.51.4.1
--- logical.h   11 Jan 2008 10:47:06 -0000      1.51
+++ logical.h   9 Feb 2008 08:40:30 -0000       1.51.4.1
@@ -297,14 +297,6 @@
         PFalg_att_t     res;      /**< attribute to hold the result */
     } unary;
 
-    /* semantic content for op:to operator */
-    struct {
-        PFalg_att_t     att1;     /**< first operand */
-        PFalg_att_t     att2;     /**< second operand */
-        PFalg_att_t     part;     /**< partitioning attribute */
-        PFalg_att_t     res;      /**< attribute to hold the result */
-    } to;
-
     /*
      * semantic content for operators applying a 
      * (partitioned) aggregation function (count, sum, min, max and avg)
@@ -365,9 +357,8 @@
     
     /* store the column names necessary for document lookup */
     struct {
-        PFalg_att_t     iter;     /**< iter column to retain */
-        PFalg_att_t     item;     /**< column that contains the references */
-        PFalg_att_t     item_res; /**< column to store the document nodes */
+        PFalg_att_t     res;      /**< column to store the document nodes */
+        PFalg_att_t     att;      /**< column that contains the references */
     } doc_tbl;
 
     /* store the column names necessary for document access */
@@ -420,10 +411,9 @@
 
     /* semantic content for error and conditional error */
     struct {
-        /* error: column of error message
-         * cond_error: name of the boolean attribute */
-        PFalg_att_t     att;
-        char *          str;      /**< error message, only used by cond_err */
+        PFalg_att_t     att;      /**< error:      column of error message
+                                       cond_error: name of the bool column */
+        char *          str;      /**< error message (only used by cond_err) */
     } err;
 
     /* semantic content for debug relation map operator */
@@ -770,8 +760,7 @@
 PFla_op_t * PFla_to (const PFla_op_t *n, 
                      PFalg_att_t res,
                      PFalg_att_t att1,
-                     PFalg_att_t att2,
-                     PFalg_att_t part);
+                     PFalg_att_t att2);
 
 /** 
  * Constructor for operators forming the application of a 
@@ -957,8 +946,7 @@
  * function.  Returns a (frag, result) pair.
  */
 PFla_op_t * PFla_doc_tbl (const PFla_op_t *rel, 
-                          PFalg_att_t iter, PFalg_att_t item,
-                          PFalg_att_t item_res);
+                          PFalg_att_t res, PFalg_att_t att);
 
 /** Constructor for string access of loaded documents */
 PFla_op_t * PFla_doc_access (const PFla_op_t *doc,
@@ -1100,8 +1088,10 @@
 /****************************************************************/
 
 /**
- * Constructor for error
+ * Constructor for a runtime error message
  */
+PFla_op_t * PFla_error_ (const PFla_op_t *n, PFalg_att_t att,
+                         PFalg_simple_type_t att_ty);
 PFla_op_t * PFla_error (const PFla_op_t *n, PFalg_att_t att);
 
 /**


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to