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

Testing and fixing CEI pattern analysis (follow up for #3168) #3356

Merged
merged 10 commits into from
Nov 16, 2022

Conversation

anton-trunov
Copy link
Contributor

@anton-trunov anton-trunov commented Nov 13, 2022

Test cases

  • if with interaction in the condition and storage in a branch
  • match with interaction in the condition and storage in branches
  • Pair or struct with interaction in one component and storage in a subsequent component

while-loops tests

  • while loop with effects in the condition or the body
  • while loop with interaction-then-storage
  • while loop with storage-then-interaction (this is a violation too because on the next loop iteration it will be interaction-then-storage) -- this requires a fix implemented in this PR

Function application tests

  • Pure function + argument is a codeblock with CEI violation
  • Pure function + first argument does interaction + second argument does storage effect
  • Storage reading/writing function + argument does interaction
  • Improved error reporting precision for function application
  • Left-to-right arguments evaluation

Closes #3342

@anton-trunov anton-trunov requested a review from a team November 13, 2022 16:20
@anton-trunov anton-trunov self-assigned this Nov 13, 2022
@anton-trunov anton-trunov added compiler: static-analysis testing General testing compiler: ui Mostly compiler messages labels Nov 13, 2022
@anton-trunov anton-trunov mentioned this pull request Nov 13, 2022
17 tasks
@otrho otrho requested a review from a team November 14, 2022 20:06
@anton-trunov anton-trunov merged commit 88b4cc5 into master Nov 16, 2022
@anton-trunov anton-trunov deleted the anton-trunov/cei-analysis-testing branch November 16, 2022 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler: static-analysis compiler: ui Mostly compiler messages testing General testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testing follow up for #3168 (CEI pattern analysis)
3 participants