[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1003023 into lp:zorba

2012-06-14 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/bug-1003023 into lp:zorba has been 
updated.

Status: Approved => Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1003023/+merge/108180
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1003023/+merge/108180
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1003023 into lp:zorba

2012-06-14 Thread Zorba Build Bot
Validation queue job bug-1003023-2012-06-14T12-39-11.071Z is finished. The 
final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1003023/+merge/108180
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1003023 into lp:zorba

2012-06-14 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug-1003023-2012-06-14T12-39-11.071Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1003023/+merge/108180
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1003023 into lp:zorba

2012-06-14 Thread Markos Zaharioudakis
The proposal to merge lp:~zorba-coders/zorba/bug-1003023 into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1003023/+merge/108180
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1003023/+merge/108180
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1003023 into lp:zorba

2012-06-14 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/bug-1003023 into lp:zorba has been 
updated.

Status: Approved => Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1003023/+merge/108180
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1003023/+merge/108180
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1003023 into lp:zorba

2012-06-14 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/bug-1003023 into lp:zorba failed. 
Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 
(message):
  Validation queue job bug-1003023-2012-06-14T09-05-31.924Z is finished.  The
  final status was:

  

  3 tests did not succeed - changes not commited.


Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1003023/+merge/108180
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1003023 into lp:zorba

2012-06-14 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug-1003023-2012-06-14T09-05-31.924Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1003023/+merge/108180
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1003023 into lp:zorba

2012-06-14 Thread Markos Zaharioudakis
The proposal to merge lp:~zorba-coders/zorba/bug-1003023 into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1003023/+merge/108180
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1003023/+merge/108180
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1003023 into lp:zorba

2012-06-14 Thread Markos Zaharioudakis
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1003023/+merge/108180
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1003023 into lp:zorba

2012-05-31 Thread Markos Zaharioudakis
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/bug-1003023 
into lp:zorba.

Requested reviews:
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1003023/+merge/108180

Fixed bug #1003023$ (optimizer problems due to common subexpression after var 
folding into if-then-else)
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1003023/+merge/108180
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-05-30 00:37:00 +
+++ ChangeLog	2012-05-31 15:09:37 +
@@ -1,5 +1,10 @@
 Zorba - The XQuery Processor
 
+version 2.x
+
+  * Fixed bug #1003023$ (optimizer problems due to common subexpression after
+var folding into if-then-else)
+	
 version 2.5
 
 New Features:

=== modified file 'src/compiler/rewriter/rules/flwor_rules.cpp'
--- src/compiler/rewriter/rules/flwor_rules.cpp	2012-05-03 12:31:51 +
+++ src/compiler/rewriter/rules/flwor_rules.cpp	2012-05-31 15:09:37 +
@@ -212,6 +212,13 @@
   std::inserter(diff, diff.begin()));
 if (diff.empty())
 {
+  expr::FreeVars::iterator ite = whereVars.begin();
+  expr::FreeVars::iterator end = whereVars.end();
+  for (; ite != end; ++ite)
+  {
+std::cout << "where var " << *ite << std::endl;
+  }
+
   expr_t oldWhere = whereExpr;
   flwor.remove_where_clause();
 
@@ -368,7 +375,8 @@
 let_clause_t save = lc;
 MODIFY(flwor.remove_clause(i));
 const QueryLoc& loc = var->get_loc();
-var_expr_t fvar = new var_expr(sctx, loc, var_expr::for_var, var->get_name()); 
+var_expr_t fvar = new var_expr(sctx, loc, var_expr::for_var, var->get_name());
+fvar->getFreeVars().insert(fvar);
 for_clause_t fc = new for_clause(sctx, loc, fvar, domainExpr);
 flwor.add_clause(i, fc);
 

=== modified file 'src/compiler/rewriter/rules/fold_rules.cpp'
--- src/compiler/rewriter/rules/fold_rules.cpp	2012-05-03 12:31:51 +
+++ src/compiler/rewriter/rules/fold_rules.cpp	2012-05-31 15:09:37 +
@@ -430,7 +430,7 @@
 
   if (node->get_expr_kind() == var_expr_kind)
   {
-var_expr_t v = dynamic_cast(node);
+var_expr_t v = static_cast(node);
 freevars.insert(v);
   }
   else

=== modified file 'src/compiler/rewriter/rules/hoist_rules.cpp'
--- src/compiler/rewriter/rules/hoist_rules.cpp	2012-05-03 12:31:51 +
+++ src/compiler/rewriter/rules/hoist_rules.cpp	2012-05-31 15:09:37 +
@@ -590,8 +590,10 @@
 {
   if (e->get_expr_kind() == fo_expr_kind)
   {
-return static_cast(e)->get_func()->getKind() ==
-   FunctionConsts::OP_UNHOIST_1;
+function* f = static_cast(e)->get_func();
+
+return (f->getKind() == FunctionConsts::OP_UNHOIST_1 ||
+f->getKind() == FunctionConsts::OP_HOIST_1);
   }
   return false;
 }

=== added file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/optim/hoist01.iter'
--- test/rbkt/ExpCompilerResults/IterPlan/zorba/optim/hoist01.iter	1970-01-01 00:00:00 +
+++ test/rbkt/ExpCompilerResults/IterPlan/zorba/optim/hoist01.iter	2012-05-31 15:09:37 +
@@ -0,0 +1,85 @@
+Iterator tree for const-folded expr:
+
+
+Iterator tree for const-folded expr:
+
+  
+  
+  
+
+
+Iterator tree for const-folded expr:
+
+  
+
+  
+
+  
+  
+  
+
+  
+
+
+Iterator tree for const-folded expr:
+
+  
+
+
+Iterator tree for const-folded expr:
+
+
+Iterator tree for main query:
+
+  
+http://www.test.ch,testlib,user)"/>
+  
+  
+
+  
+
+
+Iterator tree for testlib:searchUser:
+
+  
+
+  
+
+  
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+  
+
+  
+
+  
+
+  
+
+  
+
+
+  
+
+  
+  
+
+  
+
+  
+  
+
+  
+  
+
+  
+

=== added file 'test/rbkt/ExpQueryResults/zorba/optim/hoist01.xml.res'
=== added file 'test/rbkt/Queries/zorba/optim/hoist01.xq'
--- test/rbkt/Queries/zorba/optim/hoist01.xq	1970-01-01 00:00:00 +
+++ test/rbkt/Queries/zorba/optim/hoist01.xq	2012-05-31 15:09:37 +
@@ -0,0 +1,6 @@
+
+import module namespace vdbsearch = "http://www.test.ch"; at "hoist01.xqlib";
+
+
+vdbsearch:searchUser(0)
+

=== added file 'test/rbkt/Queries/zorba/optim/hoist01.xqlib'
--- test/rbkt/Queries/zorba/optim/hoist01.xqlib	1970-01-01 00:00:00 +
+++ test/rbkt/Queries/zorba/optim/hoist01.xqlib	2012-05-31 15:09:37 +
@@ -0,0 +1,490 @@
+module namespace testlib = "http://www.test.ch";;
+
+import module namespace db = "http://www.zorba-xquery.com/modules/store/static/collections/dml";;
+
+declare variable $testlib:user := xs:QName("testlib:user");
+
+
+declare collection testlib:u