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

Breaking in while and for is ignored in slice #804

Open
Ellpeck opened this issue May 18, 2024 · 2 comments
Open

Breaking in while and for is ignored in slice #804

Ellpeck opened this issue May 18, 2024 · 2 comments
Labels
abstract interpretation Related to abstract interpretation bug Something isn't working dataflow Related to dataflow extraction

Comments

@Ellpeck
Copy link
Member

Ellpeck commented May 18, 2024

assertSliced(label('Break immediately', [...caps, 'name-normal', ...OperatorDatabase['<-'].capabilities, 'numbers', 'semicolons', 'newlines', 'break', 'unnamed-arguments']),
					shell, `x <- 1
${loop} {
   x <- 2;
   break
}
print(x)`, ['6@x'], 'x <- 2\nx')

with loop set to while(TRUE) or for(i in 1:100) slices incorrectly

#800

@Ellpeck Ellpeck added bug Something isn't working static slicing Related to slicing the source code statically labels May 18, 2024
@Ellpeck
Copy link
Member Author

Ellpeck commented May 18, 2024

Also true for related tests, see 31727a8

@EagleoutIce
Copy link
Member

For now, we assume this to be correct as we do not have to be smart enough to detect, that the loop is always executed only once. This is up to abstract interpretation to figure out.

@EagleoutIce EagleoutIce added dataflow Related to dataflow extraction abstract interpretation Related to abstract interpretation and removed static slicing Related to slicing the source code statically labels May 18, 2024
@EagleoutIce EagleoutIce removed their assignment May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abstract interpretation Related to abstract interpretation bug Something isn't working dataflow Related to dataflow extraction
Projects
None yet
Development

No branches or pull requests

2 participants