This issue tracker is closed. Please visit UPPAAL issue tracker at Github instead.

Bug 134 - A better error message is needed for name clashes
Summary: A better error message is needed for name clashes
Status: RESOLVED FIXED
Alias: None
Product: UPPAAL
Classification: Unclassified
Component: Engine (show other bugs)
Version: 3.5.7
Hardware: PC All
: P1 minor
Assignee: Gerd Behrmann
URL: http://www.cs.aau.dk/~ulrikl/uppaal/n...
Depends on:
Blocks:
 
Reported: 2005-03-15 09:57 CET by Ulrik Nyman
Modified: 2005-12-02 18:11 CET (History)
0 users

See Also:
Architecture:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrik Nyman 2005-03-15 09:57:55 CET
When for instance an integer variable and a location are given the same name, as
in the example model that is attached, then this produces no error message. When
one then tries to reference the integer variable in a guard, then the error
message reads: Identifier of this type cannot be referenced in an expression.

If the user thinks that this refers to the integer variable then the error can
be hard to understand and correct.

The prefered solution would be to come up with an error message initially for
the naming conflict.
Comment 1 Gerd Behrmann 2005-03-21 21:35:49 CET
I agree that the error message is misleading (although correct). However, notice
that it is perfectly legal for a location to have the same name as a global
variable (as the location is defined in a nested scope).

A better solution is to change the error message produced when refering to the
location to: "Locations cannot be referenced at this point.".
Comment 2 Gerd Behrmann 2005-03-30 17:33:37 CEST
I will fix this in the 3.5 code base. Eventually, we will backport the fix to 3.4.
Comment 3 Gerd Behrmann 2005-06-29 21:15:16 CEST
Moved bug to 3.5.7, as 3.4 is a stable release series and fixing a minor bug is not worth the risk.
Comment 4 Gerd Behrmann 2005-12-02 18:11:09 CET
The error messages for invariants and guards have now been changed to include the type of the 
expression.