[m-dev.] syntax for pre and post conditions

Peter Schachte schachte at cs.mu.OZ.AU
Tue Jan 25 14:30:01 AEDT 2000


> Thinking some more, it seems one can get the best of all worlds by rewriting 
> the condition:
> 
> :- check zip(A,B,C) => (length(A) = L, length(B) = L, length(C) = L).
> 
> Maybe you can do something like this all the time?  I don't know.

I think so.  You should be able to just list all the conditions that
must hold for this predicate to make sense, using redundancy if
necessary, and then mode analysis should be able to tell you which
and be tested before execution and which must be tested on completion.

-- 
Peter Schachte                     It isn't pollution that's harming the
mailto:schachte at cs.mu.OZ.AU        environment. It's the impurities in our
http://www.cs.mu.oz.au/~schachte/  air and water that are doing it.
PGP: finger schachte at 128.250.37.3      -- Vice President Dan Quayle 
--------------------------------------------------------------------------
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