[Zorba-coders] [Merge] lp:~zorba-coders/zorba/add-exi-module into lp:~zorba-coders/zorba/zorba-experimental

2012-05-30 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/add-exi-module into 
lp:~zorba-coders/zorba/zorba-experimental has been updated.

Status: Approved => Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/add-exi-module/+merge/105950
-- 
https://code.launchpad.net/~zorba-coders/zorba/add-exi-module/+merge/105950
Your team Zorba Coders is requested to review the proposed merge of 
lp:~zorba-coders/zorba/add-exi-module into 
lp:~zorba-coders/zorba/zorba-experimental.

-- 
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/add-exi-module into lp:~zorba-coders/zorba/zorba-experimental

2012-05-30 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/add-exi-module into 
lp:~zorba-coders/zorba/zorba-experimental failed. Below is the output from the 
failed tests.

experimental build started for lp:~zorba-coders/zorba/add-exi-module. Check out 
http://add-exi-module.zorba-xquery.com/ in half an hour or so. Logfile at 
http://zorbatest.lambda.nu:8080/remotequeue/experimental/add-exi-module.log .


-- 
https://code.launchpad.net/~zorba-coders/zorba/add-exi-module/+merge/105950
Your team Zorba Coders is requested to review the proposed merge of 
lp:~zorba-coders/zorba/add-exi-module into 
lp:~zorba-coders/zorba/zorba-experimental.

-- 
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/add-exi-module into lp:~zorba-coders/zorba/zorba-experimental

2012-05-30 Thread Chris Hillery
The proposal to merge lp:~zorba-coders/zorba/add-exi-module into 
lp:~zorba-coders/zorba/zorba-experimental has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/add-exi-module/+merge/105950
-- 
https://code.launchpad.net/~zorba-coders/zorba/add-exi-module/+merge/105950
Your team Zorba Coders is requested to review the proposed merge of 
lp:~zorba-coders/zorba/add-exi-module into 
lp:~zorba-coders/zorba/zorba-experimental.

-- 
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:~nbrinza/zorba/error-messages into lp:zorba

2012-05-30 Thread Nicolae Brinza
I'm not aware of any options to do that. But I'll look into it to see if it is 
possible. Those paths look ugly indeed.
-- 
https://code.launchpad.net/~nbrinza/zorba/error-messages/+merge/107899
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-1006166 into lp:zorba

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

Requested reviews:
  Markos Zaharioudakis (markos-za)

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

fixed bug #1006166
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1006166/+merge/107988
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-05-30 00:37:00 +
+++ ChangeLog	2012-05-30 15:00:25 +
@@ -1,5 +1,9 @@
 Zorba - The XQuery Processor
 
+version 2.x
+
+  * Fixed bug #1006166 (disabling 2 functions with the same qname)
+	
 version 2.5
 
 New Features:

=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp	2012-05-09 23:06:41 +
+++ src/compiler/translator/translator.cpp	2012-05-30 15:00:25 +
@@ -3280,7 +3280,7 @@
 if (func_decl->is_external())
 {
   // 1. lookup if the function is a built-in function
-  f = theSctx->lookup_fn(qnameItem, numParams);
+  f = theSctx->lookup_fn(qnameItem, numParams, false);
 
   if (f.getp() != 0)
   {
@@ -3409,7 +3409,9 @@
 
   // Get function obj out of function qname (will raise error if prefix in qname
   // is not bound to a namespace).
-  function* f = lookup_fn(v.get_name(), v.get_param_count(), loc);
+  store::Item_t qnameItem;
+  expand_function_qname(qnameItem, v.get_name(), v.get_name()->get_location());
+  function* f = theSctx->lookup_fn(qnameItem, v.get_param_count(), false);
 
   assert(f);
 

=== modified file 'src/context/static_context.cpp'
--- src/context/static_context.cpp	2012-05-18 22:01:56 +
+++ src/context/static_context.cpp	2012-05-30 15:00:25 +
@@ -2408,8 +2408,8 @@
 
 if (theFunctionArityMap->get(qname2, fv))
 {
-  ulong numFunctions = (ulong)fv->size();
-  for (ulong i = 0; i < numFunctions; ++i)
+  csize numFunctions = fv->size();
+  for (csize i = 0; i < numFunctions; ++i)
   {
 if ((*fv)[i].theFunction.getp() == f)
 {
@@ -2421,6 +2421,7 @@
 
 fv = new std::vector(1);
 fi.theIsDisabled = true;
+fi.theFunction = f;
 (*fv)[0] = fi;
 theFunctionArityMap->insert(qname2, fv);
   }
@@ -2440,7 +2441,8 @@
 /
 function* static_context::lookup_fn(
 const store::Item* qname,
-ulong arity)
+ulong arity,
+bool skipDisabled)
 {
   FunctionInfo fi;
   store::Item* qname2 = const_cast(qname);
@@ -2455,7 +2457,10 @@
 
   if (f->getArity() == arity || f->isVariadic())
   {
-return (fi.theIsDisabled ? NULL : f);
+if (fi.theIsDisabled && skipDisabled)
+  return NULL;
+
+return f;
   }
 
   std::vector* fv = NULL;
@@ -2463,11 +2468,16 @@
   if (sctx->theFunctionArityMap != NULL &&
   sctx->theFunctionArityMap->get(qname2, fv))
   {
-ulong numFunctions = (ulong)fv->size();
-for (ulong i = 0; i < numFunctions; ++i)
+csize numFunctions = fv->size();
+for (csize i = 0; i < numFunctions; ++i)
 {
   if ((*fv)[i].theFunction->getArity() == arity)
-return ((*fv)[i].theIsDisabled ? NULL : (*fv)[i].theFunction.getp());
+  {
+if ((*fv)[i].theIsDisabled && skipDisabled)
+  return NULL;
+
+return (*fv)[i].theFunction.getp();
+  }
 }
   }
 }
@@ -2486,7 +2496,8 @@
 /
 function* static_context::lookup_local_fn(
 const store::Item* qname,
-ulong arity)
+ulong arity,
+bool skipDisabled)
 {
   FunctionInfo fi;
   store::Item* qname2 = const_cast(qname);
@@ -2497,18 +2508,26 @@
 
 if (f->getArity() == arity || f->isVariadic())
 {
-  return (fi.theIsDisabled ? NULL : f);
+  if (fi.theIsDisabled && skipDisabled)
+return NULL;
+
+  return f;
 }
 
 std::vector* fv = NULL;
 
 if (theFunctionArityMap != NULL && theFunctionArityMap->get(qname2, fv))
 {
-  ulong numFunctions = (ulong)fv->size();
-  for (ulong i = 0; i < numFunctions; ++i)
+  csize numFunctions = fv->size();
+  for (csize i = 0; i < numFunctions; ++i)
   {
 if ((*fv)[i].theFunction->getArity() == arity)
-  return ((*fv)[i].theIsDisabled ? NULL : (*fv)[i].theFunction.getp());
+{
+  if ((*fv)[i].theIsDisabled && skipDisabled)
+return NULL;
+
+  return (*fv)[i].theFunction.getp();
+}
   }
 }
   }

=== modified file 'src/context/static_context.h'
--- src/context/static_context.h	2012-05-07 17:42:55 +
+++ src/context/static_context.h	2012-05-30 15:00:25 +
@@ -826,9 +826,15 @@
 
   void unbind_fn(const store::Item* qname, ulong arity);
 
-  function* lookup_fn(const store::Item* qname, ulong arity);
+  function* lookup_fn(
+  const store

[Zorba-coders] [Bug 924754] Re: support for the xs:dateTimeStamp type

2012-05-30 Thread Markos Zaharioudakis
Sorin, I cannot answer these questions. You should report them in zorba-
dev. It's probably Dana who should ultimately answer them. Furthermore,
regarding potential implementation of xs:dateTimeStamp, it should be
done by the same person who implemented datetime (in src/zorbatypes).
This was either you or Nicolae, I don't remember.


** Changed in: zorba
 Assignee: Markos Zaharioudakis (markos-za) => Sorin Marian Nasoi 
(sorin.marian.nasoi)

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/924754

Title:
  support for the xs:dateTimeStamp type

Status in Zorba - The XQuery Processor:
  New

Bug description:
  I bumped into the following issue while trying to run the following XQuery 
3.0 test:
  
exists(fn:timezone-from-dateTime(xs:dateTimeStamp("2011-07-28T12:34:56-08:00")))

  Zorba returned:
  static error [err:XPST0017]: "xs:dateTimeStamp": function with arity 1 not 
declared

  Looking into the latest F&O Spec for XQuery 3.0 I see that a new type,
  xs:dateTimeStamp was added for the implementations that "support XSD
  1.1".

  I have a few questions:
  1) should Zorba support the new type, xs:dateTimeStamp?
  If so, some function signatures need to be changed, for instance:
  Now, in Zorba, 
  fn:current-dateTime() returns a xs:dateTime
  instead of a xs:dateTimeStamp as stated in the 
http://www.w3.org/TR/xpath-functions-30/#func-current-dateTime.

  2) Should Zorba support constructor functions for xsd types ? Meaning should 
we add functions like:
  fn:unsignedInt($arg as xs:anyAtomicType?) as xs:unsignedInt?

  3) There are 2 tests in Zorba( xquery_1_0 and xquery_1_1) that check if all 
the functions from the fn: namespace of the F&O spec 1.0 and 3.0 are 
implemented in Zorba.
  The problem with these tests is that they only check the function names and 
their corresponding arities; they do not check if the types of the parameters 
are correct.
  This is the reason why the change in the signature of the 
fn:current-dateTime() that should now return a xs:dateTimeStamp was not picked 
up by these tests.

  IMO we should update these 2 tests to also check the parameter types:
  one problem I see here is that the introspection module only provides
  function to get the function name and arity, not the types of the
  parameters.

  Thanks for the help,
  Sorin

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/924754/+subscriptions

-- 
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-971782 into lp:zorba

2012-05-30 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/bug-971782 into lp:zorba has been 
updated.

Status: Approved => Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-971782/+merge/100788
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-971782/+merge/100788
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:~nbrinza/zorba/error-messages into lp:zorba

2012-05-30 Thread David Graf
Review: Approve

Tested it. Very cool.

Something that is unrelated:
Is it possible to make those things:
+#line 87 
"/home/colea/xquery_bzr/error-messages/src/compiler/parser/xquery_parser.y"
... with relative paths? 
-- 
https://code.launchpad.net/~nbrinza/zorba/error-messages/+merge/107899
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-971782 into lp:zorba

2012-05-30 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, 
Needs Fixing < 1, Pending < 1. Got: 3 Pending.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-971782/+merge/100788
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-971782 into lp:zorba

2012-05-30 Thread Zorba Build Bot
Validation queue job bug-971782-2012-05-30T12-00-03.104Z is finished. The final 
status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-971782/+merge/100788
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-971782 into lp:zorba

2012-05-30 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug-971782-2012-05-30T12-00-03.104Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-971782/+merge/100788
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] [Bug 1006166] Re: cannot disable two functions with the same name

2012-05-30 Thread Markos Zaharioudakis
The StaticContext::disableFunction function is not documented at all.
So, I have a question: it is supposed to work only for functions that
are registered in the root static context (i.e., builtin function),
right?

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1006166

Title:
  cannot disable two functions with the same name

Status in Zorba - The XQuery Processor:
  New

Bug description:
  Disabling two functions (using StaticContext::disableFunction) with
  the same name but different arities is currently not possible. Only
  the first version of the function is actually disabled.

  The problem seems to be in static_context::unbind_fn where only the
  FunctionInfo for the first function is inserted into the vector.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1006166/+subscriptions

-- 
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] [Bug 1006311] Re: jvm.dll not found under Windows when using util-jvm

2012-05-30 Thread Chris Hillery
It's up to the user to make sure their PATH is correct on Windows, isn't
it?

I guess zorba.bat (and testdriver.bat) could be modified to include the
path to the JVM, but that would require moving some Java-specific code
into the core of Zorba. Currently all Java-specific stuff is isolated in
the util-jvm module, but I'd thought about moving it into core Zorba
after this release anyway.

Regardless, I'm afraid I have no way of modifying or testing the .bat
files. Assigning this to Juan, and subscribing Matthias to see if he has
any thoughts about what the right answer is.

** Changed in: zorba
 Assignee: Chris Hillery (ceejatec) => Juan Zacarias (juan457)

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1006311

Title:
  jvm.dll not found under Windows when using util-jvm

Status in Zorba - The XQuery Processor:
  New

Bug description:
  Under Windows, launching Zorba with a query that uses the util-jvm
  module (for example through data-formatting) leads to an error message
  (jvm.dll not found).

  This is possibly because %JAVA_HOME%\jre\bin\client is not added to
  the PATH.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1006311/+subscriptions

-- 
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] [Bug 1006311] [NEW] jvm.dll not found under Windows when using util-jvm

2012-05-30 Thread Ghislain Fourny
Public bug reported:

Under Windows, launching Zorba with a query that uses the util-jvm
module (for example through data-formatting) leads to an error message
(jvm.dll not found).

This is possibly because %JAVA_HOME%\jre\bin\client is not added to the
PATH.

** Affects: zorba
 Importance: Undecided
 Assignee: Chris Hillery (ceejatec)
 Status: New

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1006311

Title:
  jvm.dll not found under Windows when using util-jvm

Status in Zorba - The XQuery Processor:
  New

Bug description:
  Under Windows, launching Zorba with a query that uses the util-jvm
  module (for example through data-formatting) leads to an error message
  (jvm.dll not found).

  This is possibly because %JAVA_HOME%\jre\bin\client is not added to
  the PATH.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1006311/+subscriptions

-- 
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] [Bug 872234] Re: problems with unordered map

2012-05-30 Thread Markos Zaharioudakis
** Changed in: zorba
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/872234

Title:
  problems with unordered map

Status in Zorba - The XQuery Processor:
  Fix Released

Bug description:
  I guess there's a problem with the optimizer.
  Try the following code:

  
  import module namespace map = 
"http://www.zorba-xquery.com/modules/store/data-structures/unordered-map";;

  declare namespace ann = "http://www.zorba-xquery.com/annotations";;
  declare variable $local:processed-internal-links := 
xs:QName("processed-internal-links");

  declare %ann:sequential function local:f1($n as xs:string)
  {
map:insert($local:processed-internal-links, $n, $n);
fn:trace($n, "n=");

for $x in ("1", "2", "3")
return
  if(fn:empty(map:get($local:processed-internal-links, $x))) then
local:f1($x)
  else
()
  };

  map:create($local:processed-internal-links, xs:QName("xs:string"));

  local:f1("0")

  It should display 0 1 2 3
  But it displays 0 1 2 3 3 2 3

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/872234/+subscriptions

-- 
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] [Bug 891650] Re: Use of last()

2012-05-30 Thread Markos Zaharioudakis
** Changed in: zorba
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/891650

Title:
  Use of last()

Status in Zorba - The XQuery Processor:
  Fix Released

Bug description:
  The following query..

/last()

  ..raises XPDY0002 instead of returning the integer 1.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/891650/+subscriptions

-- 
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] [Bug 967864] Re: domainExpr != NULL assertion failed

2012-05-30 Thread Markos Zaharioudakis
** Changed in: zorba
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/967864

Title:
  domainExpr != NULL assertion failed

Status in Zorba - The XQuery Processor:
  Fix Released

Bug description:
  Compiling the following query results in a failing assertion
  (expr::compute_return_type):

  let $y := ./count[@meaning eq "yes"]
  let $output := if (./@level = 3) then $y else $y
  return if (./@nr = 3) then {$output} else $output

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/967864/+subscriptions

-- 
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] [Bug 966706] Re: key uniqueness of value equality index not enforced

2012-05-30 Thread Markos Zaharioudakis
** Changed in: zorba
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/966706

Title:
  key uniqueness of value equality index not enforced

Status in Zorba - The XQuery Processor:
  Fix Released

Bug description:
  Updates inserting entries into a collection that result in duplicate
  keys in the index are not rejected.

  An example can be found in test/rbkt/zorba/index/unique in the related
  branch.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/966706/+subscriptions

-- 
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] [Bug 980526] Re: dataflow_annotations.cpp: assertion failed

2012-05-30 Thread Markos Zaharioudakis
** Changed in: zorba
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/980526

Title:
  dataflow_annotations.cpp: assertion failed

Status in Zorba - The XQuery Processor:
  Fix Released

Bug description:
  Compiling the following query and library module trigger an assertion:

  Zorba error [zerr:ZXQP0002]: "varExpr->get_udf() ==
  udfCaller->theFo->get_func()": assertion failed; raised at
  
/home/mbrantner/zorba/sandbox/src/compiler/rewriter/tools/dataflow_annotations.cpp:841

  response.xq

  xquery version "3.0";

  module namespace resp = "http://www.28msec.com/modules/response";;

  declare namespace ann = "http://www.zorba-xquery.com/annotations";;

  declare %fn:private variable $resp:serialization-params
as element(serialization-parameters) := resp:serializer-defaults-xml();

  declare function resp:serializer-defaults-xml()
  as element(serialization-parameters)
  {

  };

  
  declare %ann:sequential function resp:set-serialization-parameters(
$params as element(serialization-parameters)
  ) as empty-sequence()
  {
$resp:serialization-params := $params;
  };

  declare %ann:sequential function resp:set-redirect(
$url as xs:string)
as empty-sequence()
  {
1
  };

  main.xq

  import module namespace refl = 
"http://www.zorba-xquery.com/modules/reflection";;
  import module namespace res = "http://www.28msec.com/modules/response"; at 
"response.xq";

  declare namespace ann = "http://www.zorba-xquery.com/annotations";;

  declare %ann:sequential function local:save()
  {
variable $tmp := refl:eval-s("blub");
res:set-redirect("/wiki");
  };

  local:save()

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/980526/+subscriptions

-- 
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] [Bug 981405] Re: Zorba error [zerr:ZXQP0002]: "bound": assertion failed.

2012-05-30 Thread Markos Zaharioudakis
** Changed in: zorba
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/981405

Title:
  Zorba error [zerr:ZXQP0002]: "bound": assertion failed.

Status in Zorba - The XQuery Processor:
  Fix Released

Bug description:
  Hello

  I was able to reproduce an assertion during compilation by the usage
  of try-cache and eval (tested with zorba revision 10761 on Ubuntu
  10.04 64Bit).

  I don't know if Nicolae is the right assignee and if this bug needs to
  be fixed for Zorba 2.5. Please reassign and/or retag whoever is in
  charge.

  Thank you!
  David

  Query:
  xquery version "3.0";

  import module namespace reflection = 
"http://www.zorba-xquery.com/modules/reflection";;
  import module namespace err = "http://www.w3.org/2005/xqt-errors";;

  for $x in (1,2,3)
  let $code := "($x cast as xs:integer, 1, 2, 3)"
  return
    try {
  reflection:eval($code)
    } catch err:FORG0001 {
  $err:code eq $err:FORG0001
    }

  Error:
  ./bin/zorba -q test.xq -f
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x9835c1) 
[0x7f9859fec5c1]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x98369e) 
[0x7f9859fec69e]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x75ceac) 
[0x7f9859dc5eac]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x73f62f) 
[0x7f9859da862f]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x73edef) 
[0x7f9859da7def]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x7e938f) 
[0x7f9859e5238f]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x7b4543) 
[0x7f9859e1d543]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x7c0a3f) 
[0x7f9859e29a3f]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x7b4543) 
[0x7f9859e1d543]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x802b1f) 
[0x7f9859e6bb1f]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x7b4543) 
[0x7f9859e1d543]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x802b1f) 
[0x7f9859e6bb1f]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x740526) 
[0x7f9859da9526]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x7ef9f8) 
[0x7f9859e589f8]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x7b4543) 
[0x7f9859e1d543]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x8057e1) 
[0x7f9859e6e7e1]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x73666d) 
[0x7f9859d9f66d]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x87d53a) 
[0x7f9859ee653a]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x87d1d0) 
[0x7f9859ee61d0]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x570b8c) 
[0x7f9859bd9b8c]
  /home/dagraf/zorba/build/src/libzorba_simplestore.so.2.2.0(+0x57062e) 
[0x7f9859bd962e]
  ./bin/zorba() [0x411a69]
  ./bin/zorba() [0x41328a]
  /lib/libc.so.6(__libc_start_main+0xfd) [0x7f98565e5c4d]
  ./bin/zorba() [0x40f849]
  Zorba error [zerr:ZXQP0002]: "bound": assertion failed.; raised at 
/home/dagraf/zorba/sandbox/src/compiler/codegen/plan_visitor.cpp:702

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/981405/+subscriptions

-- 
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] [Bug 986075] Re: out of range vector access in plan generator

2012-05-30 Thread Markos Zaharioudakis
** Changed in: zorba
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/986075

Title:
  out of range vector access in plan generator

Status in Zorba - The XQuery Processor:
  Fix Released

Bug description:
  Hello Markos

  We discovered an out-of-range vector access during plan generation on
  our windows machine. On Windows only, because windows does an out-of-
  range check in debug mode automatically. To reproduce and detect the
  problem on linux, you need to apply the following patch to zorba:

  === modified file 'src/compiler/expression/flwor_expr.h'
  --- src/compiler/expression/flwor_expr.h  2012-04-19 21:40:27 +
  +++ src/compiler/expression/flwor_expr.h  2012-04-20 08:51:10 +
  @@ -708,7 +708,7 @@
   
 void remove_clause(ulong pos);
   
  -  const flwor_clause* operator[](int i) const { return theClauses[i].getp(); 
}
  +  const flwor_clause* operator[](int i) const { return 
theClauses.at(i).getp(); }
   
 flwor_clause* get_clause(ulong i);

  
  After applying the patch, you need to execute the following query:

  declare %fn:private function local:serialize-request-as-xml()
  {
()  
  };
  declare function local:serialize-request-as-html()
  {
let $request := local:serialize-request-as-xml()
return
  for $section in $request/element()
  return
for $info in $section/element()
return 
  for $value in $info/value
  let $content :=
switch(false())
  case false() return 
()  
  default return $value/text()
return
  switch(string($value/@class))
case "error" return 
  $content
default return $content
  };

  local:serialize-request-as-html()

  The result on my machine is:
  $ ./bin/zorba  -q ../../sausalito/build/test.xq -f
  Zorba error [zerr:ZXQP0003]: internal error: vector::_M_range_check; raised 
at /home/dagraf/zorba/sandbox/src/api/zorbaimpl.cpp:288

  In sausalito, we bypassing the issue currently by return 0 if the vector is 
empty:
  -  const flwor_clause* operator[](int i) const { return theClauses[i].getp(); 
}
  +  const flwor_clause* operator[](int i) const { return (theClauses.empty() ? 
0 : theClauses[i].getp()); }

  I have no clue if this is a nice bypass. I am pretty sure this bypass
  hides another problem. But maybe, it is save to use it temporarily.
  What do you think?

  By the way: The call stack is:
  #0  0x73af4dc0 in __cxa_throw () from /usr/lib/libstdc++.so.6
  #1  0x73a90647 in std::__throw_out_of_range(char const*) () from 
/usr/lib/libstdc++.so.6
  #2  0x769c332b in std::vector, 
std::allocator > >::_M_range_check 
(this=0x99b380, __n=0) at /usr/include/c++/4.4/bits/stl_vector.h:634
  #3  0x769b9db9 in std::vector, 
std::allocator > >::at (this=0x99b380, 
__n=0) at /usr/include/c++/4.4/bits/stl_vector.h:670
  #4  0x7693ae2a in zorba::flwor_expr::operator[] (this=0x99b2f0, i=0) 
at /home/dagraf/zorba/sandbox/src/compiler/expression/flwor_expr.h:711
  #5  0x76af6eb9 in zorba::EliminateUnusedLetVars::rewritePre 
(this=0x9983b0, node=0x99b2f0, rCtx=...) at 
/home/dagraf/zorba/sandbox/src/compiler/rewriter/rules/flwor_rules.cpp:175
  #6  0x76aedf2b in zorba::PrePostRewriteRule::apply (this=0x9983b0, 
rCtx=..., curExpr=0x99b2f0, modified=@0x7fffca6d) at 
/home/dagraf/zorba/sandbox/src/compiler/rewriter/rules/rule_base.cpp:39
  #7  0x76aedfda in zorba::PrePostRewriteRule::apply (this=0x9983b0, 
rCtx=..., curExpr=0x99d620, modified=@0x7fffca6d) at 
/home/dagraf/zorba/sandbox/src/compiler/rewriter/rules/rule_base.cpp:51
  #8  0x76aedfda in zorba::PrePostRewriteRule::apply (this=0x9983b0, 
rCtx=..., curExpr=0x99d9c0, modified=@0x7fffca6d) at 
/home/dagraf/zorba/sandbox/src/compiler/rewriter/rules/rule_base.cpp:51
  #9  0x76aedfda in zorba::PrePostRewriteRule::apply (this=0x9983b0, 
rCtx=..., curExpr=0x99da70, modified=@0x7fffca6d) at 
/home/dagraf/zorba/sandbox/src/compiler/rewriter/rules/rule_base.cpp:51
  #10 0x76aedfda in zorba::PrePostRewriteRule::apply (this=0x9983b0, 
rCtx=..., curExpr=0x99bdc0, modified=@0x7fffca6d) at 
/home/dagraf/zorba/sandbox/src/compiler/rewriter/rules/rule_base.cpp:51
  #11 0x76aedfda in zorba::PrePostRewriteRule::apply (this=0x9983b0, 
rCtx=..., curExpr=0x99be80, modified=@0x7fffca6d) at 
/home/dagraf/zorba/sandbox/src/compiler/rewriter/rules/rule_base.cpp:51
  #12 0x76ae7388 in zorba::RuleMajorDriver::rewrite 
(this=0x7fffcad0, rCtx=...) at 
/home/dagraf/zorba/sandbox/src/compiler/rewriter/framework/rule_driver.cpp:61
  #1

[Zorba-coders] [Bug 862971] Re: No error upon (almost) duplicate function declarations

2012-05-30 Thread Markos Zaharioudakis
** Changed in: zorba
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/862971

Title:
  No error upon (almost) duplicate function declarations

Status in Zorba - The XQuery Processor:
  Fix Released

Bug description:
  If you declare two XQuery functions that have the same name and
  signature (arity) in the same file, but the first is declared
  "external" and the second one isn't, Zorba allows the second
  declaration. It should be reported as an error.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/862971/+subscriptions

-- 
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] [Bug 866547] Re: Assertion failure flworExpr!=__null in index_join_rule.cpp

2012-05-30 Thread Markos Zaharioudakis
** Changed in: zorba
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/866547

Title:
  Assertion failure flworExpr!=__null in index_join_rule.cpp

Status in Zorba - The XQuery Processor:
  Fix Released

Bug description:
  The following query generates an assertion failure in
  index_join_rule.cpp :

  zorba: 
~/work/xquery_temp1/src/compiler/rewriter/rules/index_join_rule.cpp:671: void 
zorba::findFlworForVar(zorba::RewriterContext&, const zorba::var_expr*, 
zorba::flwor_expr*&, zorba::sequential_expr*&, ulong&, ulong&): Assertion 
`flworExpr != __null' failed.
  ./test.sh: line 11: 31507 Aborted $ZORBA_BINARY 
--optimization-level O1 -z "omit-xml-declaration=yes" -z "indent=yes" -f -q 
test.xq 

  -
  declare namespace l = "l";

  declare variable $page as node()* := ();
  declare variable $old_list as node()* := ();
  declare variable $lastPageNum as xs:integer := 0;

  declare function l:getLastPage($page as node()*) as xs:integer
  {
let $pageNum := $page[last()]
return if (count($pageNum) eq 0)
   then -1
   else 1
  };

  set $lastPageNum := l:getLastPage($page);

  for $rec in $page
let $id as xs:string := $rec
let $old_rec := $old_list[id/text() eq $id]
  return ();

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/866547/+subscriptions

-- 
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] [Bug 867170] Re: Overwritten variables in prolog

2012-05-30 Thread Markos Zaharioudakis
** Changed in: zorba
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/867170

Title:
  Overwritten variables in prolog

Status in Zorba - The XQuery Processor:
  Fix Released

Bug description:
  Variables declared in Prolog are Overwritten inside the query.
  example attached

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/867170/+subscriptions

-- 
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