[m-dev.] arrays
Ralph Becket
rafe at cs.mu.OZ.AU
Sun Aug 1 22:51:24 AEST 2004
Ian MacLarty, Sunday, 1 August 2004:
>
> Sure, you'd have to pass a state pair to array__lookup, even though the
> array isn't changing, but with state variable notation I don't see this
> as much of an issue.
It is if you want to code in a functional style where it is natural to
do so.
> And of course you wouldn't be able to backtrack
> over arrays, but you can't do that now anyway (can you?).
No, although extras/trailed_update/tr_array.m does the trick.
> It'd be nice to know the compiler is checking that you're not using
> arrays incorrectly - which is not the case at the moment as I
> understand it.
Correct, but the solution is to fix mode analysis. Zoltan and I want to
redo that part of the compiler to use a constraint directed approach
rather than the current abstract interpretation approach. Our
expectation is that extending a constraint based algorithm to handle
uniqueness etc. will be easier and, hopefully, not significantly slower
(indeed, if it turns out to be anything like type checking, there's
evidence it could go much faster...)
-- Ralph
--------------------------------------------------------------------------
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