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

Dominator analysis needs more testing #10

Open
cd1m0 opened this issue Nov 20, 2023 · 0 comments
Open

Dominator analysis needs more testing #10

cd1m0 opened this issue Nov 20, 2023 · 0 comments

Comments

@cd1m0
Copy link
Collaborator

cd1m0 commented Nov 20, 2023

Add more samples for the dominate and dominateStmt relations in the analysis.spec.ts test. The samples should carefully test the exact ordering of operations in specific edge cases. Specifically pay attention to the following edge cases:

  • ordering along modifier invocation
  • constructors with a mixture of base invocations and modifier invocations
  • ordering of binary operations (something like (uint x = (y = y + 2) - (y = y + 3)). Which branch executes first? Is it always the same for all binary operators or does it vary?
  • What is the order of evalation of function agruments? (something like foo(y = y *2, y++, y += x)). Are they evaluated left to right or right to left?
  • Does the callee expresion of a function call get evaluated before or after the arguments? (e.g. something like foo { val : y += 1 }(y))
  • Does the base expression or index expression of a index access get evaluated first? . This is trickier to test. Perhaps something like: a[a.push(idx)]?
  • Same question for IndexRangeAccess
  • In FunctionCallOption, does the base expression get evaluated first, or the options? Again, this is tricier to test. Maybe something along the lines of a{gas: y++}{value: y++}()?
  • What is the order of evaluation for tuple expressions? Something like (uint x, uint y, uint z) = (t++, t++, t++);
@cd1m0 cd1m0 mentioned this issue Nov 20, 2023
Merged
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

No branches or pull requests

1 participant