Re: residuation for compositional search?

From: Antonio Regidor García <a_regidor_at_yahoo.es>
Date: Tue, 14 Jun 2011 07:32:28 +0100 (BST)

> Hello,
>
> assume I want to write a function that
> nondeterministically yields a
> partition of its input list where a partition of
> a list `l` is defined as a
> list `p` that satisfies the following properties:
>
> concat p = l
> all (not . null) p = True
>
> If I define this in Curry either as
>
> partition l | concat p =:= l & all (not .
> null) p =:= True = p
> where p free
>
> or as
>
> partition l | all (not . null) p =:= True &
> concat p =:= l = p
> where p free
>
> then `partition` fails to terminate at least when
> querying for all
> solutions.

Both examples work ok in MCC (at least in the repository version).

Greetings

Antonio Regidor García

_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Di Jun 14 2011 - 09:13:12 CEST

This archive was generated by hypermail 2.3.0 : Do Jun 20 2024 - 07:15:11 CEST