[m-dev.] more correctness problems

Peter Stuckey pjs at cs.mu.OZ.AU
Mon Apr 3 08:59:39 AEST 2006


> I don't know if this is possible, but it would be nice to have a mode
> which meant that the argument was input only, even though it was of  
> inst
> any. Currently we have oa which means that this any inst argument is  
> only
> an output (it starts free), but ia means the argument is both input and
> output. There's no way to say that an argument has inst any before and
> after the call, but after the call it still has the same partial
> instantiation, ie it has only been used as an input and hasn't been
> constrained further.
>
> If there was such a mode (and again I don't know if it's possible for  
> the
> compiler to check such a thing), then predicates using this mode would  
> be
> safe inside a negated context, while those using the in-and-out ia mode
> would not.
>

We thought about a mode
	same(old)
in HAL terminology
which meant exactly that.

The problem is to check that it holds is almost impossible.
It could be useful for checking the cases like
	member(out(any), in(list(any))
where the mode analsys should be able to tell that nothing changes.
But a better solution to this is
	member(out(I), in(list(I))  I <= any
where it is clear that the any doesnt get instantiated,  To support this
we have to improve the mode analysis for mode variables.


> Kathryn
>
>> -- 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
>> ---------------------------------------------------------------------- 
>> ----
>>
> ----------------------------------------------------------------------- 
> ---
> 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
> ----------------------------------------------------------------------- 
> ---
>
>
------------------------------------------------------------------------ 
--------------------------
Peter Stuckey					
Professor of Comp Sci and Soft Eng
Network Information Processing Program NICTA	
University of Melbourne
www.cs.mu.oz.au/~pjs

National ICT Australia Limited
Locked Bag 9013
Alexandria NSW 1435
Tel. +61 3 8344 1341
Fax. +61 3 9348 1184
Email. peter.stuckey at nicta.com.au
Web. www.nicta.com.au
 
The imagination driving Australia's ICT future.
 
To receive the latest NICTA information register at  
http://nicta.com.au/registration.cfm
 


--------------------------------------------------------------------------
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