Skip to content

Fix path to xdot SDFG#5

Merged
tbennun merged 2 commits into
spcl:masterfrom
and-ivanov:andrei_bugfix
Nov 5, 2019
Merged

Fix path to xdot SDFG#5
tbennun merged 2 commits into
spcl:masterfrom
and-ivanov:andrei_bugfix

Conversation

@and-ivanov
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Collaborator

@tbennun tbennun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tbennun tbennun merged commit 6483578 into spcl:master Nov 5, 2019
ThrudPrimrose added a commit that referenced this pull request May 21, 2026
…ening + termination cap

Three correctness fixes to SymbolPropagation, surfaced by adversarial tests:

1. Same-edge race (#5): _update_syms substituted a propagated value into an
   outgoing edge's assignment RHS without checking the edge's own assignment
   keys. Interstate-edge assignments are simultaneous, so substituting e.g.
   `anext -> a + b` into `{b: a, a: anext}` produced `{b: a, a: a + b}` -- `a`
   both read and written on one edge, which validation rejects. Now each edge
   filters out substitutions whose value reads a symbol assigned on that edge.

2. Cross-CFG assert crash (#1): _get_in_syms `assert new_in_syms == {}` crashed
   on start/branch regions that already carried edge-accumulated symbols.
   Replaced with a conservative combine (disagreements -> None).

3. Fixpoint non-termination: the inner _update_syms `while changed` loop
   oscillated forever on CYCLIC symbol value dependencies (swaps). Added an
   iteration cap (#symbols + 2) guaranteeing termination, leaving cyclic
   symbols un-substituted (conservative + correct).

Tests (tests/passes/symbol_propagation_hard_test.py): 21 original (incl. the
co-evolving-pair regression, input fixed to a valid simultaneous edge) + 14
adversarial (10 pass). 4 cyclic-swap tests are strict-xfail pinning a remaining
deeper bug: the pass over-substitutes a reassigned symbol's value into use-sites
on value cycles. Existing tests/passes/symbol_propagation_test.py stays green.
ThrudPrimrose added a commit that referenced this pull request May 31, 2026
…ening + termination cap

Three correctness fixes to SymbolPropagation, surfaced by adversarial tests:

1. Same-edge race (#5): _update_syms substituted a propagated value into an
   outgoing edge's assignment RHS without checking the edge's own assignment
   keys. Interstate-edge assignments are simultaneous, so substituting e.g.
   `anext -> a + b` into `{b: a, a: anext}` produced `{b: a, a: a + b}` -- `a`
   both read and written on one edge, which validation rejects. Now each edge
   filters out substitutions whose value reads a symbol assigned on that edge.

2. Cross-CFG assert crash (#1): _get_in_syms `assert new_in_syms == {}` crashed
   on start/branch regions that already carried edge-accumulated symbols.
   Replaced with a conservative combine (disagreements -> None).

3. Fixpoint non-termination: the inner _update_syms `while changed` loop
   oscillated forever on CYCLIC symbol value dependencies (swaps). Added an
   iteration cap (#symbols + 2) guaranteeing termination, leaving cyclic
   symbols un-substituted (conservative + correct).

Tests (tests/passes/symbol_propagation_hard_test.py): 21 original (incl. the
co-evolving-pair regression, input fixed to a valid simultaneous edge) + 14
adversarial (10 pass). 4 cyclic-swap tests are strict-xfail pinning a remaining
deeper bug: the pass over-substitutes a reassigned symbol's value into use-sites
on value cycles. Existing tests/passes/symbol_propagation_test.py stays green.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants