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

Greedy-like heuristics for consumeSingleLocation #728

Merged
merged 4 commits into from
Sep 22, 2023

Conversation

marcoeilers
Copy link
Contributor

Heuristic that emulates greedy Silicon behavior for consuming single-receiver permissions for quantified resources.
First: Find singleton chunks that have the same receiver syntactically.
If there are any such chunks, consider those first, then all others.
Second: If nothing matches syntactically, try to find a singleton chunk that matches the receiver using the decider (using the check timeout, like in greedy lookup).
If that's the case, consider that chunk first, then all others.
Third: As a fallback, use the existing hint based heuristics.

This massively speeds up examples like the one @vakaras showed today.

@vakaras
Copy link
Contributor

vakaras commented Jun 6, 2023

Did you have a chance to try it on some larger code like SCION?

@marcoeilers
Copy link
Contributor Author

Yes, does not seem to make a difference unfortunately. Though the benchmarking there is kind of difficult sometimes because parallelism can hide a lot of differences.

@vakaras
Copy link
Contributor

vakaras commented Jun 6, 2023

Yes, does not seem to make a difference unfortunately. Though the benchmarking there is kind of difficult sometimes because parallelism can hide a lot of differences.

As far as I know, Gobra puts resources on Viper heap only if they can be aliased, so they would be already invisible to QPs.

Copy link
Contributor

@vakaras vakaras left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@marcoeilers marcoeilers merged commit b7bc9ba into master Sep 22, 2023
4 checks passed
@marcoeilers marcoeilers deleted the meilers_qp_singleton_greedy_heuristics branch September 22, 2023 12:04
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.

2 participants