Skip to content

C#: Apply static CFG splitting limit#1673

Merged
calumgrant merged 1 commit intogithub:masterfrom
hvitved:csharp/cfg/split-static-limit
Aug 15, 2019
Merged

C#: Apply static CFG splitting limit#1673
calumgrant merged 1 commit intogithub:masterfrom
hvitved:csharp/cfg/split-static-limit

Conversation

@hvitved
Copy link
Contributor

@hvitved hvitved commented Aug 1, 2019

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$.

Profiling report here (internal link).

@hvitved hvitved force-pushed the csharp/cfg/split-static-limit branch 4 times, most recently from 6b991c9 to f967dff Compare August 2, 2019 19:57
@lcartey lcartey added the C# label Aug 3, 2019
@hvitved hvitved force-pushed the csharp/cfg/split-static-limit branch from f967dff to a189343 Compare August 6, 2019 09:35
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$`.
@hvitved hvitved force-pushed the csharp/cfg/split-static-limit branch from a189343 to 4774bc9 Compare August 6, 2019 09:38
@hvitved hvitved marked this pull request as ready for review August 7, 2019 18:16
@hvitved hvitved requested a review from a team as a code owner August 7, 2019 18:16
@hvitved hvitved requested a review from calumgrant August 7, 2019 18:16
Copy link
Contributor

@calumgrant calumgrant left a comment

Choose a reason for hiding this comment

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

Overall LGTM, a few small questions.

@calumgrant calumgrant merged commit 3fab514 into github:master Aug 15, 2019
@hvitved hvitved deleted the csharp/cfg/split-static-limit branch August 15, 2019 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants