Improve initial states generation#58
Open
merkste wants to merge 35 commits intoprismmodelchecker:masterfrom
Open
Improve initial states generation#58merkste wants to merge 35 commits intoprismmodelchecker:masterfrom
merkste wants to merge 35 commits intoprismmodelchecker:masterfrom
Conversation
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
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.
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.