Re: euler5 test results

danny.ayers@gmail.com wrote:
> On 4/30/06, jos.deroo@agfa.com <jos.deroo@agfa.com> wrote:
> >
> > euler5 http://eulersharp.sourceforge.net/2006/02swap/euler.yap is
> > basically
> > go:- (X==>Y), X, \+Y, step((X==>Y)), assert(Y), go; true.
> > % Euler path via \+Y to not step in own steps
>
> Weeeeee - please slow down..! Could you please explain this in a more
> verbose fashion ;-)
> I vaguely remember hitting loops right away on even the simplest
> relations with prolog (without tabling) - how does Euler know where
> it's been? Using anything specific to yap?

He knows it via the assert(Y) and will not take that step
again due to the \+Y (which is negation as failure).
It is not specific to YAP and also runs on SWI-Prolog
and B-Prolog and I'm testing now with XSB (seems also
fine without math:degrees and math:exponentiation).

What was maybe not clear from the test cases is that we
always start from the N3 and then aggregate and translate
the triples and rules into a prolog notation where the
log:implies is the '==>' operator. The plan for the
output is to also have N3 logic.

Thanks for asking such question Danny ;-)

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

Received on Sunday, 30 April 2006 10:20:35 UTC