[ANN] traversal-enabled objects with DeepTraverser

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] traversal-enabled objects with DeepTraverser

Tudor Girba-2
Hi,

I put together a little implementation for traversals. It is inspired by an original implementation from Mariano. Using DeepTraverser, you can traverse arbitrary graphs by describing the traversal and by specifying the actions you want to perform on the nodes and relations.

The code is available in the Moose image as part of the MooseAlgos subproject, but can also be loaded separately in a Pharo image via:

Gofer new
   package: ‘ConfigurationOfDeepTraverser’;
   load.
(Smalltalk globals at: #ConfigurationOfDeepTraverser) loadDevelopment.


Just to give you an idea, here are some representative examples:

Number
    deep: #subclasses 
    do: [:each | Transcript show: each; cr].

Number deepCollect: #subclasses.

Number
    deep: #subclasses 
    collect: #name.

Number 
    deep: #subclasses 
    do: [:each | Transcript show: each; cr]
    relationDo: [ :from :to | Transcript show: from; show: ' <-- '; show: to; cr ].



More details about the usages and a little description of the implementation can be found  here:


Cheers,
Doru



--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] traversal-enabled objects with DeepTraverser

Sam Adams-2

Hi Doru,
I've been observing how the graph support in Moose has been developing.
We in IBM Research have implemented a full Pharo implementation of the TinkerPop Blueprints property graph de-facto standard http://www.tinkerpop.com .
I am also completing a Pharo-binding for the Gremlin graph traversal language that I call Glider (What you get when you cross a Gremlin and a Mouse).  Its very compact and a bit weird syntactically, but its very powerful.  Smells kinda like APL for graphs.
If the community is interested, we could go through the IBM Open Source clearance process in the new year and see if we can contribute.
Regards,
Sam

Sam S. Adams, CTO - Contextual Computing
IBM Distinguished Engineer, IBM Research
Mobile: 919-696-6064, email: [hidden email]
Assistant: Linda R. Morrison. (720) 395-0460 Fax: (845) 491-4318, Tie: 676-0460, [hidden email]
<<Hebrews 11:6, Proverbs 3:5-6, Romans 1:16-17, 1 Corinthians 1:10>>

Inactive hide details for Tudor Girba ---12/11/2013 10:22:50 AM---Hi, I put together a little implementation for traversals. ItTudor Girba ---12/11/2013 10:22:50 AM---Hi, I put together a little implementation for traversals. It is inspired by an

From: Tudor Girba <[hidden email]>
To: moose-dev <[hidden email]>, Discusses Development of Pharo <[hidden email]>
Date: 12/11/2013 10:22 AM
Subject: [Moose-dev] [ANN] traversal-enabled objects with DeepTraverser
Sent by: [hidden email]





Hi,

I put together a little implementation for traversals. It is inspired by an original implementation from Mariano. Using DeepTraverser, you can traverse arbitrary graphs by describing the traversal and by specifying the actions you want to perform on the nodes and relations.

The code is available in the Moose image as part of the MooseAlgos subproject, but can also be loaded separately in a Pharo image via:

Gofer new
   url: 'http://www.smalltalkhub.com/mc/Moose/DeepTraverser/main';
   package: ‘ConfigurationOfDeepTraverser’;
   load.
(Smalltalk globals at: #ConfigurationOfDeepTraverser) loadDevelopment.


Just to give you an idea, here are some representative examples:

Number
    deep: #subclasses 
    do: [:each | Transcript show: each; cr].

Number deepCollect: #subclasses.

Number
    deep: #subclasses 
    collect: #name.

Number 
    deep: #subclasses 
    do: [:each | Transcript show: each; cr]
    relationDo: [ :from :to | Transcript show: from; show: ' <-- '; show: to; cr ].



More details about the usages and a little description of the implementation can be found  here:
http://www.humane-assessment.com/blog/traversal-enabled-pharo-objects/


Cheers,
Doru



--
www.tudorgirba.com

"Every thing has its own flow"_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] traversal-enabled objects with DeepTraverser

Lorenz Köhl
> We in IBM Research have implemented a full Pharo implementation of the TinkerPop Blueprints property graph de-facto standard http://www.tinkerpop.com .
> I am also completing a Pharo-binding for the Gremlin graph traversal language that I call Glider (What you get when you cross a Gremlin and a Mouse).  Its very compact and a bit weird syntactically, but its very powerful.  Smells kinda like APL for graphs.
> If the community is interested, we could go through the IBM Open Source clearance process in the new year and see if we can contribute.

Hi,
I've been toying with Linked Data concepts in Pharo, and a common API for handling graphs would probably make this stuff a little less confusing. It's easy to think "I will just use the smalltalk object graph", but I'm not so sure anymore if that's a good idea.

bye,

        Lorenz


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] traversal-enabled objects with DeepTraverser

Tudor Girba-2
In reply to this post by Sam Adams-2
Hi,

This sounds really interesting. I would definitely like to see the implementation both for the property graph and for the traversal language. And to have it available as open source under a Pharo-friendly license (MIT preferably) :).

In particular, I am curious about the language.

My implementation does not have these ambitions. I merely wanted to reach objects using a simple traversal (btw, I only implemented a breadth-first strategy) expressed in blocks, but having a more declarative query language would be interesting indeed.

Could you give us more details?

Cheers,
Doru


On Wed, Dec 11, 2013 at 4:54 PM, Sam Adams <[hidden email]> wrote:

Hi Doru,
I've been observing how the graph support in Moose has been developing.
We in IBM Research have implemented a full Pharo implementation of the TinkerPop Blueprints property graph de-facto standard http://www.tinkerpop.com .
I am also completing a Pharo-binding for the Gremlin graph traversal language that I call Glider (What you get when you cross a Gremlin and a Mouse).  Its very compact and a bit weird syntactically, but its very powerful.  Smells kinda like APL for graphs.
If the community is interested, we could go through the IBM Open Source clearance process in the new year and see if we can contribute.
Regards,
Sam

Sam S. Adams, CTO - Contextual Computing
IBM Distinguished Engineer, IBM Research
Mobile: <a href="tel:919-696-6064" value="+19196966064" target="_blank">919-696-6064, email: [hidden email]
Assistant: Linda R. Morrison. <a href="tel:%28720%29%20395-0460" value="+17203950460" target="_blank">(720) 395-0460 Fax: <a href="tel:%28845%29%20491-4318" value="+18454914318" target="_blank">(845) 491-4318, Tie: 676-0460, [hidden email]
<<Hebrews 11:6, Proverbs 3:5-6, Romans 1:16-17, 1 Corinthians 1:10>>

Inactive hide details for Tudor Girba ---12/11/2013 10:22:50 AM---Hi, I put together a little implementation for traversals. ItTudor Girba ---12/11/2013 10:22:50 AM---Hi, I put together a little implementation for traversals. It is inspired by an

From: Tudor Girba <[hidden email]>
To: moose-dev <[hidden email]>, Discusses Development of Pharo <[hidden email]>
Date: 12/11/2013 10:22 AM
Subject: [Moose-dev] [ANN] traversal-enabled objects with DeepTraverser
Sent by: [hidden email]





Hi,

I put together a little implementation for traversals. It is inspired by an original implementation from Mariano. Using DeepTraverser, you can traverse arbitrary graphs by describing the traversal and by specifying the actions you want to perform on the nodes and relations.

The code is available in the Moose image as part of the MooseAlgos subproject, but can also be loaded separately in a Pharo image via:

Gofer new
   url: 'http://www.smalltalkhub.com/mc/Moose/DeepTraverser/main';
   package: ‘ConfigurationOfDeepTraverser’;
   load.
(Smalltalk globals at: #ConfigurationOfDeepTraverser) loadDevelopment.


Just to give you an idea, here are some representative examples:

Number
    deep: #subclasses 
    do: [:each | Transcript show: each; cr].

Number deepCollect: #subclasses.

Number
    deep: #subclasses 
    collect: #name.

Number 
    deep: #subclasses 
    do: [:each | Transcript show: each; cr]
    relationDo: [ :from :to | Transcript show: from; show: ' <-- '; show: to; cr ].



More details about the usages and a little description of the implementation can be found  here:
http://www.humane-assessment.com/blog/traversal-enabled-pharo-objects/


Cheers,
Doru



--
www.tudorgirba.com

"Every thing has its own flow"_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] traversal-enabled objects with DeepTraverser

SergeStinckwich
In reply to this post by Sam Adams-2



On Wed, Dec 11, 2013 at 4:54 PM, Sam Adams <[hidden email]> wrote:

Hi Doru,
I've been observing how the graph support in Moose has been developing.
We in IBM Research have implemented a full Pharo implementation of the TinkerPop Blueprints property graph de-facto standard http://www.tinkerpop.com .
I am also completing a Pharo-binding for the Gremlin graph traversal language that I call Glider (What you get when you cross a Gremlin and a Mouse).  Its very compact and a bit weird syntactically, but its very powerful.  Smells kinda like APL for graphs.
If the community is interested, we could go through the IBM Open Source clearance process in the new year and see if we can contribute.


Hi Sam,

really impressive works ! Do you reimplement completely the blueprint stack on top of Pharo ?
This is definitively interesting for people who want to do complex graphs analysis.
I imagine some kind of interaction between your language and the ROASSAL visual engine ;-)

Feel free to open source this work if you have the opportunity.
Than you.
Regards,
--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] traversal-enabled objects with DeepTraverser

abergel
In reply to this post by Sam Adams-2
Impressive!

Alexandre


On Dec 11, 2013, at 4:54 PM, Sam Adams <[hidden email]> wrote:

> Hi Doru,
> I've been observing how the graph support in Moose has been developing.
> We in IBM Research have implemented a full Pharo implementation of the TinkerPop Blueprints property graph de-facto standard http://www.tinkerpop.com .
> I am also completing a Pharo-binding for the Gremlin graph traversal language that I call Glider (What you get when you cross a Gremlin and a Mouse).  Its very compact and a bit weird syntactically, but its very powerful.  Smells kinda like APL for graphs.
> If the community is interested, we could go through the IBM Open Source clearance process in the new year and see if we can contribute.
> Regards,
> Sam
>
> Sam S. Adams, CTO - Contextual Computing
> IBM Distinguished Engineer, IBM Research
> Mobile: 919-696-6064, email: [hidden email]
> Assistant: Linda R. Morrison. (720) 395-0460 Fax: (845) 491-4318, Tie: 676-0460, [hidden email]
> <<Hebrews 11:6, Proverbs 3:5-6, Romans 1:16-17, 1 Corinthians 1:10>>
>
> <graycol.gif>Tudor Girba ---12/11/2013 10:22:50 AM---Hi, I put together a little implementation for traversals. It is inspired by an
>
> From: Tudor Girba <[hidden email]>
> To: moose-dev <[hidden email]>, Discusses Development of Pharo <[hidden email]>
> Date: 12/11/2013 10:22 AM
> Subject: [Moose-dev] [ANN] traversal-enabled objects with DeepTraverser
> Sent by: [hidden email]
>
>
>
> Hi,
>
> I put together a little implementation for traversals. It is inspired by an original implementation from Mariano. Using DeepTraverser, you can traverse arbitrary graphs by describing the traversal and by specifying the actions you want to perform on the nodes and relations.
>
> The code is available in the Moose image as part of the MooseAlgos subproject, but can also be loaded separately in a Pharo image via:
>
> Gofer new
>    url: 'http://www.smalltalkhub.com/mc/Moose/DeepTraverser/main';
>    package: ‘ConfigurationOfDeepTraverser’;
>    load.
> (Smalltalk globals at: #ConfigurationOfDeepTraverser) loadDevelopment.
>
>
> Just to give you an idea, here are some representative examples:
>
> Number
>     deep: #subclasses
>     do: [:each | Transcript show: each; cr].
>
> Number deepCollect: #subclasses.
>
> Number
>     deep: #subclasses
>     collect: #name.
>
> Number
>     deep: #subclasses
>     do: [:each | Transcript show: each; cr]
>     relationDo: [ :from :to | Transcript show: from; show: ' <-- '; show: to; cr ].
>
>
>
> More details about the usages and a little description of the implementation can be found  here:
> http://www.humane-assessment.com/blog/traversal-enabled-pharo-objects/
>
>
> Cheers,
> Doru
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"_______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] [ANN] traversal-enabled objects with DeepTraverser

Tudor Girba-2
In reply to this post by Tudor Girba-2
Hi,

I looked a bit at the existing hardcoded traversal methods in a Pharo/Moose image. To detect it, I used a traversal. Perhaps this can also be useful for people that want to teach what a traversal is, or what an analysis is, so I wrote a blog post about it:

Cheers,
Doru





On Sat, Dec 14, 2013 at 3:44 PM, Mariano Martinez Peck <[hidden email]> wrote:



On Wed, Dec 11, 2013 at 12:21 PM, Tudor Girba <[hidden email]> wrote:
Hi,

I put together a little implementation for traversals. It is inspired by an original implementation from Mariano.

Wow... my memory is sooo bad I don't remember ;)

 
Using DeepTraverser, you can traverse arbitrary graphs by describing the traversal and by specifying the actions you want to perform on the nodes and relations.


Once (or even more times) we thought with Martin 2 things:

1) Reify the traversal in Fuel so that we could plug a different one.
2) Use Fuel only for traversing and allowing user a hook to plug the what to do with each node.
3) Use the same traversal of 2) for deepCopying 
4) Use the same traversal of 2) to get an approximate memory consumption of the transitive closure of an object

But as always happened we run out of time.

Anyway...I think this is a nice area to explore. There are many uses for a nice traverser.

Also, did you see we wrote a Rossal extension to print the fuel traversal? 


The code is available in the Moose image as part of the MooseAlgos subproject, but can also be loaded separately in a Pharo image via:

Gofer new
   package: ‘ConfigurationOfDeepTraverser’;
   load.
(Smalltalk globals at: #ConfigurationOfDeepTraverser) loadDevelopment.


Just to give you an idea, here are some representative examples:

Number
    deep: #subclasses 
    do: [:each | Transcript show: each; cr].

Number deepCollect: #subclasses.

Number
    deep: #subclasses 
    collect: #name.

Number 
    deep: #subclasses 
    do: [:each | Transcript show: each; cr]
    relationDo: [ :from :to | Transcript show: from; show: ' <-- '; show: to; cr ].



More details about the usages and a little description of the implementation can be found  here:


Cheers,
Doru



--

"Every thing has its own flow"



--
Mariano
http://marianopeck.wordpress.com



--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] [ANN] traversal-enabled objects with DeepTraverser

abergel
This is a short and well post!

I would have imagined more transversal are in the VM. I know Roassal has some

Alexandre


On Dec 16, 2013, at 12:47 AM, Tudor Girba <[hidden email]> wrote:

> Hi,
>
> I looked a bit at the existing hardcoded traversal methods in a Pharo/Moose image. To detect it, I used a traversal. Perhaps this can also be useful for people that want to teach what a traversal is, or what an analysis is, so I wrote a blog post about it:
> http://www.humane-assessment.com/blog/looking-for-hardcoded-traversal-methods
>
> Cheers,
> Doru
>
>
>
>
>
> On Sat, Dec 14, 2013 at 3:44 PM, Mariano Martinez Peck <[hidden email]> wrote:
>
>
>
> On Wed, Dec 11, 2013 at 12:21 PM, Tudor Girba <[hidden email]> wrote:
> Hi,
>
> I put together a little implementation for traversals. It is inspired by an original implementation from Mariano.
>
> Wow... my memory is sooo bad I don't remember ;)
>
>  
> Using DeepTraverser, you can traverse arbitrary graphs by describing the traversal and by specifying the actions you want to perform on the nodes and relations.
>
>
> Once (or even more times) we thought with Martin 2 things:
>
> 1) Reify the traversal in Fuel so that we could plug a different one.
> 2) Use Fuel only for traversing and allowing user a hook to plug the what to do with each node.
> 3) Use the same traversal of 2) for deepCopying
> 4) Use the same traversal of 2) to get an approximate memory consumption of the transitive closure of an object
>
> But as always happened we run out of time.
>
> Anyway...I think this is a nice area to explore. There are many uses for a nice traverser.
>
> Also, did you see we wrote a Rossal extension to print the fuel traversal?
> http://rmod.lille.inria.fr/web/pier/software/Fuel/Version1.9/Documentation/Debugging
>
>
> The code is available in the Moose image as part of the MooseAlgos subproject, but can also be loaded separately in a Pharo image via:
>
> Gofer new
>    url: 'http://www.smalltalkhub.com/mc/Moose/DeepTraverser/main';
>    package: ‘ConfigurationOfDeepTraverser’;
>    load.
> (Smalltalk globals at: #ConfigurationOfDeepTraverser) loadDevelopment.
>
>
> Just to give you an idea, here are some representative examples:
>
> Number
>     deep: #subclasses
>     do: [:each | Transcript show: each; cr].
>
> Number deepCollect: #subclasses.
>
> Number
>     deep: #subclasses
>     collect: #name.
>
> Number
>     deep: #subclasses
>     do: [:each | Transcript show: each; cr]
>     relationDo: [ :from :to | Transcript show: from; show: ' <-- '; show: to; cr ].
>
>
>
> More details about the usages and a little description of the implementation can be found  here:
> http://www.humane-assessment.com/blog/traversal-enabled-pharo-objects/
>
>
> Cheers,
> Doru
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev