CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
edit_distance.h
Go to the documentation of this file.
1
11
12#ifndef CPROVER_UTIL_EDIT_DISTANCE_H
13#define CPROVER_UTIL_EDIT_DISTANCE_H
14
15#include "nfa.h"
16
17#include <cstddef>
18#include <optional>
19#include <string>
20
25{
26private:
29 std::vector<state_labelt> final_states;
30
31public:
33 const std::string &string,
34 std::size_t allowed_errors = 2);
35
36 bool matches(const std::string &string) const;
37 std::optional<std::size_t> get_edit_distance(const std::string &string) const;
38
39 void dump_automaton_dot_to(std::ostream &out)
40 {
42 };
43};
44
45#endif // CPROVER_UTIL_EDIT_DISTANCE_H
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
Simple automaton that can detect whether a string can be transformed into another with a limited numb...
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
std::size_t state_labelt
Definition nfa.h:29
void dump_automaton_dot_to(std::ostream &out) const
Write the automaton structure to out in graphviz dot format.
Definition nfa.h:105