C#: Apply static CFG splitting limit#1673
Merged
calumgrant merged 1 commit intogithub:masterfrom Aug 15, 2019
Merged
Conversation
6b991c9 to
f967dff
Compare
f967dff to
a189343
Compare
The predicate `maxSplits()` was previously applied dynamically to ensure that
any control flow node would keep track of at most `maxSplits()` number of splits.
However, there was no guarantee that two different copies of the same AST element
wouldn't contain different splits, so in general the number of copies for a given
AST element `e` could be on the order `$\binom{n}{k}c^k$`, where `n` is the total
number of splits that apply to `e`, `k = maxSplits()`, and `c` is a constant.
With this change, the relevant splits for `e` are instead computed statically,
meaning that the order is instead `$c^k$`.
a189343 to
4774bc9
Compare
calumgrant
reviewed
Aug 13, 2019
Contributor
calumgrant
left a comment
There was a problem hiding this comment.
Overall LGTM, a few small questions.
calumgrant
approved these changes
Aug 15, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The predicate
maxSplits()was previously applied dynamically to ensure thatany control flow node would keep track of at most
maxSplits()number of splits.However, there was no guarantee that two different copies of the same AST element
wouldn't contain different splits, so in general the number of copies for a given
AST element
ecould be on the order$\binom{n}{k}c^k$, wherenis the totalnumber of splits that apply to
e,k = maxSplits(), andcis a constant.With this change, the relevant splits for
eare instead computed statically,meaning that the order is instead
$c^k$.Profiling report here (internal link).