[m-rev.] For review: change the way we handle inst any non-locals in negated contexts (again)

Ian MacLarty maclarty at cs.mu.OZ.AU
Thu Dec 15 20:26:12 AEDT 2005


On Thu, Dec 15, 2005 at 04:06:54PM +1100, Mark Brown wrote:

> + at item @code{infer_purity @var{Goal}}
> +Introduces a scope within which the purity of all goals is inferred
> +by the compiler.  

I don't like this sentence.  It seems to suggest that the compiler
doesn't infer the purity of goals not in an infer_purity scope (which it
must in order to prove the code is pure).

>  @table @dfn
>  @item pure
> -For pure procedures, the set of solutions depends only on the
> -values of the input arguments.
> -They do not interact with the ``real'' world (i.e., do any
> -input/output) without taking an io.state (@pxref{Types}) as input and
> -returning one as output, and do not change the value of any data
> -structure that will not be undone on backtracking (unless the data
> -structure would be unreachable on backtracking).  Note that equality
> -axioms are important when considering the value of data structures.
> +For pure predicates and functions, there must exist a declarative semantics
> +(that is, a set of ground solutions) which, given the bindings of
> +arguments when called, fully determines all possible bindings at exit.
> +All pure functions must be referentially transparent in the sense that
> +any two expressions which are syntactically equal must be semantically
> +equal.
> +

Can you leave the sentence "For pure procedures, the set of solutions
depends only on the values of the input arguments." in?  In my (humble)
opinion it's easier to understand than what you've replaced it with.

Ian.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list