[m-dev.] Type info convention

Nancy Mazur Nancy.Mazur at cs.kuleuven.ac.be
Mon Nov 20 23:32:24 AEDT 2000


> > However Nancys structure reuse declarations require that we know the
> > variable names for each of the `real' arguments, so that we can use this
> > name as a key to determine the structure reuse/possible alias
> > information for that argument.
> 
> Why not apply structure reuse/possible alias information for
> all arguments?

The problem is in the interface: 

you generate information about variables, and you make clear
about which variables you can talk. So far so good... so just looking
at this would mean: what do u care, just output all the vars... 
The problem arised when reading in the pragma's: at that moment
you already have created a pred_info for some procedure, and now
you're reading in the alias-pragma. You'll have to rename
the alias-information to the actual headvars used in the pred_info
(or proc_info)... And that's where I need the exact limited list
of real headvars, so that this list, and the list in the proc_info 
match at the moment when reading in the trans_opt files, so that
I can lookup, and update the required info there. 

> > :- pragma pa_alias_info(list:'TypeSpecOf__pred__merge__[T = var(V_2)]'((builtin:in), (builtin:in), (builtin:out)), vars(HeadVar__3, V_17, V_16), yes([pair( cel(HeadVar__3, []) , cel(HeadVar__2, []) ) , pair( cel(HeadVar__3, []) , cel(HeadVar__1, []) ) , pair( cel(HeadVar__1, []) , cel(HeadVar__2, []) ) ])).
> > 
> > 
> > As you can see from the above declaration, we think that the real
> > arguments are vars(HeadVar__3, V_17, V_16) yet we refer the HeadVar__1
> > and HeadVar__2 in the possible alias information.
> 
> I still don't understand why you care which arguments are "hidden"
> and which are "real", or even what criteria you would use to decide
> which is which.

I don't care about the hidden... I just want the real ones... the
ones with which the predicate has been declared and appears in 
interface-files (and not having arity problems and such.. ).. 

Nancy

PS:
> It might help if you explained the intended semantics of the
> `pa_alias_info' pragmas.

pragma: pa_alias_info: 
	contains:  * the name (and mode) of the predicate
		   * the list of variables matching the declared
		     interface of the predicate (this list also
		     establishes the order.. so if you've got:
			vars(VarX, VarY)
		     Then VarX will be seen as the first headvariable
		     of the predicate, VarY the second and last.
		   * given that list of variables, express the
		     aliases in their terms
--------------------------------------------------------------------------
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