12#ifndef CPROVER_UTIL_EDIT_DISTANCE_H
13#define CPROVER_UTIL_EDIT_DISTANCE_H
33 const std::string &
string,
34 std::size_t allowed_errors = 2);
36 bool matches(
const std::string &
string)
const;
41 nfa.dump_automaton_dot_to(out);
levenshtein_automatont(const std::string &string, std::size_t allowed_errors=2)
nfat< char >::state_labelt state_labelt
std::optional< std::size_t > get_edit_distance(const std::string &string) const
void dump_automaton_dot_to(std::ostream &out)
bool matches(const std::string &string) const
std::vector< state_labelt > final_states
Very simple NFA implementation Not super performant, but should be good enough for our purposes.