Frank Goenninger | 18 Mar 2012 22:53

Triple Cells: AllegroGraph 4.5 "porting"

Hi Kenny, 

I just began using Triple Cells. We have planned a rather large AllegroGraph-based implementation and as a
fan of Cells I am porting Triple Cells to AllegroGraph 4.5.

I am running in a situation where I get a problem with 3c-pulse-advance:
(I have instrumented 3c a bit ...;-)

0> PULSE> ---- advancing: (:change)
0> 3c-make storing type !hw:computer future-part
0> 3c-in nil t equal !hw:echo-happen {_:anon4}
0> stmt-new called with {_:anon3} !hw:happen {_:anon4} {_:anon4}
0> stmt-new (3c-cell? o) <_:anon4 type input>
0> 3c-install-cell called with s p o {_:anon3} !hw:happen {_:anon4}
0> subject-cells-node called with s =  {_:anon3}
0> subject-cells-node tr nil
0> subject-cells-node new-blank-node {_:anon5}
0> subject-cells-node (add-triple s !ccc:cells n) 13
0> 3c-install-cell subject-cells-node s = {_:anon5}
0> subject-cells-node called with s =  {_:anon3}
0> subject-cells-node tr <_:anon3 cells _:anon5>
0> subject-cells-node (object tr) =  {_:anon5}
0> 3c-install-cell (add-triple (subject-cells-node s) p o) 14
0> 3c-install-cell (add-triple o !ccc:is-cell-of-model s) 15
0> 3c-install-cell (add-triple o !ccc:is-cell-of-predicate p) 16
0> stmt-new called with {_:anon3} !hw:location {_:anon6} {_:anon6}
0> stmt-new (3c-cell? o) <_:anon6 type ruled>
0> 3c-install-cell called with s p o {_:anon3} !hw:location {_:anon6}
0> subject-cells-node called with s =  {_:anon3}
0> subject-cells-node tr <_:anon3 cells _:anon5>
(Continue reading)

Kenneth Tilton | 19 Mar 2012 15:47
Picon

Re: Triple Cells: AllegroGraph 4.5 "porting"

On 3/18/2012 5:53 PM, Frank Goenninger wrote:
> Hi Kenny,
>
> I just began using Triple Cells. We have planned a rather large AllegroGraph-based implementation and as
a fan of Cells I am porting Triple Cells to AllegroGraph 4.5.

Great. I love the data model (and you know I love Cells). On my project 
we have a PostGres table called "triple". Only problem is the object 
column because SQL does not like untyped columns (so I create object 
columns for any type I need to store <g>).

>
> I am running in a situation where I get a problem with 3c-pulse-advance:
> (I have instrumented 3c a bit ...;-)
>
> 0>  PULSE>  ---- advancing: (:change)
> 0>  3c-make storing type !hw:computer future-part
> 0>  3c-in nil t equal !hw:echo-happen {_:anon4}
> 0>  stmt-new called with {_:anon3} !hw:happen {_:anon4} {_:anon4}
> 0>  stmt-new (3c-cell? o)<_:anon4 type input>
> 0>  3c-install-cell called with s p o {_:anon3} !hw:happen {_:anon4}
> 0>  subject-cells-node called with s =  {_:anon3}
> 0>  subject-cells-node tr nil
> 0>  subject-cells-node new-blank-node {_:anon5}
> 0>  subject-cells-node (add-triple s !ccc:cells n) 13
> 0>  3c-install-cell subject-cells-node s = {_:anon5}
> 0>  subject-cells-node called with s =  {_:anon3}
> 0>  subject-cells-node tr<_:anon3 cells _:anon5>
> 0>  subject-cells-node (object tr) =  {_:anon5}
> 0>  3c-install-cell (add-triple (subject-cells-node s) p o) 14
(Continue reading)

Frank Goenninger | 19 Mar 2012 23:04

Re: Triple Cells: AllegroGraph 4.5 "porting"

Am 19.03.2012 um 15:47 schrieb Kenneth Tilton:

> On 3/18/2012 5:53 PM, Frank Goenninger wrote:
>> Hi Kenny,
>> 
>> I just began using Triple Cells. We have planned a rather large AllegroGraph-based implementation and
as a fan of Cells I am porting Triple Cells to AllegroGraph 4.5.
> 
> Great. I love the data model (and you know I love Cells). On my project we have a PostGres table called
"triple". Only problem is the object column because SQL does not like untyped columns (so I create object
columns for any type I need to store <g>).

Wow - I thought BLOBs would be the way to go. For PostgreSQL, it's this:
http://www.postgresql.org/docs/current/static/datatype-binary.html

[snip]

>> 0>  3c-cell-pulse: sp =  nil
>> 0>  3c-cell-pulse: sp is NIL !
>> 
>> It would help if you could shed some light on this ...
> 
> Not sure I follow the output, but that could be because I have not looked at triplecells in ages. I do not even
have that source on this laptop!
> 
> Big Q: the above looks like it is from the Hello World example/test. Yes?

It is! I just instrumented it a bit with lots of calls to #'trc.

> Is sp the current datapulse?
(Continue reading)

Kenneth Tilton | 20 Mar 2012 15:10
Picon

Re: Triple Cells: AllegroGraph 4.5 "porting"

On 3/19/2012 6:04 PM, Frank Goenninger wrote:
> Am 19.03.2012 um 15:47 schrieb Kenneth Tilton:
>
>> On 3/18/2012 5:53 PM, Frank Goenninger wrote:
>>> Hi Kenny,
>>>
>>> I just began using Triple Cells. We have planned a rather large AllegroGraph-based implementation and
as a fan of Cells I am porting Triple Cells to AllegroGraph 4.5.
>> Great. I love the data model (and you know I love Cells). On my project we have a PostGres table called
"triple". Only problem is the object column because SQL does not like untyped columns (so I create object
columns for any type I need to store<g>).
> Wow - I thought BLOBs would be the way to go. For PostgreSQL, it's this:
> http://www.postgresql.org/docs/current/static/datatype-binary.html

Hey, good idea. Thanks.

>
> [snip]
>
>>> 0>   3c-cell-pulse: sp =  nil
>>> 0>   3c-cell-pulse: sp is NIL !
>>>
>>> It would help if you could shed some light on this ...
>> Not sure I follow the output, but that could be because I have not looked at triplecells in ages. I do not
even have that source on this laptop!
>>
>> Big Q: the above looks like it is from the Hello World example/test. Yes?
> It is! I just instrumented it a bit with lots of calls to #'trc.
>
>> Is sp the current datapulse?
(Continue reading)

Frank Goenninger | 20 Mar 2012 17:29

Re: Triple Cells: AllegroGraph 4.5 "porting"


Am 20.03.2012 um 15:10 schrieb Kenneth Tilton:

> In the above get-sp is supposed to return a triple, the object of which is the datapulse. So the question is
why get-sp returns nil?

Yep, true.

> You are right, btw, I am so busy I forgot to look at the code when I got home.

hehe, hope that whatever is keeping you busy is kind of cool and worth the sweat ;-)

> I just spent ten minutes just looking at the code and, wow, this will take some refreshing and I'll have to
run it and trace a bit to see what is up. I'll see if I can get to it tonight.

Would be good ... ;-)

> 
> Have you ever run it on any AG4.x? I do know there have been enough changes that I am not surprised we have to
get the hood up.

I only do AG4.5. Earlier versions don't work anymore - many API changes. You see a (require :agraph4)
instead of just :agraph in my Triple-Cells variant (file defpackage.lisp). AG4.x is the currently
distributed stuff, so no reason to do earlier versions.

> One thought: did you add the bit that complains about not getting a pulse?

I ran into an error due to sp being nil: (object sp) barfs then, of course.

> Since this is early in the life of the cell I can imagine that the intent was to treat a missing !pulse as
(Continue reading)

Kenneth Tilton | 20 Mar 2012 18:27
Picon

Re: Triple Cells: AllegroGraph 4.5 "porting"

On 3/20/2012 12:29 PM, Frank Goenninger wrote:
> Am 20.03.2012 um 15:10 schrieb Kenneth Tilton:
>
>> In the above get-sp is supposed to return a triple, the object of which is the datapulse. So the question is
why get-sp returns nil?
> Yep, true.
>
>> You are right, btw, I am so busy I forgot to look at the code when I got home.
> hehe, hope that whatever is keeping you busy is kind of cool and worth the sweat ;-)
>
>> I just spent ten minutes just looking at the code and, wow, this will take some refreshing and I'll have to
run it and trace a bit to see what is up. I'll see if I can get to it tonight.
> Would be good ... ;-)
>
>> Have you ever run it on any AG4.x? I do know there have been enough changes that I am not surprised we have to
get the hood up.
> I only do AG4.5. Earlier versions don't work anymore - many API changes. You see a (require :agraph4)
instead of just :agraph in my Triple-Cells variant (file defpackage.lisp). AG4.x is the currently
distributed stuff, so no reason to do earlier versions.
>
>> One thought: did you add the bit that complains about not getting a pulse?
> I ran into an error due to sp being nil: (object sp) barfs then, of course.
>
>> Since this is early in the life of the cell I can imagine that the intent was to treat a missing !pulse as
"uninitialized". In which case I think the error you got was in the caller where upi= tries to compare UPIs
and it gets upset over being passed nil. In which case it would just mean they tightened up something and we
need to do our own more flexible upi-equal or something.
> Ah - yes, that sounds like something worth exploring!
>
>> I will probably start by grabbing triple cells off github and start from there just to reduce the variables.
(Continue reading)

Frank Goenninger | 20 Mar 2012 18:50

Re: Triple Cells: AllegroGraph 4.5 "porting"


Am 20.03.2012 um 18:27 schrieb Kenneth Tilton:

> Ugh, and find a Linux machine. I forgot about all that.

No need to! Just DL VMware Fusion and run a pre-packaged, complete VM from Franz with AG4.5 server! Really
easy ...

> 
> Is AG3 still available?

No.

> You could use it to figure out what should be happening, and confirm my guess that you can just take
3c-cell-pulse and make it look like 3c-pulse: test that the triple is found before returning the object.
You may then blow up on testing upi= with nil, but just do my suggested upi-equal.
> 
> I took some time to look at the code and I do not see that tcells get their !pulse set when created, nor do I see
ensure-current being called necessarily up front, so it might just work if you make this one change.

ah ... Beginning to understand ...

> 
> The danger is that some incompatibility somewhere else is changing the code path so that initialization
or ensure-current is different, in which case the above fix would just mask the real problem -- but then it
should break again soon enough.
> 
> If AG3 can be had for Windows I could give it a try, if not it might be a while before I can get to a Linux set-up.

See above, The VMware Fusion of VMware Player is available for Windows, too!
(Continue reading)


Gmane