Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-3551

Implement helper to find whether state in regex automaton is reachable without consuming input

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.10
    • Component/s: Rules
    • Labels:

      Description

      Since multiple rules require finding whether a state can reach another state without consuming input, there should be a common helper to accomplish this. This method should perform a simple DFS that only traverses epsilon edges.

      We could also calculate the length of the shortest path and check that it's zero, but this is simpler and more efficient.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sebastian.hungerecker Sebastian Hungerecker
                Reporter:
                sebastian.hungerecker Sebastian Hungerecker
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: