Mercury Bugs - mercury
View Issue Details
0000448mercuryBugpublic2018-02-07 05:302018-02-07 05:30
Reporterzs 
Assigned Tozs 
PrioritynormalSeverityminorReproducibilityalways
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000448: singleton warning generation ignores variables in quantifications
DescriptionThe problem is that quantification replaces the list of variables being quantified
by a scope, ostensibly because that information is not needed by later compiler
passes. However, it *is* needed by the code that generates warnings for singleton
predicates.

As it is, we get bad singleton warnings for code such as

    some [X] ( ... X ... )

and may NOT get singleton warnings for code such as

    some [X] ( ... code in which there is no variable named X ... )
Steps To ReproduceThe two halves of the problem are demonstrated by the test cases
valid/bad_singleton_warning.m and warnings/missing_singleton_warning.m,
which I just added to the repository.
Additional InformationSimply keeping the quantified variables in place causes problems for later passes;
it is such code in these later passes that are the actual bugs.
TagsNo tags attached.
Attached Files

There are no notes attached to this issue.

Issue History
2018-02-07 05:30zsNew Issue
2018-02-07 05:30zsStatusnew => assigned
2018-02-07 05:30zsAssigned To => zs