Re: N3 in JSON, euler.py

Dan Connolly wrote:
> On Tue, 2006-12-19 at 21:03 -0600, Dan Connolly wrote:
> > > >   % hg clone http://homer.w3.org:8765/ euler-py-hg
> [...]
> > Next up: move toward the Russel/Norvig logic.py Expr() class,
> > and the related JSON representation from n3absyn.py , which
> > I updated yesterday to more closely match logic.py .
>
> I'm trying to understand the Step() class and the prove()
> function; I'm a little stuck. For example, why copy
> the rule and the step here?
>
> 140            r = Step(copy.copy(c.parent.rule), c.parent.src, 
> 141                  copy.copy(c.parent.parent), c.parent.env,
> c.parent.ind) 
>  -- http://homer.w3.org:8765/?f=4abf7397cdb2;file=euler.py

23:06:55 <JosD> DanC, then quickly: you are probably right that
the 4 copy.copy's are not needed; all tests are still fine

Thanks for finding that out and it is good to continuously
refactor, just wished we had much more test cases..

> I can see why you need to copy env's when you change them,
> but for everything else, I don't see why you need to make copies.
>
> and what are the .ind and .src fields in the Step() class for?

23:08:35 <JosD> DanC: the .ind is to keep track of the end of a
premise and cp.src == c.src is critical in the euler path detection

That mechanism is basically about "don't step in your own steps"
and the .src is to identify rules with same consequent as being
different.

> p.s. I think email is a little clumsy for these details;
> I hope to run into you on skype; I wish your firewall
> didn't prevent you from doing #swig.

When I'm at home I can use a direct connection instead of vpn
and switch from the one to the other; will check with our support
team again to see how we could resolve; also the
http://homer.w3.org:8765/ is not going through our proxy.

-- 
Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/

Received on Wednesday, 20 December 2006 23:14:24 UTC