Re: Invertible nondeterminism?

From: Sergio Antoy <antoy_at_cs.pdx.edu>
Date: Thu, 16 Dec 2010 11:45:10 -0800

All right. I think I am getting it, and it is an interesting and
elegant idea. Can the following be a less contrived example?

Suppose a robot moves in an integer plane stepping 1 unit along
either axis direction, but is not allowed to step on the origin.
Could you define a move as

   move (x,y) = (x-1,y)
              ? (x+1,y)
              ? (x,y-1)
              ? (x,y+1)
              ? anti (0,0)

This could be better than some other coding alternatives, except
maybe the constrained constructor pattern.

However, there may be a drawback from an implementation
standpoint. Evaluating choices is already expensive. With the
new meaning, it would become even more expensive.

With the traditional meaning, any solution, say s, of x in x?y can
be immediately used, e.g., output. With the new meaning, before
using s, one should compute all the solution of x and y, to make
sure that an anti s is not found.

Sergio
_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Fr Dez 17 2010 - 11:10:17 CET

This archive was generated by hypermail 2.3.0 : Do Feb 01 2024 - 07:15:09 CET