[m-rev.] for review: --inform-incomplete-switch

Zoltan Somogyi zoltan.somogyi at runbox.com
Sun Jan 22 12:04:51 AEDT 2017


On Mon, 16 Jan 2017 17:41:27 +1100 (AEDT), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> I have implemented a first draft of the option proposed by Julien.
> The resulting messages (stage2/*/*.err) are attached.
> 
> I think we need to think about limiting the messages somehow.
> If a switch unifies X with (say) three function symbols of its type,
> but not with the other 97 function symbols in its type, then I think
> 
> - either we should not list all the 97 other function symbols in the message, or
> - we should not generate a message in the first place.
> 
> We should probably have a maximum number of function symbols
> we should print in one message (say ten, with the number being
> configurable).
> 
> We could also have a second configurable threshold: we generate a message
> for an incomplete switch only if that switch mentions at least x% of the
> function symbols the switched-on var could be bound to at the start of the
> switch. (For most switches, this will be the number of function symbols
> in the type of the switched-on variable, but it could be restricted further
> by the initial inst of the variable.)
> 
> There may also be other circumstances in which we may not want
> to print a message about an incomplete switch, but I plan to look for those
> only after fixing the above.
> 
> About the messages themselves: I am pretty sure we should omit
> the module qualifiers from the names of the function symbols,
> but I am in two minds about whether we should force the messages
> to print each function symbol on a line of its own.

I have now implemented both improvements above, minus the configurability
of the "how many cons_ids to print maximum", and the diff is ready for
review, by anyone, though Julien is the logical reviewer.

The two INCOMPLETE* files attached show the messages we get with the
threshold set at 50 and 60% respectively. These, and printing a maximum of
10 cons_ids per message, have cut down the total size of the messages
a lot.

Zoltan.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.iis
Type: application/octet-stream
Size: 2057 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20170122/24ac3a39/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.iis
Type: application/octet-stream
Size: 55603 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20170122/24ac3a39/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: INCOMPLETE6.50
Type: application/octet-stream
Size: 42322 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20170122/24ac3a39/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: INCOMPLETE7.60
Type: application/octet-stream
Size: 21076 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20170122/24ac3a39/attachment-0007.obj>


More information about the reviews mailing list