Dat3M
Dat3M copied to clipboard
Issues with Duplicated Labels
Code that contains multiple labels with the same name causes various problems:
- The parsing generates bogus code if the same label name is used in different threads. This should not be a problem in principle.
- If the same thread contains duplicate labels, the parser generates programs with cyclic
getSuccessor
-relation and runs into an infinite loop trying to find the exit event.
The underlying issues are
- The
ProgramBuilder
tracks labels globally instead of per thread (causing issue 1). - The method
getOrCreateLabel
is used throughout. This causes creation of labels in cases where none should get created and retrieval of existing labels when new ones should get created.