[m-dev.] trace goal `state' parameters

Ondrej Bojar bojar at csse.unimelb.edu.au
Mon Mar 26 17:03:34 AEST 2007


If possible, please allow the introduction of new state vars right in the trace 
parameters:

Julien Fischer wrote:
 > A possible extensions to trace goal syntax would be to push the
 > existential quantification used to introduce the state variable into
 > the parameter list, e.g.
 >
 >     trace [some(!M)] (
 >         ...
 >     )


Thanks, Ondrej.


Julien Fischer wrote:
> 
> On Fri, 16 Mar 2007, Julien Fischer wrote:
> 
>> In fact state parameters aren't really as useful as they might seem since
>> they are implicitly subject to the same visibility restrictions that
>> mutables are.  For mutables these restrictions are what we want** but it
>> doesn't really make sense for state parameters.  The logging example 
>> in the
>> reference manual is a case in point; I would like to be able to refer 
>> to the
>> logging level in many modules - it is truly global, however mutables are
>> (intentionally) module local.  Currently the only way to "export" a 
>> mutable
>> it to manually introduce access predicates for it in the interface of a
>> module.  (This won't work with trace goals since the transformation that
>> handles state parameters knows nothing of the manually introduced
>> predicates.)
>>
> 
> ...
> 
>> My choice would be to remove support for state parameters.
> 
> Unless there are any objections in the next few days I will go
> ahead are remove support for state parameters.
> 
> Julien.
> --------------------------------------------------------------------------
> mercury-developers mailing list
> Post messages to:       mercury-developers at csse.unimelb.edu.au
> Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
> Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
> --------------------------------------------------------------------------

-- 
Ondrej Bojar (mailto:obo at cuni.cz / bojar at ufal.mff.cuni.cz)
http://www.cuni.cz/~obo
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list