[m-rev.] For review: new constraint based mode analysis
Ralph Becket
rafe at cs.mu.OZ.AU
Wed Feb 9 13:57:53 AEDT 2005
Richard James FOTHERGILL, Wednesday, 9 February 2005:
> On Tue, 8 Feb 2005, David Overton wrote:
> >
> >There's something wrong with your line wrapping here.
>
> So it would seem. My compose window wraps at 80 characters. Somewhere past
> sending it it's been mangled. I'll make sure 80's ok for the log, or else
> change it.
No, 79 cols is the *maximum* (unified CVS diffs add a char), and you
would do well to stick to 72 for documentation. You can do this easily
for documentation in Vim with `:set textwidth=72', then use `V' to
visually highlight what is to be reformatted, then use `gq' to
automatically reformat.
> I'll see what I can do with the comments. Use of 'conj' not as a child
> of disj is permitted - even reccomended in the general sense. I was
> refering to the fact that, when it comes to mode constraints, I've
> omitted the conj constructor at the top level, and just used the
> constraint formulae type. Probably I should just remove that part of
> this comment - while 'conj' was only included because it was needed
> for use as a child of 'disj', I suppose there's no reason to say so.
Yes! We only need to know about genuine constraints and invariants.
> >>), % XXX type_info args should be at the start and +
> >>% should be 'in' so that is what this predicate adds +
> >>% however, I am not happy with it.
> >
> >Why?
>
> I'm not happy with it because it relies on type info args being added
> in the same manner indefinitely, and on no other arguments being
> added, or else whoever makes changes magically finding this predicate
> to change it accordingly. Also, someone made a passing comment to me
> that the mode of type info args might not always be strictly 'in'
> (although presumably it would always be a close variant of it).
> Basically, I don't think I should be adding the arg mode info for the
> type info arguments myself - I feel like I should be using information
> that is added wherever the extra arguments are added. I used the maybe
> declared argmodes field to make sure that the predicate actually had
> modes declared. Its possible that the actual headmodes field has the
> information I need. I didn't use it originally because I thought it
> must be a field that gets filled in by mode analysis.
Agreed. I think the polymorphism pass responsible for adding the extra
args should also update the argument mode records.
-- Ralph
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list