libgsjj  1
Deterministic finite automata learning library
BinaryNonCNFMethod.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 
7 
8 namespace gsjj {
9  namespace passive {
10  namespace NonCNF {
14  class BinaryNonCNFMethod : public SATNonCNFMethod, public RegisterInFactory<BinaryNonCNFMethod> {
15  public:
16  BinaryNonCNFMethod() = delete;
18 
19  static std::string getFactoryName();
20 
21  protected:
22  virtual bool createFormula(std::ostream &stream) override;
23  virtual std::unique_ptr<DFA<char>> toDFA(std::istream &stream) const override;
24  virtual std::string getFileName() const override;
25 
26  BinaryNonCNFMethod(const std::set<std::string> &SpSet, const std::set<std::string> &SmSet, const std::set<std::string> &SSet, const std::set<std::string> &prefixesSet, const std::set<char> &alphabetSet, unsigned int n);
27 
28  private:
29  std::string phi_different(std::string pref1, std::string pref2);
30  std::string phi_not_q_i(std::string pref, unsigned int i);
34  typedef std::map<std::pair<std::string, unsigned int>, unsigned int> states_map;
38  typedef states_map::value_type state;
39  };
40  }
41  }
42 }
The namespace of the library.
Definition: binary.h:11
virtual std::string getFileName() const override
Gives the name of the file in which the boolean formula must be written.
The Grinchtein, Leucker and Piterman&#39;s binary method using a SAT Solver that does not rely on CNF...
virtual bool createFormula(std::ostream &stream) override
Creates the boolean formula (must not be in CNF) and writes it in the stream.
virtual std::unique_ptr< DFA< char > > toDFA(std::istream &stream) const override
Effectively creates the DFA.
Helps to register a method in the factory.
Definition: MethodFactory.h:84
Base class for every method that relies on a non-CNF SAT solver.