libgsjj  1
Deterministic finite automata learning library
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
gsjj::passive::CNF::UnaryCNFMethod Class Reference

The Grinchtein, Leucker and Piterman's unary method. More...

#include <UnaryCNFMethod.h>

Inheritance diagram for gsjj::passive::CNF::UnaryCNFMethod:
Inheritance graph
[legend]
Collaboration diagram for gsjj::passive::CNF::UnaryCNFMethod:
Collaboration graph
[legend]

Public Member Functions

 UnaryCNFMethod ()=delete
 
 ~UnaryCNFMethod ()
 
- Public Member Functions inherited from gsjj::passive::CNF::SATCNFMethod
 SATCNFMethod ()=delete
 
virtual ~SATCNFMethod ()
 
bool solve () override
 Solves the SAT/SMT problem induced by the method. More...
 
std::unique_ptr< DFA< char > > constructDFA () override
 Constructs the DFA induced by the variables according to the method. More...
 
virtual void setStopTrigger (const std::chrono::seconds &timeLimit, std::atomic_bool &stopTrigger, const bool *stopPointer) override
 Sets the stop trigger for this method. More...
 
- Public Member Functions inherited from gsjj::passive::Method
 Method ()=delete
 
virtual ~Method ()
 
bool hasSolution () const
 If solve() has been called and if there exists a solution, return True. More...
 
unsigned int numberOfStates () const
 Gives the number of states of the prospected DFA (the n) More...
 
double timeToSolve () const
 Gives the CPU time taken to solve the problem. More...
 

Static Public Member Functions

static std::string getFactoryName ()
 

Protected Member Functions

void createVariables () override
 Creates all needed variables for the method. More...
 
void createClauses () override
 Creates all needed clauses for the method. More...
 
std::unique_ptr< DFA< char > > toDFA (const Minisat::vec< Minisat::lbool > &model) const override
 Effectively creates the DFA from the values of the variables in the given model. More...
 
 UnaryCNFMethod (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)
 
- Protected Member Functions inherited from gsjj::passive::CNF::SATCNFMethod
Minisat::Var newVariable ()
 Creates a new variable in the SAT solver. More...
 
void addClause (const Minisat::vec< Minisat::Lit > &clause)
 Adds a new clause to the SAT solver. More...
 
 SATCNFMethod (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)
 
- Protected Member Functions inherited from gsjj::passive::Method
 Method (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)
 Creates the method. More...
 

Additional Inherited Members

- Protected Attributes inherited from gsjj::passive::Method
const std::set< std::string > m_Sp
 The set of words to accept $S_+$. More...
 
const std::set< std::string > m_Sm
 The set of words to reject $S_-$. More...
 
const unsigned int m_numberStates
 The number of states in the DFA to construct. More...
 
const std::set< std::string > m_S
 In the code, $S = S_+ \cup S_-$. More...
 
const std::set< std::string > m_prefixes
 $Pref(S_+ \cup S_-)$ More...
 
const std::set< char > m_alphabet
 $\Sigma$ More...
 
bool m_triedSolve
 
bool m_hasSolution
 
double m_cpuTimeStart
 
double m_cpuTimeEnd
 
- Static Protected Attributes inherited from gsjj::passive::RegisterInFactory< UnaryCNFMethod >
static bool s_registered
 Useful to make sure the template is correctly used by the compiler. More...
 

Detailed Description

The Grinchtein, Leucker and Piterman's unary method.

It relies on SAT solver

Definition at line 14 of file UnaryCNFMethod.h.

Constructor & Destructor Documentation

◆ UnaryCNFMethod() [1/2]

gsjj::passive::CNF::UnaryCNFMethod::UnaryCNFMethod ( )
delete

◆ ~UnaryCNFMethod()

gsjj::passive::CNF::UnaryCNFMethod::~UnaryCNFMethod ( )

Definition at line 16 of file UnaryCNFMethod.cpp.

◆ UnaryCNFMethod() [2/2]

gsjj::passive::CNF::UnaryCNFMethod::UnaryCNFMethod ( 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 
)
protected

Definition at line 10 of file UnaryCNFMethod.cpp.

Member Function Documentation

◆ createClauses()

void gsjj::passive::CNF::UnaryCNFMethod::createClauses ( )
overrideprotectedvirtual

Creates all needed clauses for the method.

Implements gsjj::passive::CNF::SATCNFMethod.

Definition at line 35 of file UnaryCNFMethod.cpp.

◆ createVariables()

void gsjj::passive::CNF::UnaryCNFMethod::createVariables ( )
overrideprotectedvirtual

Creates all needed variables for the method.

Implements gsjj::passive::CNF::SATCNFMethod.

Definition at line 24 of file UnaryCNFMethod.cpp.

◆ getFactoryName()

std::string gsjj::passive::CNF::UnaryCNFMethod::getFactoryName ( )
static

Definition at line 20 of file UnaryCNFMethod.cpp.

◆ toDFA()

std::unique_ptr< DFA< char > > gsjj::passive::CNF::UnaryCNFMethod::toDFA ( const Minisat::vec< Minisat::lbool > &  model) const
overrideprotectedvirtual

Effectively creates the DFA from the values of the variables in the given model.

Parameters
modelThe model
Returns
An unique_ptr to the constructed DFA

Implements gsjj::passive::CNF::SATCNFMethod.

Definition at line 117 of file UnaryCNFMethod.cpp.


The documentation for this class was generated from the following files: