Skip to content
Commit 523c3112 authored by Carlos Galindo's avatar Carlos Galindo
Browse files

OnePassConstrainedAlg: fix two bugs (loop detection and traversed edges)

- Bug 1: if a loop was detected, but it wasn't an increasing loop, no NodeWork was generated (step 4). In the case of balanced loops (and some decreasing loops), this may lead to incorrect results.
- Bug 2: inclusion in traversedEdges was conditional on edge type, but it should be based on Constraint type, as that is what determines the PDA analysis' result. Now it doesn't include edges with ignored edge constraints. Previously, this behaviour excluded Summary edges with ListComprehensionConstraints (generated as external in SummaryEdgeGenerator#buildListsNthSummaries).
- Other changes:
  1. Shortened try-catch looking for StackOverflow
  2. Extracted loop detection from for-loop, adding a check to avoid loop detection if newConstraintsList is empty.
  3. Moved traversedEdges update logic to PDA, as it is closely linked to PDA#isIncreasingLoop.
  4. Reformatted file (whitespace and indentation).
parent e13622c1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment