[mercury-users] Possum

Dan Hazel d.hazel at mailbox.uq.edu.au
Thu Sep 23 01:06:05 AEST 1999


Thanks for too much of your time Fergus, 
I don't have access to so many machines and I'm probably wrong about my 
poo-pooing of Solaris.

I suppose I should mention however that the tests you ran are only
showing Possum starting, unfolding the query and failing (I hope)
almost immediately (and "semideterministically").
In Sum,
    x^n 
is the concatenation of the sequences x and n.

On top of that, Fermat specified as let's say

    schema Fermat is
    dec
        x,y,z,n:2..10000
    pred
        x ** n + y ** n = z ** n   
    end Fermat

is going to embarrass me, as Possum (like a cheap calculator) 
shifts into (it's version of) floats once integers get too big and 
supplies the expected swamping/rounding/overflow errors you can imagine.
To avoid rounding/overflow you'd probably have to keep n down and to
avoid swamping you'd have to keep x, y and z very close together.

A more appropriate query, which should also demonstrate how sleepy
Possum is, might be:
    
    {x, y, z : 2 .. 30; n : 2 .. 5 | x ** n + y ** n = z ** n}

If you spread much beyond that, you start to fall foul of problems like
for example:

    log(40, 40 ** 5 + 2 ** 5) = 5

This is the sort of thing I'd call a swamping error.
I imagine there's a more established name for it.

Possum's not much good at some things.
Dan Hazel

Fergus Henderson writes:
 > On 20-Sep-1999, Dan Hazel <d.hazel at mailbox.uq.edu.au> wrote:
 > > I guess I'd hoped there was some known problem with Mercury on Solaris.
 > > For example the Linux/Solaris speed ratio seems to be about the same
 > > for compiling Possum as it is for answering a runtime Possum query.
 > > You'd think the Linux machine was about 4 times faster.  It's not
 > > by the way.
 > 
 > Well, I downloaded Possum 1.0 for Linux and Solaris, and ran a simple
 > timing test for a runtime Possum query on a couple of Linux boxes and 
 > a couple of Solaris boxes.  But the times were just what I would have
 > expected from the relative speeds of the machine.
 > 
 > ----------
 > 
 > Here's the query I ran:
 > 
 > 	$ cat query
 > 	schema Fermat is
 > 	dec
 > 		x,y,z,n:2..10000
 > 	pred
 > 		x^n + y^n = z^n   
 > 	end Fermat;
 > 	Fermat
 > 
 > 	$ ./Posh < query
 > 
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list