[mercury-users] literature polymorphic recursive calls

Peter Stuckey pjs at cs.mu.OZ.AU
Thu Jun 23 10:01:27 AEST 2005


On 22/06/2005, at 4:37 PM, Ralph Becket wrote:

> Tom Schrijvers, Wednesday, 22 June 2005:
>>
>>  I guess Mercury takes a third
>> approach: it does multiple iterations to handle some non-problematic
>> recursive definitions. What happens if the limit is reached? I should 
>> try
>> it :)
>
> Well, even HM checkers can take an exponential amount of time in the
> worst case!  In practice this problem just doesn't arise (at least, not
> in my experience).

In fact because of adhoc overladoing it is worse for Mercury.
But in practice problems dont arise.

Still in my opinion Mercury should just use the HM assumption if
there are no declarations. In any polymorphic recusrive code the
iterated approach will never infer the polymorphic type

p(X,Y) :- (X == Y -> p(true,false) ; p(1,2))






-------------- next part --------------
A non-text attachment was scrubbed...
Name: Peter Stuckey.vcf
Type: text/directory
Size: 524 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/users/attachments/20050623/56c83b1e/attachment.bin>
-------------- next part --------------



More information about the users mailing list