[m-dev.] Resources example

Peter Schachte schachte at cs.mu.OZ.AU
Thu Apr 28 10:04:56 AEST 2005

On Wed, Apr 27, 2005 at 05:56:39PM +1000, Zoltan Somogyi wrote:
> On 27-Apr-2005, Peter Schachte <schachte at cs.mu.OZ.AU> wrote:
> > Here's a reconceptualization of solvers.  Almost all ordinary Mercury
> > predicates cannot be interpreted without using and/or modifying global
> > state:  ie, the heap.
> I haven't had time to really think about the rest of your proposal,
> being too busy with papers, but the above is a gross mischaracterization,
> because terms on the heap are used in a fully referentially transparent
> manner.

True, because the Mercury compiler ensures it.  I asume you're
contrasting that to a user-written solver type that uses the facility
we're discussing.  The built-in solver is written using all sorts of
nasty imperative features that modify the solver state (heap), just as
the user-written solver will be.  Certainly solvers written using the
current solver type system also use impurity to get their job done.
The real distinction here is between Mercury's built-in Herbrand term
equality solver, if you'll permit me to call it that, and a
user-written solver.  The other important distinction is that the
built-in solver (currently) supports only free and ground
instantiations, and a solver would support more.

Peter Schachte              The government of the United States is not, in any
schachte at cs.mu.OZ.AU        sense, founded on the Christian religion.
www.cs.mu.oz.au/~schachte/      -- George Washington, 1796 
Phone: +61 3 8344 1338      
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au

More information about the developers mailing list