The base class of all passive methods.
More...
#include <Method.h>
|
| | Method ()=delete |
| |
| virtual | ~Method () |
| |
| virtual bool | solve ()=0 |
| | Solves the SAT/SMT problem induced by the method. More...
|
| |
| 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...
|
| |
| virtual std::unique_ptr< DFA< char > > | constructDFA ()=0 |
| | Constructs the DFA induced by the variables according to the method. More...
|
| |
| double | timeToSolve () const |
| | Gives the CPU time taken to solve the problem. More...
|
| |
| virtual void | setStopTrigger (const std::chrono::seconds &timeLimit, std::atomic_bool &stopTrigger, const bool *stopPointer)=0 |
| | Sets the stop trigger for this method. More...
|
| |
|
| | 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...
|
| |
The base class of all passive methods.
Definition at line 40 of file Method.h.
◆ Method() [1/2]
| gsjj::passive::Method::Method |
( |
| ) |
|
|
delete |
◆ ~Method()
| gsjj::passive::Method::~Method |
( |
| ) |
|
|
virtual |
◆ Method() [2/2]
| 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 |
|
) |
| |
|
protected |
Creates the method.
- Parameters
-
| SpSet | The set of words to accept |
| SmSet | The set of words to reject |
| SSet | The union of SpSet and SmSet |
| prefixesSet | The prefixes of S |
| alphabetSet | The used alphabet |
| n | The number of states in the prospected DFA |
Definition at line 25 of file Method.cpp.
◆ constructDFA()
| virtual std::unique_ptr<DFA<char> > gsjj::passive::Method::constructDFA |
( |
| ) |
|
|
pure virtual |
◆ hasSolution()
| bool gsjj::passive::Method::hasSolution |
( |
| ) |
const |
|
inline |
If solve() has been called and if there exists a solution, return True.
Otherwise, return false
- Returns
- True iff the SAT problem has a solution
Definition at line 60 of file Method.h.
◆ numberOfStates()
| unsigned int gsjj::passive::Method::numberOfStates |
( |
| ) |
const |
Gives the number of states of the prospected DFA (the n)
- Returns
- The number of states
Definition at line 43 of file Method.cpp.
◆ setStopTrigger()
| virtual void gsjj::passive::Method::setStopTrigger |
( |
const std::chrono::seconds & |
timeLimit, |
|
|
std::atomic_bool & |
stopTrigger, |
|
|
const bool * |
stopPointer |
|
) |
| |
|
pure virtual |
Sets the stop trigger for this method.
Since we use three different solvers and each has its own way to stop (CVC4 uses a function to set a time limit, Maple is in C++ so we can use an atomic variable and Limboole is in C and we must use a pointer), we must provide each possibility
- Parameters
-
| timeLimit | The time in seconds the method can take. It's used by SMT methods. |
| stopTrigger | The atomic_bool variable. Once set to true, the method will stop. It's used by CNF methods. |
| stopPointer | The pointer variable. Once the value is set to true, the method will stop. It's used by NonCNF methods. |
Implemented in gsjj::passive::NonCNF::SATNonCNFMethod, gsjj::passive::CNF::BinaryCNFMethod, gsjj::passive::CNF::SATCNFMethod, and gsjj::passive::SMT::SMTMethod.
◆ solve()
| virtual bool gsjj::passive::Method::solve |
( |
| ) |
|
|
pure virtual |
◆ timeToSolve()
| double gsjj::passive::Method::timeToSolve |
( |
| ) |
const |
Gives the CPU time taken to solve the problem.
- Returns
- The CPU time taken by the solver
Definition at line 47 of file Method.cpp.
◆ m_alphabet
| const std::set<char> gsjj::passive::Method::m_alphabet |
|
protected |
◆ m_cpuTimeEnd
| double gsjj::passive::Method::m_cpuTimeEnd |
|
protected |
◆ m_cpuTimeStart
| double gsjj::passive::Method::m_cpuTimeStart |
|
protected |
◆ m_hasSolution
| bool gsjj::passive::Method::m_hasSolution |
|
protected |
◆ m_numberStates
| const unsigned int gsjj::passive::Method::m_numberStates |
|
protected |
The number of states in the DFA to construct.
Definition at line 109 of file Method.h.
◆ m_prefixes
| const std::set<std::string> gsjj::passive::Method::m_prefixes |
|
protected |
◆ m_S
| const std::set<std::string> gsjj::passive::Method::m_S |
|
protected |
In the code,
.
Definition at line 113 of file Method.h.
◆ m_Sm
| const std::set<std::string> gsjj::passive::Method::m_Sm |
|
protected |
The set of words to reject
.
Definition at line 105 of file Method.h.
◆ m_Sp
| const std::set<std::string> gsjj::passive::Method::m_Sp |
|
protected |
The set of words to accept
.
Definition at line 101 of file Method.h.
◆ m_triedSolve
| bool gsjj::passive::Method::m_triedSolve |
|
protected |
The documentation for this class was generated from the following files: