page1
1
state_var_t (char/short/int)
2
4
1
2
state_var_t * (“buffer”)
2
4
1
2
SegmentedArrayVector<state_var_t>
3
4
1
2
2
1
1
2
2
4
3
2
2
4
1
3
1
4
1
2
0
1
2
3
4
5
0
StateID (index)
2
4
1
2
3
4
1
2
2
1
1
2
2
4
3
2
2
4
1
3
1
4
1
2
0
1
2
3
4
5
2
4
1
2
0
3
4
1
2
1
2
1
1
2
2
4
3
2
2
4
1
3
1
4
1
2
2
3
4
5
hash_set<StateID>
StateRegistry
State
5
id =
registry =
buffer =
PerStateInformation<Entry>
0
1
2
3
4
5
Entry
Entry
Entry
Entry
Entry
Entry
Entry
Entry
Entry
Entry
SegmentedVector<Entry>
registry1
registry2
hash_map<StateRegistry *, SegmentedVector<Entry>>
0
1
Entry
Entry
Entry
Entry
SegmentedVector<Entry>
- immutable
- always registered
- always duplicate checked
- always has valid ID/buffer
- never owns buffer
- created by factory methods:
- StateRegistry::get_initial_state()
- StateRegistry::get_successor_state(s, op)
- Create temporary states by
registering them in temporary registry
- Indexed with State objects
- Last accessed registry is cached
- Subscriber mechanism:
- if Registry is destroyed,
all stored information is destroyed as well
- Open question: introduce new struct for (StateID + Registry*)? StateHandle? Idea: StateID is sufficient if registry is known (e.g., in open lists)
Entry
2