-
Notifications
You must be signed in to change notification settings - Fork 12
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
DFA: two phase DFA #4967
Draft
fridis
wants to merge
78
commits into
main
Choose a base branch
from
dfa_optimizations_mayHave
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
DFA: two phase DFA #4967
Conversation
This file contains 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
- For certain clazzes, do not create ValueSet but, in case of a set, use one global set for all sets. - For cetain clazzes, do not create separate Instances depending on context, but create only one single instance - Do not create ValueSets of RefValue of the same clazz, but instead create RefValue of ValueSet, i.e., instead of {boxed(v1), boxed(v2)} create boxed({v1,v2}) All these can be enabled by static fields in DFA static boolean ONLY_ONE_VALUE_SET = false; static boolean ONLY_ONE_INSTANCE = false; static boolean NO_SET_OF_REFS = false;
_universe is used only to hold fields of the universe.
First time I see HelloWorld <800ms
Many calls used to be created due to many different environments, even if effects form those different environments were never used. For a simle HelloWorld, this redecues the number of calls form 965 to 546. I expect a higher reduction for larger examples.
This currently results in endless runtime of DFA due to changes to `Sequence.concat`.
There are two possible traces at this point.
This should collapse environments that are essentially redundant for the desired call context. One big caveat: Recursive creation and instation of effects requires special handling to avoid endless recursion .
Then, there is no need for `call.adjustThisTypeForTaget`.
Also removed `try / catch` added for debugging.
…type Also enable a previously commented-out test case that did not work due to this.
If a type constraint uses type parameters itself and those are defined by the target of a call, we need to first determine the actual types of the constraints in this call before we can check the validity of the actual type parameters provided by the call. Added a check that `AbstractType.genericsAssignable` does not deal with open type parameters unless in a cotype (which should be fixed later). Also added a reference to #5002 in the correspdonging comment.
…_mayHave_2025-04-03
This simplifies the DFA since now the constructor of `instate_helper` requires all the effects of call called code, so the instance of `instate_helper` automatically gets replicated during DFA for different effect environments.
Also some cleanup.
Having this declared in `container` avoid explosion of `array_cons` instances during DFA due to different outer clazzes.
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.
First phase determines possibly available and possible required effects.
Second phase performs full DFA using the intersection of available and required effects as effect environments.