Update of /cvsroot/monetdb/pathfinder/compiler/include
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20494/include
Modified Files:
algebra.h algopt.h mil.h mil_mnemonic.h ordering.h physical.h
physical_mnemonic.h
Log Message:
-- Changed type bit representation of nodes and QNames.
o Nodes are now represented by the types aat_anode (attributes)
and aat_pnode (all other nodes) in the logical algebra.
The type aat_node furthermore represents a mix of attributes
and other nodes.
o In the MIL representation aat_anode is split up into
3 bits (aat_attr, aat_pre, and aat_frag) and aat_pnode
is split into 3 bits (aat_pre, aat_frag, and aat_nkind).
The last bit (aat_nkind) is only used to distinct the
types aat_anode and aat_node (aat_anode | aat_pnode).
In the MIL representation a type mask projects it away.
o In the MIL representation the logical QName type aat_qname
is represented by two bits: aat_qname_id and aat_qname_cont.
o In the SQL representation the logical QName type aat_qname
is represented by two bits: aat_qname_loc and aat_qname_uri.
-- Integrated new node and QName type representation in the MIL generation.
-- Completed, cleaned up, and fixed the implementation for
a large number of operators.
-- Removed fragment information from the physical algebra.
(MonetDB only works on a global working set anyway.)
-- Added physical primitive for count aggregates with default
value 0 (pa_count_ext) as this maps to the MIL primitive
'{count}(a,b)' where b represents the loop relation.
-- Replaced multiple physical path steps by a single path
step operator (pa_llscjoin).
-- Removed atom equality functions.
-- Removed dead code (e.g., planning for a nested loop join).
-- Added a genType MIL variable that sets the serialization string.
(Perhaps the mps magic in the embedded variant works.)
-- Added vim fold markers in milgen.brg to make the file more readable.
-- Added some comments on the MIL code generation
(using doxygen comment style).
Index: physical.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/physical.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- physical.h 6 Feb 2008 16:36:33 -0000 1.39
+++ physical.h 15 Feb 2008 16:53:28 -0000 1.40
@@ -54,10 +54,6 @@
, pa_attach = 4 /**< ColumnAttach */
, pa_cross = 10 /**< Cross */
, pa_leftjoin = 11 /**< LeftJoin */
-#if 0
- , pa_nljoin = 12 /**< NestedLoopJoin */
- , pa_merge_join = 13 /**< MergeJoin */
-#endif
, pa_eqjoin = 14 /**< Generic join implementation */
, pa_semijoin = 15 /**< Semijoin implementation */
, pa_thetajoin = 16 /**< Thetajoin implementation */
@@ -78,16 +74,14 @@
by the values of a single row (cardinality
stays the same) */
, pa_eq = 40 /**< Numeric or String Equality */
- , pa_eq_atom = 41 /**< Numeric or String Equality */
, pa_gt = 42 /**< Numeric or String GreaterThan */
- , pa_gt_atom = 43 /**< Numeric or String GreaterThan */
, pa_bool_not = 45 /**< Boolean negation */
, pa_bool_and = 46 /**< Boolean and */
, 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_count_ext = 54 /**< Count operator with loop backup
+ for empty values*/
+ , pa_count = 55 /**< Count operator */
, pa_avg = 56 /**< Avg operator */
, pa_max = 57 /**< Max operator */
, pa_min = 58 /**< Min operator */
@@ -101,17 +95,7 @@
certain type */
, pa_type_assert = 64 /**< restriction of the type of a given column */
, pa_cast = 65 /**< cast a table to a given type */
- , pa_llscj_anc = 100 /**< Loop-Lifted StaircaseJoin Ancestor */
- , pa_llscj_anc_self = 101 /**< Loop-Lifted StaircaseJoin AncestorOrSelf */
- , pa_llscj_attr = 102 /**< Loop-Lifted StaircaseJoin AncestorOrSelf */
- , pa_llscj_child = 103 /**< Loop-Lifted StaircaseJoin Child */
- , pa_llscj_desc = 104 /**< Loop-Lifted StaircaseJoin Descendant */
- , pa_llscj_desc_self= 105 /**< Loop-Lifted StaircaseJoin DescendantOrSelf
*/
- , pa_llscj_foll = 106 /**< Loop-Lifted StaircaseJoin Following */
- , pa_llscj_foll_sibl= 107 /**< Loop-Lifted StaircaseJoin FollowingSibling
*/
- , pa_llscj_parent = 108 /**< Loop-Lifted StaircaseJoin Parent */
- , pa_llscj_prec = 109 /**< Loop-Lifted StaircaseJoin Preceding */
- , pa_llscj_prec_sibl= 110 /**< Loop-Lifted StaircaseJoin PrecedingSibling
*/
+ , pa_llscjoin = 100 /**< Loop-Lifted StaircaseJoin */
, pa_doc_tbl = 120 /**< Access to persistent document relation */
, pa_doc_access = 121 /**< Access to string content of loaded docs */
, pa_twig = 122 /**< twig root operator */
@@ -123,12 +107,8 @@
, pa_comment = 128 /**< comment-constructing operator */
, pa_processi = 129 /**< processing instruction-constr. operator */
, pa_content = 130 /**< constructor content operator (elem|doc) */
- , pa_merge_adjacent = 131
- , pa_roots = 132
- , pa_fragment = 133
- , pa_frag_extract = 134
- , pa_frag_union = 135
- , pa_empty_frag = 136
+ , pa_slim_content = 131 /**< shallow constructor content operator */
+ , pa_merge_adjacent = 132
, pa_error = 139 /**< error operator */
, pa_cond_err = 140 /**< conditional error operator */
, pa_nil = 141 /**< end of the list of parameters */
@@ -143,7 +123,6 @@
, pa_rec_border = 149 /**< border of the DAG describing the recursion
*/
, pa_fun_call = 150 /**< function application */
, pa_fun_param = 151 /**< function application parameter */
- , pa_fun_frag_param = 152 /**< function application parameter */
, pa_string_join = 160 /**< Concatenation of multiple strings */
};
/** algebra operator kinds */
@@ -236,15 +215,6 @@
PFalg_att_t res; /**< attribute to hold the result */
} binary;
- /* semantic content for binary (arithmetic and boolean) operators
- * where the second argument is an atom (if we know that an
- * attribute will be constant) */
- struct {
- PFalg_att_t att1; /**< first operand */
- PFalg_atom_t att2; /**< second operand */
- PFalg_att_t res; /**< attribute to hold the result */
- } bin_atom;
-
/**
* semantic content for unary (numeric or Boolean) operators
* (e.g. Boolean negation)
@@ -258,6 +228,7 @@
struct {
PFalg_att_t res; /**< Name of result attribute */
PFalg_att_t part; /**< Partitioning attribute */
+ PFalg_att_t loop; /**< loop attribute */
} count;
/*
@@ -306,6 +277,7 @@
/** semantic content for staircase join operator */
struct {
+ PFalg_axis_t axis;
PFty_t ty; /**< sequence type that describes the
node test */
PFord_ordering_t in; /**< input ordering */
@@ -373,13 +345,6 @@
iter column of the result
(used for optimizations) */
} fun_call;
-
- /* semantic content of the function call fragment paramter and
- the fragment extraction operator */
- struct {
- unsigned int pos; /**< position of the referenced column */
- } col_ref;
-
};
/** semantic content in physical algebra operators */
typedef union PFpa_op_sem_t PFpa_op_sem_t;
@@ -429,8 +394,7 @@
* A `serialize' node will be placed on the very top of the algebra
* expression tree.
*/
-PFpa_op_t * PFpa_serialize (const PFpa_op_t *doc, const PFpa_op_t *alg,
- PFalg_att_t item);
+PFpa_op_t * PFpa_serialize (const PFpa_op_t *alg, PFalg_att_t item);
/****************************************************************/
@@ -455,7 +419,7 @@
foreach $a in a
foreach $b in b
return ($a, $b) .
[EMAIL PROTECTED]
[EMAIL PROTECTED]
*
* That is, the left operand is in the *outer* loop.
*/
@@ -596,18 +560,6 @@
PFalg_att_t att1, PFalg_att_t att2);
/**
- * Comparison operator eq, where one column is an atom (constant).
- */
-PFpa_op_t *PFpa_eq_atom (const PFpa_op_t *, PFalg_att_t res,
- PFalg_att_t att1, PFalg_atom_t att2);
-
-/**
- * Comparison operator gt, where one column is an atom (constant).
- */
-PFpa_op_t *PFpa_gt_atom (const PFpa_op_t *, PFalg_att_t res,
- PFalg_att_t att1, PFalg_atom_t att2);
-
-/**
* Boolean negation
*/
PFpa_op_t *PFpa_bool_not (const PFpa_op_t *,
@@ -626,30 +578,27 @@
PFalg_att_t att1, PFalg_att_t att2);
/**
- * Boolean and, where one column is an atom (constant).
- */
-PFpa_op_t *PFpa_and_atom (const PFpa_op_t *, PFalg_att_t res,
- PFalg_att_t att1, PFalg_atom_t att2);
-
-/**
- * Boolean or, where one column is an atom (constant).
- */
-PFpa_op_t *PFpa_or_atom (const PFpa_op_t *, PFalg_att_t res,
- 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
+ * Count: Count function operator with a loop relation to
+ * correctly fill in missing values. Does neither benefit from
* any existing ordering, nor does it provide/preserve any input
* ordering.
*/
-PFpa_op_t *PFpa_hash_count (const PFpa_op_t *,
- PFalg_att_t, PFalg_att_t);
+PFpa_op_t *PFpa_count_ext (const PFpa_op_t *, const PFpa_op_t *,
+ PFalg_att_t, PFalg_att_t, PFalg_att_t);
+
+/**
+ * Count: Count function operator. Does neither benefit from
+ * any existing ordering, nor does it provide/preserve any input
+ * ordering.
+ */
+PFpa_op_t *PFpa_count (const PFpa_op_t *,
+ PFalg_att_t, PFalg_att_t);
/**
* Aggr: Aggregation function operator. Does neither benefit from
@@ -695,85 +644,15 @@
/**
* StaircaseJoin operator.
*
- * Input must have iter|item schema, and be sorted on iter.
+ * Input must have iter|item schema
*/
-PFpa_op_t *PFpa_llscj_anc (const PFpa_op_t *frag,
- const PFpa_op_t *ctx,
- const PFty_t test,
- const PFord_ordering_t in,
- const PFord_ordering_t out,
- PFalg_att_t iter,
- PFalg_att_t item);
-PFpa_op_t *PFpa_llscj_anc_self (const PFpa_op_t *frag,
- const PFpa_op_t *ctx,
- const PFty_t test,
- const PFord_ordering_t in,
- const PFord_ordering_t out,
- PFalg_att_t iter,
- PFalg_att_t item);
-PFpa_op_t *PFpa_llscj_attr (const PFpa_op_t *frag,
- const PFpa_op_t *ctx,
- const PFty_t test,
- const PFord_ordering_t in,
- const PFord_ordering_t out,
- PFalg_att_t iter,
- PFalg_att_t item);
-PFpa_op_t *PFpa_llscj_child (const PFpa_op_t *frag,
- const PFpa_op_t *ctx,
- const PFty_t test,
- const PFord_ordering_t in,
- const PFord_ordering_t out,
- PFalg_att_t iter,
- PFalg_att_t item);
-PFpa_op_t *PFpa_llscj_desc (const PFpa_op_t *frag,
- const PFpa_op_t *ctx,
- const PFty_t test,
- const PFord_ordering_t in,
- const PFord_ordering_t out,
- PFalg_att_t iter,
- PFalg_att_t item);
-PFpa_op_t *PFpa_llscj_desc_self (const PFpa_op_t *frag,
- const PFpa_op_t *ctx,
- const PFty_t test,
- const PFord_ordering_t in,
- const PFord_ordering_t out,
- PFalg_att_t iter,
- PFalg_att_t item);
-PFpa_op_t *PFpa_llscj_foll (const PFpa_op_t *frag,
- const PFpa_op_t *ctx,
- const PFty_t test,
- const PFord_ordering_t in,
- const PFord_ordering_t out,
- PFalg_att_t iter,
- PFalg_att_t item);
-PFpa_op_t *PFpa_llscj_foll_sibl (const PFpa_op_t *frag,
- const PFpa_op_t *ctx,
- const PFty_t test,
- const PFord_ordering_t in,
- const PFord_ordering_t out,
- PFalg_att_t iter,
- PFalg_att_t item);
-PFpa_op_t *PFpa_llscj_parent (const PFpa_op_t *frag,
- const PFpa_op_t *ctx,
- const PFty_t test,
- const PFord_ordering_t in,
- const PFord_ordering_t out,
- PFalg_att_t iter,
- PFalg_att_t item);
-PFpa_op_t *PFpa_llscj_prec (const PFpa_op_t *frag,
- const PFpa_op_t *ctx,
- const PFty_t test,
- const PFord_ordering_t in,
- const PFord_ordering_t out,
- PFalg_att_t iter,
- PFalg_att_t item);
-PFpa_op_t *PFpa_llscj_prec_sibl (const PFpa_op_t *frag,
- const PFpa_op_t *ctx,
- const PFty_t test,
- const PFord_ordering_t in,
- const PFord_ordering_t out,
- PFalg_att_t iter,
- PFalg_att_t item);
+PFpa_op_t *PFpa_llscjoin (const PFpa_op_t *ctx,
+ PFalg_axis_t axis,
+ const PFty_t test,
+ const PFord_ordering_t in,
+ const PFord_ordering_t out,
+ PFalg_att_t iter,
+ PFalg_att_t item);
/**
* Access to persistently stored document table.
@@ -785,8 +664,7 @@
/**
* Access to the string content of loaded documents
*/
-PFpa_op_t * PFpa_doc_access (const PFpa_op_t *doc,
- const PFpa_op_t *alg,
+PFpa_op_t * PFpa_doc_access (const PFpa_op_t *alg,
PFalg_att_t res,
PFalg_att_t att,
PFalg_doc_t doc_col);
@@ -834,45 +712,22 @@
PFalg_att_t val);
/** Constructor for constructor content operators (elem|doc). */
-PFpa_op_t * PFpa_content (const PFpa_op_t *doc,
- const PFpa_op_t *cont,
+PFpa_op_t * PFpa_content (const PFpa_op_t *cont,
PFalg_att_t iter,
PFalg_att_t item);
+/** Constructor for shallow constructor content operators (elem|doc). */
+PFpa_op_t * PFpa_slim_content (const PFpa_op_t *cont,
+ PFalg_att_t iter,
+ PFalg_att_t item);
+
/** Constructor for pf:merge-adjacent-text-nodes() functionality */
-PFpa_op_t * PFpa_merge_adjacent (const PFpa_op_t *fragment,
- const PFpa_op_t *n,
+PFpa_op_t * PFpa_merge_adjacent (const PFpa_op_t *n,
PFalg_att_t,
PFalg_att_t,
PFalg_att_t);
/**
- * Extract result part from a (frag, result) pair.
- */
-PFpa_op_t *PFpa_roots (const PFpa_op_t *n);
-
-/**
- * Extract fragment part from a (frag, result) pair.
- */
-PFpa_op_t *PFpa_fragment (const PFpa_op_t *n);
-
-/**
- * Constructor for a fragment extract operator
- * (to be used in combination with a function call)
- */
-PFpa_op_t * PFpa_frag_extract (const PFpa_op_t *n, unsigned int col_pos);
-
-/**
- * Form disjoint union between two fragments.
- */
-PFpa_op_t *PFpa_frag_union (const PFpa_op_t *n1, const PFpa_op_t *n2);
-
-/**
- * Empty fragment list
- */
-PFpa_op_t *PFpa_empty_frag (void);
-
-/**
* Constructor for a runtime error message
*/
PFpa_op_t * PFpa_error (const PFpa_op_t *n, PFalg_att_t att,
@@ -972,14 +827,6 @@
const PFpa_op_t *param_list,
PFalg_schema_t schema);
-/**
- * Constructor for the fragment information of a list item
- * of a parameter list related to function application
- */
-PFpa_op_t *PFpa_fun_frag_param (const PFpa_op_t *argument,
- const PFpa_op_t *param_list,
- unsigned int col_pos);
-
/****************************************************************/
/* operators introduced by built-in functions */
Index: ordering.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/ordering.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ordering.h 11 Jan 2008 10:47:07 -0000 1.6
+++ ordering.h 15 Feb 2008 16:53:28 -0000 1.7
@@ -32,9 +32,6 @@
#ifndef ORDERING_H
#define ORDERING_H
-/* Always include pathfinder.h first! */
-#include "pathfinder.h"
-
/* Orderings use arrays of column names. */
#include "array.h"
@@ -93,6 +90,12 @@
bool PFord_order_dir_at (const PFord_ordering_t ordering,
unsigned int index);
+void PFord_set_order_col_at (PFord_ordering_t ordering, unsigned int index,
+ PFalg_att_t name);
+
+void PFord_set_order_dir_at (PFord_ordering_t ordering, unsigned int index,
+ bool dir);
+
/**
* Return true if the ordering @a a implies the ordering @a b.
* I.e., ordering @a a is a refinement of ordering @a b.
Index: algopt.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/algopt.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- algopt.h 14 Jan 2008 14:03:29 -0000 1.21
+++ algopt.h 15 Feb 2008 16:53:27 -0000 1.22
@@ -52,7 +52,7 @@
PFla_op_t * PFalgopt_key (PFla_op_t *root);
PFla_op_t * PFalgopt_mvd (PFla_op_t *root, unsigned int noneffective_tries);
PFla_op_t * PFalgopt_reqval (PFla_op_t *root);
-PFla_op_t * PFalgopt_rowrank (PFla_op_t *root);
+PFla_op_t * PFalgopt_rank (PFla_op_t *root);
PFla_op_t * PFalgopt_set (PFla_op_t *root);
PFla_op_t * PFalgopt_thetajoin (PFla_op_t *root);
Index: algebra.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/algebra.h,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- algebra.h 28 Jan 2008 16:31:41 -0000 1.70
+++ algebra.h 15 Feb 2008 16:53:27 -0000 1.71
@@ -48,35 +48,52 @@
*
* Observe that the type #aat_node has four bits set, as nodes are split
* in MonetDB into attribute nodes (#aat_anode) and other nodes (#aat_pnode).
- * Both node kinds require two bits each, to represented the nodes using a
- * node id (#aat_pre/#aat_attr) and a document fragment
(#aat_pfrag/#aat_afrag).
+ * Both node kinds require three bits each, to represented the nodes using a
+ * node id (#aat_pre), a document fragment (#aat_frag), and based on the
+ * node kind either the attribute id (#aat_attr) or a kind identifier
+ * (#aat_nkind).
*
* @note
- * The bits for #aat_pfrag and #aat_afrag @b must be lower than the bit
- * for #aat_pre and #aat_attr, respectively. Our sort implementation will
- * first sort by the frag BAT, then by the pre BAT this way.
- * This implements document order across documents correctly.
+ * The bits for #aat_frag must be lower than the bit
+ * for #aat_pre and the bit for #aat_pre must be lower
+ * than the bit for #aat_attr, respectively. Our sort
+ * implementation will first sort by the frag BAT,
+ * then by the pre BAT, and then by the attribute id
+ * this way. This implements document order across
+ * documents and attributes correctly.
*/
-#define aat_nat 0x00000001 /**< algebra simple atomic type natural number
*/
-#define aat_int 0x00000002 /**< algebra simple atomic type integer */
-#define aat_str 0x00000004 /**< algebra simple atomic type string */
-#define aat_dec 0x00000008 /**< algebra simple atomic type decimal */
-#define aat_dbl 0x00000010 /**< algebra simple atomic type double */
-#define aat_bln 0x00000020 /**< algebra simple atomic type boolean */
-#define aat_qname 0x00000040 /**< algebra simple atomic type QName */
-#define aat_uA 0x00000080 /**< algebra simple atomic type untypedAtomic
*/
-#define aat_node 0x00000F00 /**< algebra simple atomic type node */
-#define aat_anode 0x00000C00 /**< algebra simple atomic type attribute */
-#define aat_attr 0x00000800 /**< an attribute is represented
- by an attr value... */
-#define aat_afrag 0x00000400 /**< ...and a attribute fragment */
-#define aat_pnode 0x00000300 /**< algebra simple atomic type representing
- all other nodes */
-#define aat_pre 0x00000200 /**< a node is represented by a pre value... */
-#define aat_pfrag 0x00000100 /**< ...and a node fragment */
+#define aat_nat 0x00000001 /**< algebra simple atomic type natural
number */
+#define aat_int 0x00000002 /**< algebra simple atomic type integer */
+#define aat_str 0x00000004 /**< algebra simple atomic type string */
+#define aat_dec 0x00000008 /**< algebra simple atomic type decimal */
+#define aat_dbl 0x00000010 /**< algebra simple atomic type double */
+#define aat_bln 0x00000020 /**< algebra simple atomic type boolean */
+#define aat_uA 0x00000040 /**< algebra simple atomic type
untypedAtomic */
-#define aat_charseq 0x00010000 /**< this type represents the CHAR type in SQL
*/
-#define aat_update 0x00010000 /**< and it represents the update kind in MIL */
+/* qname representation in MIL and SQL */
+#define aat_qname_id 0x00000100 /**< MIL id column representing a QName */
+#define aat_qname_loc 0x00000100 /**< SQL local name column representing a
QName */
+#define aat_qname_cont 0x00000200 /**< MIL container column representing a
QName */
+#define aat_qname_uri 0x00000200 /**< SQL uri column representing a QName */
+/* qname representation in the algebra */
+#define aat_qname 0x00000300 /**< algebra simple atomic type QName */
+
+/* node representation in MIL and SQL */
+#define aat_frag 0x00001000 /**< node fragment */
+#define aat_pre 0x00002000 /**< pre value */
+#define aat_attr 0x00004000 /**< attr value */
+#define aat_nkind 0x00008000 /**< node kind indicating that
+ a node is not an attribute */
+/* attribute node representation in the algebra */
+#define aat_anode 0x00007000 /**< algebra simple atomic type attribute */
+/* element/document/text/pi/comment node representation in the algebra */
+#define aat_pnode 0x0000B000 /**< algebra simple atomic type
+ representing all other nodes */
+/* node representation in the algebra */
+#define aat_node 0x0000F000 /**< algebra simple atomic type node */
+
+#define aat_charseq 0x00100000 /**< this type represents the CHAR type in
SQL */
+#define aat_update 0x00100000 /**< and it represents the update kind in
MIL */
/**
* The following types represent the first parameter of an update function
* (which is a always of kind node). This allows an update item to correctly
@@ -85,29 +102,33 @@
* at the serialize operator.
*
* @note
- * The bits encoding the node1 information #aat_att1, #aat_afrag1,
#aat_pre1,
- * and #aat_pfrag1 represent the normal node information shifted 4 bits
+ * The bits encoding the node1 information #aat_frag1, #aat_pre1,
#aat_attr1,
+ * and #aat_nkind1 represent the normal node information shifted 4 bits
* to the left.
*/
-#define aat_node1 0x0000F000 /**< algebra simple atomic type node */
-#define aat_anode1 0x0000C000 /**< algebra simple atomic type attribute */
-#define aat_attr1 0x00008000 /**< an attribute is represented
- by an attr value... */
-#define aat_afrag1 0x00004000 /**< ...and a attribute fragment */
-#define aat_pnode1 0x00003000 /**< algebra simple atomic type representing
- all other nodes */
-#define aat_pre1 0x00002000 /**< a node is represented by a pre value... */
-#define aat_pfrag1 0x00001000 /**< ...and a node fragment */
+/* node representation in MIL and SQL */
+#define aat_frag1 0x00010000 /**< node fragment */
+#define aat_pre1 0x00020000 /**< pre value */
+#define aat_attr1 0x00040000 /**< attr value */
+#define aat_nkind1 0x00080000 /**< node kind indicating that
+ a node is not an attribute */
+/* attribute node representation in the algebra */
+#define aat_anode1 0x00070000 /**< algebra simple atomic type attribute */
+/* element/document/text/pi/comment node representation in the algebra */
+#define aat_pnode1 0x000B0000 /**< algebra simple atomic type
+ representing all other nodes */
+/* node representation in the algebra */
+#define aat_node1 0x000F0000 /**< algebra simple atomic type node */
/**
* The following types are for the document management functions. We introduce
* one new type, aat_docmgmt, to signify document management queries, and 3
* new types for path, document name and collection name.
*/
-#define aat_docmgmt 0x00100000 /**< represents the doc management type */
-#define aat_path 0x00020000 /**< the path where a document resides*/
-#define aat_docnm 0x00040000 /**< the name of the document */
-#define aat_colnm 0x00080000 /**< the name of the collection */
+#define aat_docmgmt 0x01000000 /**< represents the doc management type */
+#define aat_path 0x02000000 /**< the path where a document resides*/
+#define aat_docnm 0x04000000 /**< the name of the document */
+#define aat_colnm 0x08000000 /**< the name of the collection */
/** Simple atomic types in our algebra */
typedef unsigned int PFalg_simple_type_t;
@@ -116,8 +137,8 @@
|| (a) == aat_dec || (a) == aat_dbl || (a) == aat_bln \
|| (a) == aat_qname || (a) == aat_uA \
|| (a) == aat_anode || (a) == aat_pnode \
- || ((a) == aat_pre || (a) == aat_pfrag) \
- || ((a) == aat_attr || (a) == aat_afrag) \
+ || ((a) == aat_pre || (a) == aat_frag) \
+ || ((a) == aat_attr || (a) == aat_nkind) \
|| ((a) == 0))
typedef unsigned int nat;
Index: mil_mnemonic.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/mil_mnemonic.h,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- mil_mnemonic.h 31 Jan 2008 21:43:32 -0000 1.45
+++ mil_mnemonic.h 15 Feb 2008 16:53:28 -0000 1.46
@@ -257,7 +257,7 @@
#define mmult(a,b) PFmil_mmult ((a), (b))
/** arithmetic divide */
-#define div(a,b) PFmil_div ((a), (b))
+#define div_(a,b) PFmil_div ((a), (b))
/** multiplexed arithmetic divide */
#define mdiv(a,b) PFmil_mdiv ((a), (b))
@@ -280,6 +280,9 @@
/** multiplexed comparison (equality) */
#define meq(a,b) PFmil_meq ((a), (b))
+/** multiplexed and */
+#define mand(a,b) PFmil_mand ((a), (b))
+
/** multiplexed or */
#define mor(a,b) PFmil_mor ((a), (b))
Index: physical_mnemonic.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/physical_mnemonic.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- physical_mnemonic.h 31 Jan 2008 21:43:32 -0000 1.30
+++ physical_mnemonic.h 15 Feb 2008 16:53:28 -0000 1.31
@@ -32,7 +32,7 @@
/* Also import generic algebra stuff */
#include "algebra_mnemonic.h"
-#define serialize(a,b,c) PFpa_serialize ((a), (b), (c))
+#define serialize(a,b) PFpa_serialize ((a), (b))
/** literal table construction */
#define lit_tbl(a,b,c) PFpa_lit_tbl ((a), (b), (c))
@@ -49,14 +49,6 @@
/** join that preserves the order of the first argument */
#define leftjoin(a,b,c,d) PFpa_leftjoin ((a), (b), (c), (d))
-#if 0
-/** NestedLoopJoin */
-#define nljoin(a,b,c,d) PFpa_nljoin ((a), (b), (c), (d))
-
-/** MergeJoin */
-#define merge_join(a,b,c,d) PFpa_merge_join ((a), (b), (c), (d))
-#endif
-
/** standard join operator */
#define eqjoin(a,b,c,d) PFpa_eqjoin ((a), (b), (c), (d))
@@ -85,11 +77,8 @@
#define intersect(a,b) PFpa_intersect ((a), (b))
#define difference(a,b) PFpa_difference ((a), (b))
-/** HashDistinct */
#define sort_distinct(a,b) PFpa_sort_distinct ((a), (b))
-/** StandardSort */
#define std_sort(a,b) PFpa_std_sort ((a), (b))
-/** RefineSort */
#define refine_sort(a,b,c) PFpa_refine_sort ((a), (b), (c))
#define fun_1to1(a,b,c,d) PFpa_fun_1to1 ((a), (b), (c), (d))
@@ -98,7 +87,8 @@
#define to(a,b,c,d) PFpa_to ((a), (b), (c), (d))
-#define hash_count(a,b,c) PFpa_hash_count ((a), (b), (c))
+#define count(a,b,c) PFpa_count ((a), (b), (c))
+#define ecount(a,b,c,d,e) PFpa_count_ext ((a), (b), (c), (d), (e))
#define aggr(a,b,c,d,e) PFpa_aggr ((a), (b), (c), (d), (e))
/** a sort specification list is just another attribute list */
@@ -114,31 +104,11 @@
#define cast(a,b,c,d) PFpa_cast ((a), (b), (c), (d))
/** StaircaseJoin */
-#define llscj_anc(a,b,c,d,e,f,g) PFpa_llscj_anc ((a), (b), (c), \
- (d), (e), (f), (g))
-#define llscj_anc_self(a,b,c,d,e,f,g) PFpa_llscj_anc_self ((a), (b), (c), \
- (d), (e), (f), (g))
-#define llscj_attr(a,b,c,d,e,f,g) PFpa_llscj_attr ((a), (b), (c), \
- (d), (e), (f), (g))
-#define llscj_child(a,b,c,d,e,f,g) PFpa_llscj_child ((a), (b), (c), \
- (d), (e), (f), (g))
-#define llscj_desc(a,b,c,d,e,f,g) PFpa_llscj_desc ((a), (b), (c), \
- (d), (e), (f), (g))
-#define llscj_desc_self(a,b,c,d,e,f,g) PFpa_llscj_desc_self ((a),(b), (c), \
- (d), (e), (f), (g))
-#define llscj_foll(a,b,c,d,e,f,g) PFpa_llscj_foll ((a), (b), (c), \
- (d), (e), (f), (g))
-#define llscj_foll_self(a,b,c,d,e,f,g) PFpa_llscj_foll_self ((a),(b), (c), \
- (d), (e), (f), (g))
-#define llscj_parent(a,b,c,d,e,f,g) PFpa_llscj_parent ((a), (b), (c), \
- (d), (e), (f), (g))
-#define llscj_prec(a,b,c,d,e,f,g) PFpa_llscj_prec ((a), (b), (c), \
- (d), (e), (f), (g))
-#define llscj_prec_self(a,b,c,d,e,f,g) PFpa_llscj_prec_self ((a),(b), (c), \
+#define llscjoin(a,b,c,d,e,f,g) PFpa_llscjoin ((a), (b), (c), \
(d), (e), (f), (g))
#define doc_tbl(a,b,c) PFpa_doc_tbl ((a), (b), (c))
-#define doc_access(a,b,c,d,e) PFpa_doc_access ((a), (b), (c), (d), (e))
+#define doc_access(a,b,c,d) PFpa_doc_access ((a), (b), (c), (d))
/* twig root operator */
#define twig(a,b,c) PFpa_twig ((a),(b),(c))
@@ -165,19 +135,12 @@
#define processi(a,b,c,d) PFpa_processi ((a),(b),(c),(d))
/* constructor content operator (elem|doc) */
-#define content(a,b,c,d) PFpa_content ((a),(b),(c),(d))
-
-#define merge_adjacent(a,b,c,d,e) PFpa_merge_adjacent ((a),(b),(c),(d),(e))
-
-/** roots() operator */
-#define roots(a) PFpa_roots (a)
+#define content(a,b,c) PFpa_content ((a),(b),(c))
-#define fragment(a) PFpa_fragment (a)
-#define frag_extract(a,b) PFpa_frag_extract ((a),(b))
-#define frag_union(a,b) PFpa_frag_union ((a), (b))
+/* slim constructor content operator (elem|doc) */
+#define slim_content(a,b,c) PFpa_slim_content ((a),(b),(c))
-/** empty fragment list */
-#define empty_frag() PFpa_empty_frag ()
+#define merge_adjacent(a,b,c,d) PFpa_merge_adjacent ((a),(b),(c),(d))
#define error(a,b,c) PFpa_error ((a), (b), (c))
#define cond_err(a,b,c,d) PFpa_cond_err ((a), (b), (c), (d))
@@ -197,10 +160,7 @@
#define fun_call(a,b,c,d,e,f,g,h) \
PFpa_fun_call ((a),(b),(c),(d),(e),(f),(g),(h))
#define fun_param(a,b,c) PFpa_fun_param ((a),(b),(c))
-#define fun_frag_param(a,b,c) PFpa_fun_frag_param ((a),(b),(c))
-#define fn_concat(a,b,c,d) PFpa_fn_concat ((a), (b), (c), (d))
-#define fn_contains(a,b,c,d) PFpa_fn_contains ((a), (b), (c), (d))
#define string_join(a,b,c,d) PFpa_string_join ((a),(b),(c),(d))
/* vim:set shiftwidth=4 expandtab: */
Index: mil.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/mil.h,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- mil.h 31 Jan 2008 21:43:32 -0000 1.56
+++ mil.h 15 Feb 2008 16:53:27 -0000 1.57
@@ -32,8 +32,6 @@
#ifndef MIL_H
#define MIL_H
-#include "pathfinder.h"
-
/** maximum number of children of a MIL tree node */
#define MIL_MAXCHILD 8
@@ -54,6 +52,8 @@
#define PF_MIL_VAR_KIND_PI 7
#define PF_MIL_VAR_KIND_REF 8
+#define PF_MIL_VAR_GENTYPE 9
+
#define PF_MIL_VAR_ATTR 10
#define PF_MIL_VAR_ELEM 11
@@ -77,12 +77,13 @@
#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_QN_URI_LOC 34
+#define PF_MIL_VAR_QN_PREFIX 35
+#define PF_MIL_VAR_PROP_VAL 36
+#define PF_MIL_VAR_PROP_TEXT 37
+#define PF_MIL_VAR_PROP_COM 38
+#define PF_MIL_VAR_PROP_INS 39
+#define PF_MIL_VAR_PROP_TGT 40
#define PF_MIL_VAR_LE 42
#define PF_MIL_VAR_LT 43
-------------------------------------------------------------------------
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