[mercury-users] How to vary implementations of a pred declaration?

doug.auclair at logicaltypes.com doug.auclair at logicaltypes.com
Fri Mar 24 11:30:22 AEDT 2006


... hmm ... it seems your mail server blocks emails with compressed
attachments.  Resending the below and adding a link to the file that's
causing the problem described.

Dear Zoltan,

> There is another possible solution: have a single large definition
> in which each clause is tagged with an extra argument that says which
> version of the predicate it applies in.

[snip implementation]

I like what you recommended.  ... Unfortunately, I'm back to the compiler
grinding to an eventual halt on 1671 clauses, arity 3, but the arguments
are now no longer primitives, but typed with discriminated unions, and
the third argument is an assoc_list (causing the eventual detstack overflow
in the compiler).  I've attached the (compressed) module; 

     [edit: compressed module at 
      http://www.logicaltypes.com/share/training_cars.m.gz]

is there a way to
get this to a  compilable state by modifying the compiler? Or is it that
assoc_lists, length 25, are just a Bad Thing when repeated over 1000 times?

help-help-help! (again).

Sincerely,
Doug Auclair

--------------------------------------------------------------------------
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