Saving nets uses variables ids and names

Bug #2052812 reported by Jiri Srba
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TAPAAL
Fix Committed
Undecided
Unassigned

Bug Description

If you make variable x and change its name to y, the variable will have id=Varx but name (the value that should be used) y.

This is confusion. Try to modify the saving of nets (both to PNML as well as .tapn format) so that
it uses the variable name both as id as well as its name. This should fix the issue with displaying wrong bindings for CPNs but should be thoroughly tested.

Revision history for this message
Jiri Srba (srba) wrote :

We need to fix the variable ids and names in the GUI directly. I managed to create a net which returns a wrong answer due to renaming of variables. I made variable x and renamed it to y. Then I made again variable x. Now there were two different variables x and y, but both of them have id "Varx". When this net is passed to the engine, the engine cares about the ids only and considers this to be the same variable, which is wrong (and you can make a query that returns a wrong answer). The fix should be that when making a variable, the id will be the same as its name. If the name later on changes, the id should change as well (and it should be renamed in all arc expressions, guards etc). The export to PNML and .tapn format then does not have to be fixed, as it should work if the id and names are identical.

Revision history for this message
Jiri Srba (srba) wrote :

In fact, if a variable appears in some arc expressions or guards, it is not possible to edit it and change its name, so the fix should be quite easy - the name can be changed only if the variable is not used (this is already implemented) but then simply always set id as the variable name when creating/editing a variable.

Jiri Srba (srba)
Changed in tapaal:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.