-
Notifications
You must be signed in to change notification settings - Fork 78
Improve initial states generation #58
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
Open
merkste
wants to merge
35
commits into
prismmodelchecker:master
Choose a base branch
from
merkste:improve-initial-states-generation
base: master
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.
Open
Improve initial states generation #58
merkste
wants to merge
35
commits into
prismmodelchecker:master
from
merkste:improve-initial-states-generation
Conversation
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
a4e554d to
fa52dfc
Compare
Contributor
Author
|
I've just updated the #PR. Previously we instantiated a new Object[], a new State and a new EvaluationContext for each possible state to be tested. Now we reuse this data structures in order to prevent excessive memory-allocation and gc-ing. |
f51e087 to
445e48d
Compare
445e48d to
7547304
Compare
327c379 to
9b8434b
Compare
* Implement missing standard methods: - PairPredicateInt#negate - Obj*Function#andThen * Add missing comments to functional interfaces
9b8434b to
aaaa8b9
Compare
The explicit engine explores multiple initial states by explicitly building generating a list of all possible states. Actually building the list is very slow and runs out of memory easily. This solution iterates over the cartesion product of the variable domains. It introduces a deciated iterable for the product which generates tuples on the fly. Please note that it requires #flatMap from FunctionalIterator instead of Stream. The latter is broken in the sense that it preallocates memory for the whole result. Thus, we would run out of memory as well.
aaaa8b9 to
279e213
Compare
ca12ca0 to
6bf73df
Compare
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.
As stated in #2, the explicit engine explores multiple initial states by explicitly building generating a list of all possible states. Actually building the list is very slow and runs out of memory easily.
This PR improves the situation by iterating and filtering the set of possible states on the fly instead of building a list. It lays the foundation for further improvements such as analyzing the
init ... endinitstatement before doing the product of the variable domains.