I believe mm-ADT needs the concept of a sequence.

2019-06-05 Thread Marko Rodriguez
Hello,

I think that mm-ADT has new data type.

sequence: zero or more objects.

…where the two collections are a type of sequence:

list: an integer-based index of a sequence.
map: an object-based index of a sequence.

Why does a sequence exist? It exists because we don’t have a name for this 
anonymous type:

@object*

The above type/pattern is one of two things:

1. A multi-referent reference.
2. A sequence.

Given that references are implicitly dereferenced, I don’t think we should mix 
references in our patterns as references ultimately are the thing they are 
referencing. 

As such @object* is a “sequence.” Its not a list, because a list is typed as:

[@object*]

And what is that really saying? — its saying that a list is container of a 
sequence. What is the nature of that container? integer-based indexing.

A sequence is like a “structureless list.” Why? Because these are the only 
mutation instructions that work on it:

1. [append,@object]
2. [delete,@object]

You can’t [insert] because there is no way to say where to insert — there are 
no indices.

Finally, if “sequence" is the name of @object*, then I think a reference can be 
redefined to only allow one-to-one linking.

[db][,people]

This doesn’t return a reference to zero or more person objects. No, it returns 
a reference to a single sequence. Likewise, with respects to indexing:

-> [has,name,eq,$x.@string] => *

We have a reference to zero or more persons — a sequence of persons.

Finally, this also means that the following types are subtypes of sequence as 
they are all subtypes of @object*.

@object{2}
@object?
@object{5,100}
@object+
@object{0}
@object

With respect to the last type, this means that every denoted thing is a 
sequence. 

‘hello'

That is a sequence of one element that is a string — i.e. @string. Or, more 
specifically, @‘hello’.

This then means that [append] and [delete] can be applied everywhere that 
supports 0 or >1 quantification.

[constant,’hello’]   // ‘hello'
[append,42]  // ‘hello’ 42
[append,’marko’] // ‘hello’ 42 ‘marko'
[delete,’hello’] // 42 ‘marko'

What scares me is that we don’t have a way of representing instances of a 
multi-element sequence in our language. The below is ambiguous with sequences 
of containers. 

[name:marko, projects:tinkerpop,lop,gremlin]

Maybe we do:

[name:marko, projects:]

…where

[name:marko]
<=>
[name:]

…or perhaps:

[name:marko, projects:(tinkerpop,lop,gremlin)]

Its a pattern match group.

Finally, realize that this gets at a problem that I can’t seem to solve without 
the concept of a “sequence” (a containerless collection). And if you say that 
“sequences” are just lists, then bytecode will be a nasty tangle of [unfold] 
instructions — and overly complex reference graphs.

Thoughts?,
Marko.

http://rredux.com 






[jira] [Closed] (TINKERPOP-2232) RemoteStrategy does not call parent class TraversalStrategy __init__

2019-06-05 Thread stephen mallette (JIRA)


 [ 
https://issues.apache.org/jira/browse/TINKERPOP-2232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

stephen mallette closed TINKERPOP-2232.
---
   Resolution: Fixed
 Assignee: stephen mallette
Fix Version/s: 3.4.3
   3.3.8

Fixed via CTR:

{code}
>>> g = 
>>> traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin','g'))
>>> g.traversal_strategies
[RemoteStrategy]
{code}

https://github.com/apache/tinkerpop/commit/f2602ff64a086dba23f1ed2566850365b89310a7

> RemoteStrategy does not call parent class TraversalStrategy __init__
> 
>
> Key: TINKERPOP-2232
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2232
> Project: TinkerPop
>  Issue Type: Bug
>  Components: driver
>Affects Versions: 3.3.6, 3.4.1
>Reporter: James Farrow
>Assignee: stephen mallette
>Priority: Minor
> Fix For: 3.3.8, 3.4.3
>
>
> Attempting to print the traversal_strategies property on a TraversalSource 
> results in
> {code:java}
> AttributeError: 'RemoteStrategy' object has no attribute 'strategy_name' 
> {code}
> It appears RemoteStrategy.__init__ does not call its parent constructor 
> TraversalSource.__init__ so strategy_name and configuration are not being 
> initialised.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work started] (TINKERPOP-2099) Property setting with null has different behavior between add and update

2019-06-05 Thread stephen mallette (JIRA)


 [ 
https://issues.apache.org/jira/browse/TINKERPOP-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on TINKERPOP-2099 started by stephen mallette.
---
> Property setting with null has different behavior between add and update
> 
>
> Key: TINKERPOP-2099
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2099
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.3.4
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Minor
>  Labels: breaking
> Fix For: 3.5.0
>
>
> Demonstrated via:
> {code}
> gremlin> graph = TinkerFactory.createModern()
> ==>tinkergraph[vertices:6 edges:6]
> gremlin> g = graph.traversal()
> ==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
> gremlin> g.V(1).property("x", 1).property("y", null).property("z", 2)
> The AddPropertyStep does not have a provided value: AddPropertyStep({key=[y]})
> Type ':help' or ':h' for help.
> Display stack trace? [yN]N
> gremlin> g.V(1).properties()
> ==>vp[name->marko]
> ==>vp[x->1]
> ==>vp[age->29]
> gremlin> g.addV("test").property("x", 1).property("y", null).property("z", 2)
> ==>v[13]
> gremlin> g.V(13).properties()
> ==>vp[x->1]
> ==>vp[z->2]
> {code}
> Make the {{AddVertexStep}} have similar functionality to 
> {{AddPropertyStep}}...or the other way around.
> Added the breaking label here as either change will mean a change in behavior.
> Originally described here:
> https://groups.google.com/d/msg/gremlin-users/f1IHGb12eGY/i3UbaquXCAAJ



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (TINKERPOP-2157) SparkStarBarrierInterceptor injects (Byte) 0

2019-06-05 Thread stephen mallette (JIRA)


 [ 
https://issues.apache.org/jira/browse/TINKERPOP-2157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

stephen mallette closed TINKERPOP-2157.
---
   Resolution: Fixed
Fix Version/s: 3.4.3

Hope this isn't premature, but I was "luckily" getting failure consistently for 
several days with this on one of my systems. After many different attempts to 
try to fix, this change gave me several clean builds in a row:

https://github.com/apache/tinkerpop/commit/bab12701458bb30f89b2ea1bc9caa98406d0eabe

I guess we'll re-open if we see this problem again. 

> SparkStarBarrierInterceptor injects (Byte) 0
> 
>
> Key: TINKERPOP-2157
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2157
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.4.1
>Reporter: Daniel Kuppitz
>Assignee: stephen mallette
>Priority: Major
> Fix For: 3.4.3
>
>
> There are 3 tests that occasionally fail in 
> {{SparkGraphComputerProcessIntegrateTest}}:
>  * {{g_V_name_min}}
>  * {{g_V_name_max}}
>  * {{g_V_age_min}}
> In all cases, failure is a result of a mysterious {{(Byte) 0}}. Apparently, 
> this zero gets injected by the {{SparkStarBarrierInterceptor}}. I came to 
> this conclusion because I wasn't able to reproduce any of the failures after 
> excluding this interceptor. However, the failures happen randomly*, so I 
> can't say with 100% certainty that the interceptor is the problem.
>  
> * on my system it never happened in the Docker builds, rarely in IntelliJ 
> debug sessions, but quite often when I just run the test suite in IntelliJ



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (TINKERPOP-2237) Prevent error when closing sessions that don't exist

2019-06-05 Thread stephen mallette (JIRA)
stephen mallette created TINKERPOP-2237:
---

 Summary: Prevent error when closing sessions that don't exist
 Key: TINKERPOP-2237
 URL: https://issues.apache.org/jira/browse/TINKERPOP-2237
 Project: TinkerPop
  Issue Type: Improvement
  Components: server
Affects Versions: 3.3.7
Reporter: stephen mallette


If you close a session in Gremlin Server that doesn't exist you get an error 
returned to the client. Not sure why that behavior was necessary, but thinking 
about it now, it doesn't seem useful. We should just treat it as a no-op. 

Added the "breaking" label since this is a minor change in expected behavior 
for users. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (TINKERPOP-2223) Update jackson databind to 2.9.9

2019-06-05 Thread stephen mallette (JIRA)


 [ 
https://issues.apache.org/jira/browse/TINKERPOP-2223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

stephen mallette closed TINKERPOP-2223.
---
   Resolution: Done
Fix Version/s: 3.4.3
   3.3.8

Updated via CTR 
https://github.com/apache/tinkerpop/commit/7c207e5f49aa0761e561cbb0bc7ff42c54984a7b

> Update jackson databind to 2.9.9
> 
>
> Key: TINKERPOP-2223
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2223
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: io
>Affects Versions: 3.3.6, 3.4.1
>Reporter: Robert Dale
>Assignee: stephen mallette
>Priority: Minor
> Fix For: 3.3.8, 3.4.3
>
>
> https://app.snyk.io/vuln/SNYK-JAVA-COMFASTERXMLJACKSONCORE-174736
> Upgrade com.fasterxml.jackson.core:jackson-databind to version 2.9.9 or 
> higher.
> Security vulnerability is specific to having mysql jars on the classpath. 
> Does not affect us directly.  Low priority, let's put it on the roadmap.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (TINKERPOP-2223) Update jackson databind to 2.9.9

2019-06-05 Thread stephen mallette (JIRA)


 [ 
https://issues.apache.org/jira/browse/TINKERPOP-2223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

stephen mallette updated TINKERPOP-2223:

Summary: Update jackson databind to 2.9.9  (was: Update jackson databind)

> Update jackson databind to 2.9.9
> 
>
> Key: TINKERPOP-2223
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2223
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: io
>Affects Versions: 3.3.6, 3.4.1
>Reporter: Robert Dale
>Assignee: stephen mallette
>Priority: Minor
>
> https://app.snyk.io/vuln/SNYK-JAVA-COMFASTERXMLJACKSONCORE-174736
> Upgrade com.fasterxml.jackson.core:jackson-databind to version 2.9.9 or 
> higher.
> Security vulnerability is specific to having mysql jars on the classpath. 
> Does not affect us directly.  Low priority, let's put it on the roadmap.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work started] (TINKERPOP-2223) Update jackson databind

2019-06-05 Thread stephen mallette (JIRA)


 [ 
https://issues.apache.org/jira/browse/TINKERPOP-2223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on TINKERPOP-2223 started by stephen mallette.
---
> Update jackson databind
> ---
>
> Key: TINKERPOP-2223
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2223
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: io
>Affects Versions: 3.3.6, 3.4.1
>Reporter: Robert Dale
>Assignee: stephen mallette
>Priority: Minor
>
> https://app.snyk.io/vuln/SNYK-JAVA-COMFASTERXMLJACKSONCORE-174736
> Upgrade com.fasterxml.jackson.core:jackson-databind to version 2.9.9 or 
> higher.
> Security vulnerability is specific to having mysql jars on the classpath. 
> Does not affect us directly.  Low priority, let's put it on the roadmap.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (TINKERPOP-2236) Improve error messaging for TinkerGraph IdManagers that fail on conversions

2019-06-05 Thread stephen mallette (JIRA)
stephen mallette created TINKERPOP-2236:
---

 Summary: Improve error messaging for TinkerGraph IdManagers that 
fail on conversions
 Key: TINKERPOP-2236
 URL: https://issues.apache.org/jira/browse/TINKERPOP-2236
 Project: TinkerPop
  Issue Type: Improvement
  Components: tinkergraph
Affects Versions: 3.3.7
Reporter: stephen mallette
Assignee: stephen mallette


The current exception message is not clear as it's just the message from 
{{NumberFormatException}} as follows:

{code}
gremlin> g.addV('Person').property(id, 'P1').property('age', 20)
For input string: "P1"
Type ':help' or ':h' for help.
Display stack trace? [yN]y
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)