1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use Hash;
/// Base trait for (possibly nondeterministic) automata.
///
/// The trait defines:
/// - a state type (`State`) and a method to iterate over states,
/// - an input type (`Input`) and a method to iterate over alphabet symbols,
/// - predicates for valid/initial/accepting states.
///
/// Note: this `general` layer does not assume finiteness. The `finite`
/// layer adds the finiteness bound where algorithms require it.
///
/// Higher-level traits build on this:
/// - [`general::deterministic::DeterministicAutomaton`] for deterministic step
/// semantics and word acceptance.
/// - [`general::nondeterministic::NonDeterministicAutomaton`] for successor
/// sets.