Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add example test for fixpoint iteration #570

Closed
wants to merge 3 commits into from

Conversation

carljm
Copy link
Contributor

@carljm carljm commented Aug 28, 2024

Add a test with a simplified example case where fixpoint iteration is needed in dataflow analysis.

Inputs are Definition, Use, and Literal (to simplify the example, we exclude parsing and just take the data flow structure as input) modeling a simple language with only the following constructs:

  • Literal integers and strings.
  • Assignments, which are always in the form x = y + <literal> or x = <literal>.
  • Branches (implicitly, because a use can have multiple reaching definitions.)
  • Loops (implicitly, because a use can have a reaching definition which is the definition the use itself occurs within.)

The added tests simple and union pass; the tests cycle_converges, cycle_diverges, and multi_symbol_cycle_converges hit a Salsa cycle and fail.

The initial goal of the fixpoint iteration feature (IMO) should be to make these tests pass (not exactly as-is; presumably some cycle-handling code will need to be added in some form, but exactly what that feature should look like is what we need to determine.)

@carljm carljm requested a review from nikomatsakis August 28, 2024 22:24
Copy link

netlify bot commented Aug 28, 2024

Deploy Preview for salsa-rs canceled.

Name Link
🔨 Latest commit 167af0b
🔍 Latest deploy log https://app.netlify.com/sites/salsa-rs/deploys/67059dc4f8307300089cfcd0

Copy link

codspeed-hq bot commented Aug 28, 2024

CodSpeed Performance Report

Merging #570 will not alter performance

Comparing carljm:cycle-test (167af0b) with master (a20b894)

Summary

✅ 8 untouched benchmarks

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.

1 participant