Empirical
Classes | Namespaces | Typedefs
NFA.h File Reference

A Non-deterministic Finite Automata simulator. More...

#include <map>
#include <set>
#include "../base/vector.h"
#include "BitSet.h"
#include "set_utils.h"

Go to the source code of this file.

Classes

class  emp::tNFA< S, STOP_TYPE >
 A dynamic NFA class, for easily building non-determanistic finite automata. More...
 
class  emp::tNFA_State< NUM_SYMBOLS, STOP_TYPE >
 Information about the current full state (i.e., set of legal states) of an NFA. More...
 

Namespaces

 emp
 If we are in emscripten, make sure to include the header.
 

Typedefs

using emp::NFA = tNFA< 128, uint8_t >
 NFA is the most standard tNFA setup. More...
 
using emp::NFA_State = tNFA_State< 128, uint8_t >
 NFA_State is the most standard tNFA_State setup. More...
 

Detailed Description

A Non-deterministic Finite Automata simulator.

Note
This file is part of Empirical, https://github.com/devosoft/Empirical
Date
2016-2017
Note
Status: BETA

To build a standard NFA, use emp::NFA. If you want to have more symbols or more stop states, use emp::tNFA<S,T> where S is the number of symbols and T is the type used for stop. (defaults are 128 for ASCII-128 and uint8_t respectively.)

The constructor can take as parameters the number of states and the id of the start state (both default to 0)

Note
DFA's use SetTransition(), but NFA's use AddTransition. This distinction is intentional since in a DFA a second SetTransition with the same start state and symbol will override first, while in an NFA a second AddTransition will always add a new option.