Dat3M icon indicating copy to clipboard operation
Dat3M copied to clipboard

Issues with Duplicated Labels

Open ThomasHaas opened this issue 2 years ago • 0 comments

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.

ThomasHaas avatar May 26 '22 07:05 ThomasHaas