Does K have a notion of global state that rules can access?
e.g.
Say a configuration C => C'
. I want to transition iff C'
doesn't exist in a set of explored states, and then update the global set of explored states by adding C'
to it.
I'm trying to explore all reachable states of a program non-deterministically (using the --search option). However, each path explored is independent, which means each path would not be aware of configurations seen in the other paths if I were to pass the explored set in the configuration itself.
If there's no global state, what's the best practice for this kind of behaviour? Is there a way to non-deterministically explore transitions within some bigger environment that each independent path is able to access?
` cell lets you control which rules to try and in what order, and what to do when the semantics gets stuck, which lets us emulate the branching `--search` execution with a single line of execution which stores and restores states as needed. Honestly though, I would _not_ recommend this approach, it is very tricky to get right. Better to have native backend support for state folding.– ehildenb May 20 '20 at 07:37