pub(crate) fn test_automaton_state_id(index: usize) -> crate::nfa::AutomatonStateId {
use crate::core::{NormalizedPattern, Pattern, RepetitionQuantifier, Symbol};
use crate::nfa::CompiledAutomaton;
static SMALL_AUTOMATON: std::sync::OnceLock<CompiledAutomaton> =
std::sync::OnceLock::new();
let small = SMALL_AUTOMATON.get_or_init(|| {
let pattern = NormalizedPattern::Ast(Pattern::Repetition(
Box::new(Pattern::Symbol(Symbol::Named("A".into()))),
RepetitionQuantifier::AtMost(32),
));
CompiledAutomaton::compile(&pattern, &["A".into()])
.expect("the execution test automaton should compile")
});
small.nfa().state_id(index).unwrap_or_else(|| {
panic!("state index {index} exceeds the execution test automaton")
})
}