Skip to content

Conversation

@merkste
Copy link
Contributor

@merkste merkste commented Mar 3, 2018

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 ... endinit statement before doing the product of the variable domains.

@merkste merkste force-pushed the improve-initial-states-generation branch 7 times, most recently from a4e554d to fa52dfc Compare March 7, 2018 11:18
@merkste
Copy link
Contributor Author

merkste commented Mar 7, 2018

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.

@merkste merkste force-pushed the improve-initial-states-generation branch 3 times, most recently from f51e087 to 445e48d Compare March 9, 2018 10:20
@merkste merkste force-pushed the improve-initial-states-generation branch from 445e48d to 7547304 Compare May 22, 2019 08:23
@merkste merkste force-pushed the improve-initial-states-generation branch 2 times, most recently from 327c379 to 9b8434b Compare September 10, 2021 10:55
@merkste merkste force-pushed the improve-initial-states-generation branch from 9b8434b to aaaa8b9 Compare September 10, 2021 12:44
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.
@merkste merkste force-pushed the improve-initial-states-generation branch from aaaa8b9 to 279e213 Compare September 10, 2021 12:56
@davexparker davexparker force-pushed the master branch 2 times, most recently from ca12ca0 to 6bf73df Compare January 12, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant