[Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-empty_selectors into lp:zorba

2013-03-24 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/feature-empty_selectors into 
lp:zorba has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
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/feature-empty_selectors into lp:zorba

2013-03-20 Thread Markos Zaharioudakis
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
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/feature-empty_selectors into lp:zorba

2013-03-17 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/feature-empty_selectors into 
lp:zorba has been updated.

Status: Approved => Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
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/feature-empty_selectors into lp:zorba

2013-03-17 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, 
Needs Fixing < 1, Pending < 1, Needs Information < 1, Resubmit < 1. Got: 1 
Approve, 2 Needs Fixing.
-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
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/feature-empty_selectors into lp:zorba

2013-03-17 Thread Zorba Build Bot
Validation queue job feature-empty_selectors-2013-03-17T17-55-53.446Z is 
finished. The final status was:

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

2013-03-17 Thread Matthias Brantner
> The current XQuery 3.0 spec does not talk about implicit iteration for dyn 
> func invocation. But I remember Ghislain syaing that he will try to add 
> implicit iteration to the spec. Don't know if he tried and failed, or did not 
> try at all, or whether he actually succeeded and it just has not been made 
> public yet.
> 
> But no matter what, this is a case where I wouldn't mind a slight divergence 
> from the official spec as the resulting implementation is much cleaner and 
> actually more general as well. 
I have removed the implicit iteration from the dynamic function invocation for 
now.
When will the hof branch be merged?

> Furthermore, I think we should get rid of the ZORBA_WITH_JSONIQ compiler flag 
> and use an option to enable/disable jsoniq. So, we can get back to 100% 
> XQuery conformance by disabling jsoniq.
I have added such a flag to the Zorba_CompilerOptions in the parser branch.
That's at least a start and we can take it from there. What do you think?


>> On Mar 16, 2013, at 11:32 AM, Markos Zaharioudakis 
>> wrote:
>> 
>>> Review: Needs Fixing
>>> 
>>> The implicit iteration should always be done in the translator, not in the
>> runtime (actually, that's how it is in the hof branch). So the new do-loop in
>> dynamic_function_iterator.cpp should be removed.
>>> 
>>> --
>>> https://code.launchpad.net/~zorba-coders/zorba/feature-
>> empty_selectors/+merge/153615
>>> You proposed lp:~zorba-coders/zorba/feature-empty_selectors for merging.
> -- 
> https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
> You proposed lp:~zorba-coders/zorba/feature-empty_selectors for merging.


-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
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/feature-empty_selectors into lp:zorba

2013-03-17 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/feature-empty_selectors-2013-03-17T17-55-53.446Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
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/feature-empty_selectors into lp:zorba

2013-03-17 Thread Matthias Brantner
The proposal to merge lp:~zorba-coders/zorba/feature-empty_selectors into 
lp:zorba has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
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/feature-empty_selectors into lp:zorba

2013-03-16 Thread Markos Zaharioudakis
> For both cases, the function invocation with 0 and 1 arguments?
> 
> Does the dynamic function call itself (i.e. on function items) also do
> implicit iteration?
> If not, how does the translator decide whether implicit iteration has to be
> done
> or not?
> 

The current XQuery 3.0 spec does not talk about implicit iteration for dyn func 
invocation. But I remember Ghislain syaing that he will try to add implicit 
iteration to the spec. Don't know if he tried and failed, or did not try at 
all, or whether he actually succeeded and it just has not been made public yet.

But no matter what, this is a case where I wouldn't mind a slight divergence 
from the official spec as the resulting implementation is much cleaner and 
actually more general as well. 

Furthermore, I think we should get rid of the ZORBA_WITH_JSONIQ compiler flag 
and use an option to enable/disable jsoniq. So, we can get back to 100% XQuery 
conformance by disabling jsoniq.


> On Mar 16, 2013, at 11:32 AM, Markos Zaharioudakis 
> wrote:
> 
> > Review: Needs Fixing
> >
> > The implicit iteration should always be done in the translator, not in the
> runtime (actually, that's how it is in the hof branch). So the new do-loop in
> dynamic_function_iterator.cpp should be removed.
> >
> > --
> > https://code.launchpad.net/~zorba-coders/zorba/feature-
> empty_selectors/+merge/153615
> > You proposed lp:~zorba-coders/zorba/feature-empty_selectors for merging.
-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
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/feature-empty_selectors into lp:zorba

2013-03-16 Thread Matthias Brantner
For both cases, the function invocation with 0 and 1 arguments?

Does the dynamic function call itself (i.e. on function items) also do implicit 
iteration?
If not, how does the translator decide whether implicit iteration has to be done
or not?

On Mar 16, 2013, at 11:32 AM, Markos Zaharioudakis  wrote:

> Review: Needs Fixing
> 
> The implicit iteration should always be done in the translator, not in the 
> runtime (actually, that's how it is in the hof branch). So the new do-loop in 
> dynamic_function_iterator.cpp should be removed.
> 
> -- 
> https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
> You proposed lp:~zorba-coders/zorba/feature-empty_selectors for merging.


-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
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/feature-empty_selectors into lp:zorba

2013-03-16 Thread Markos Zaharioudakis
Review: Needs Fixing

The implicit iteration should always be done in the translator, not in the 
runtime (actually, that's how it is in the hof branch). So the new do-loop in 
dynamic_function_iterator.cpp should be removed.

-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
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/feature-empty_selectors into lp:zorba

2013-03-16 Thread Markos Zaharioudakis
Review: Needs Fixing

The implicit iteration should always be done in the translator, not in the 
runtime (actually, that's how it is in the hof branch). So the new do-loop in 
dynamic_function_iterator.cpp should be removed.

-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
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/feature-empty_selectors into lp:zorba

2013-03-15 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/feature-empty_selectors into 
lp:zorba has been updated.

Status: Approved => Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
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/feature-empty_selectors into lp:zorba

2013-03-15 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/feature-empty_selectors into 
lp:zorba failed. Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 
(message):
  Validation queue job feature-empty_selectors-2013-03-15T19-32-56.975Z is
  finished.  The final status was:

  

  2 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/feature-empty_selectors/+merge/153615
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/feature-empty_selectors into lp:zorba

2013-03-15 Thread Matthias Brantner
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
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/feature-empty_selectors into lp:zorba

2013-03-15 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/feature-empty_selectors-2013-03-15T19-32-56.975Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
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/feature-empty_selectors into lp:zorba

2013-03-15 Thread Matthias Brantner
The proposal to merge lp:~zorba-coders/zorba/feature-empty_selectors into 
lp:zorba has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
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/feature-empty_selectors into lp:zorba

2013-03-15 Thread Matthias Brantner
Matthias Brantner has proposed merging 
lp:~zorba-coders/zorba/feature-empty_selectors into lp:zorba.

Commit message:
- $array() => jn:members($array)
- $object() => jn:keys($object)
- fixed implicit iteration of object/array selectors if type is not statically 
known

Requested reviews:
  Matthias Brantner (matthias-brantner)
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-empty_selectors/+merge/153615
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'include/zorba/pregenerated/diagnostic_list.h'
--- include/zorba/pregenerated/diagnostic_list.h	2013-03-06 10:37:33 +
+++ include/zorba/pregenerated/diagnostic_list.h	2013-03-15 19:32:31 +
@@ -909,6 +909,8 @@
 
 extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNTY0020;
 
+extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNTY0021;
+
 extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNDY0021;
 #endif
 

=== modified file 'modules/org/jsoniq/www/pregenerated/errors.xq'
--- modules/org/jsoniq/www/pregenerated/errors.xq	2013-03-06 00:18:36 +
+++ modules/org/jsoniq/www/pregenerated/errors.xq	2013-03-15 19:32:31 +
@@ -157,6 +157,11 @@
 declare variable $jerr:JNTY0020 as xs:QName := fn:QName($jerr:NS, "jerr:JNTY0020");
 
 (:~
+ :array or object selector on heterogeneous sequence
+:)
+declare variable $jerr:JNTY0021 as xs:QName := fn:QName($jerr:NS, "jerr:JNTY0021");
+
+(:~
  :parser error raised by jn:parse-json
 :)
 declare variable $jerr:JNDY0021 as xs:QName := fn:QName($jerr:NS, "jerr:JNDY0021");
\ No newline at end of file

=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp	2013-03-08 00:09:46 +
+++ src/compiler/translator/translator.cpp	2013-03-15 19:32:31 +
@@ -11432,7 +11432,7 @@
   if (!theSctx->is_feature_set(feature::hof) ||
   (TypeOps::is_subtype(tm, *srcType, *theRTM.JSON_ITEM_TYPE_STAR)))
   {
-if (numArgs != 1)
+if (numArgs > 1)
 {
   RAISE_ERROR_NO_PARAMS(jerr::JNTY0018, loc);
 }
@@ -11448,22 +11448,27 @@
 
 if (TypeOps::is_subtype(tm, *srcType, *theRTM.JSON_ARRAY_TYPE_STAR))
 {
-  func = BUILTIN_FUNC(FN_JSONIQ_MEMBER_2);
+  func = numArgs==1 ?
+BUILTIN_FUNC(FN_JSONIQ_MEMBER_2) :
+BUILTIN_FUNC(FN_JSONIQ_MEMBERS_1);
 }
 else if (TypeOps::is_subtype(tm, *srcType, *theRTM.JSON_OBJECT_TYPE_STAR))
 {
-  func = BUILTIN_FUNC(FN_JSONIQ_VALUE_2);
+  func = numArgs==1 ?
+BUILTIN_FUNC(FN_JSONIQ_VALUE_2) :
+BUILTIN_FUNC(FN_JSONIQ_KEYS_1);
 }
 else
 {
-  func = BUILTIN_FUNC(OP_ZORBA_JSON_ITEM_ACCESSOR_2);
+  func = numArgs==1 ?
+BUILTIN_FUNC(OP_ZORBA_JSON_ITEM_ACCESSOR_2) :
+BUILTIN_FUNC(OP_ZORBA_JSON_ITEM_ACCESSOR_1);
 }
-
-accessorExpr = theExprManager->create_fo_expr(theRootSctx, theUDF,
-  loc,
-  func,
-  flworVarExpr,
-  arguments[0]);
+accessorExpr = numArgs==1 ?
+  theExprManager->create_fo_expr(
+  theRootSctx, theUDF, loc, func, flworVarExpr, arguments[0]) :
+  theExprManager->create_fo_expr(
+  theRootSctx, theUDF, loc, func, flworVarExpr);
 
 normalize_fo(accessorExpr);
 

=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml	2013-03-07 10:10:10 +
+++ src/diagnostics/diagnostic_en.xml	2013-03-15 19:32:31 +
@@ -3095,7 +3095,7 @@
 
   It is a dynamic error if there is not exactly one supplied parameter for an object or array selector.
 
-  object or array selection needs exactly one parameter
+  object or array selection needs zero or one parameter
 
 
 
@@ -3120,6 +3120,11 @@
   $1: invalid option type for option $2 (expected $3)
 
 
+
+  array or object selector on heterogeneous sequence
+  $1: invalid json-item() type (expected $2)
+
+
 
   parser error raised by jn:parse-json
   $1

=== modified file 'src/diagnostics/pregenerated/diagnostic_list.cpp'
--- src/diagnostics/pregenerated/diagnostic_list.cpp	2013-03-06 10:37:33 +
+++ src/diagnostics/pregenerated/diagnostic_list.cpp	2013-03-15 19:32:31 +
@@ -1339,6 +1339,9 @@
 JSONiqErrorCode JNTY0020( "JNTY0020" );
 
 
+JSONiqErrorCode JNTY0021( "JNTY0021" );
+
+
 JSONiqErrorCode JNDY0021( "JNDY0021" );
 #endif
 

=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp	2013-03-07 10:10:10 +
+++ src/diagnostics/pregenerated/dict_en.cpp	2013-03-15 19:32:31 +
@@ -126,12 +126,15 @@
   { "JNTY0011", "JSON item cannot appear in content sequence of node constructor or updating expression" },
 #endif
 #if defined(ZORBA_WITH_JSON)
-  { "JNTY0018", "object or array se